Skip to content
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

Merged
merged 6 commits into from
Jul 9, 2023
Merged

Feedback edit #149

merged 6 commits into from
Jul 9, 2023

Conversation

JoshDevHub
Copy link
Collaborator

Description

  • Add turbo behavior for views with the Feedback::ContainerComponent such that it can be replaced by the edit view (and vice versa)
  • Add data params for the Feedback::EditButtonComponent so that turbo can be disabled depending on the situation
  • Change feedback ratings to work on a scale of 1-5
    • Note that this shouldn't impact existing data because it's always stored in the database at 0-100. I just changed how this value is displayed and how it's written to the database on form submission.
  • Style the edit form
  • Add textarea-autogrow stimulus component

Screenshots

Desktop for Full Page Edit

Selection_207

Desktop for Edit Turbo Frame

Selection_209

Mobile for Full Page Edit

Selection_212

Mobile for Edit Turbo Frame

Selection_210

Issue

Closes #140

<p class="p-4">Awaiting completion of feedback.</p>
<% end %>
</div>
<%= tag.turbo_frame(id: dom_id(feedback)) do %>
Copy link
Collaborator Author

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

@toyhammered toyhammered merged commit 1797634 into main Jul 9, 2023
1 check passed
@toyhammered toyhammered deleted the feedback-edit branch July 9, 2023 22:58
<%= 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) %>
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feedback Epic] Feedback Edit
3 participants