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

Feature: Moving project solutions to Hotwire final tweaks #3956

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

KevinMulhern
Copy link
Member

Because:

  • A few final touches before we start rolling this out to users.

This commit:

  • Move the add solution button hook outside of the current users solution conditional - this is needed for the button to display correctly when the user deletes their solution after refreshing the page.
  • Change "Add submission" button text to "Add solution" - to fit the solutions title.
  • Add a hidden class to the drop down so it does not flash visible for a brief moment during re-render

@KevinMulhern KevinMulhern force-pushed the feature/hotwire-submission-tweaks branch from 5aa2e97 to 4f06165 Compare July 11, 2023 20:59
Because:
* A few final touches before we start rolling this out to users.

This commit:
* Move the add solution button hook outside of the current users solution conditional - this is needed for the button to display correctly when the user deletes their solution after refreshing the page.
* Change "Add submission" button text to "Add solution" - to fit the solutions title.
* Add a hidden class to the drop down so it does not flash visible for a brief moment during re-render
@KevinMulhern KevinMulhern force-pushed the feature/hotwire-submission-tweaks branch from 4f06165 to 33de9f3 Compare July 11, 2023 21:44
@KevinMulhern KevinMulhern self-assigned this Jul 11, 2023
@KevinMulhern KevinMulhern added the Type: Enhancement Involves a new feature or enhancement request label Jul 11, 2023
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-3956 July 11, 2023 21:51 Inactive
Copy link
Member

@ChargrilledChook ChargrilledChook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excited to see this start to get rolled out 🎉

@@ -24,7 +24,7 @@
data-transition-leave="transition ease-in duration-75"
data-transition-leave-start="transform opacity-100 scale-100"
data-transition-leave-end="transform opacity-10 scale-95"
class="absolute right-0 z-10 mt-2 w-32 origin-top-right rounded-md bg-white dark:bg-gray-700 py-2 shadow-lg ring-1 ring-gray-900/5 dark:ring-gray-300/5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="options-menu-0-button" tabindex="-1">
class="hidden absolute right-0 z-10 mt-2 w-32 origin-top-right rounded-md bg-white dark:bg-gray-700 py-2 shadow-lg ring-1 ring-gray-900/5 dark:ring-gray-300/5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="options-menu-0-button" tabindex="-1">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What controls the un-hiding of this element? Probably something obvious but it's not jumping out at me

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question and no worries, it's not that obvious. The visibility stimulus controller is unhiding via el-transistion. It toggles the hidden class and add transitions under the hood.

@@ -41,7 +41,7 @@
expect(page).to have_content(user.username)
end

expect(page).not_to have_content('Add submission')
expect(page).not_to have_content('Add solution')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have made some comments on #3955 but not a blocker for this PR

@KevinMulhern KevinMulhern merged commit 512b28b into main Jul 13, 2023
2 checks passed
@KevinMulhern KevinMulhern deleted the feature/hotwire-submission-tweaks branch July 13, 2023 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Involves a new feature or enhancement request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants