-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback edit #149
Feedback edit #149
Conversation
Certain pages need this because the turbo frame wouldn't make for a good user experience.
<p class="p-4">Awaiting completion of feedback.</p> | ||
<% end %> | ||
</div> | ||
<%= tag.turbo_frame(id: dom_id(feedback)) do %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have to use this instead of the turbo_frame_tag
helper because of some compatibility issues with ViewComponent. See this documentation
<%= tag.turbo_frame(id: dom_id(feedback)) do %> | ||
<div class="flex justify-between items-center"> | ||
<%= heading(class: "text-lg") %> | ||
<%= render Feedback::EditButtonComponent.new(feedback:, current_user: user) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is merged, but out of curiousity, what is the difference between using the user
var passed to the container component and current_user
? Would it be more descriptive to rename user
to current_user
?
Description
Feedback::ContainerComponent
such that it can be replaced by the edit view (and vice versa)data
params for theFeedback::EditButtonComponent
so that turbo can be disabled depending on the situationScreenshots
Desktop for Full Page Edit
Desktop for Edit Turbo Frame
Mobile for Full Page Edit
Mobile for Edit Turbo Frame
Issue
Closes #140