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

Add placeholder loading animation to expand button #1536

Merged
merged 1 commit into from
May 10, 2024

Conversation

taylor-steve
Copy link
Contributor

Increases the scope of the selector to target all turbo frames, not only the lazy loading turbo frames, in the collection context sidebar. This adds the loading animation above the "Expand" button once clicked:
Screenshot 2024-05-08 at 12 49 45 PM

The change from after to before does not change the existing behavior because all the loading="lazy" turbo frame containers in app/components/arclight/document_components_hierarchy_component.html.erb are empty.

I believe the docs suggest we can use busy in this way:

busy is a boolean attribute toggled to be present when a <turbo-frame>-initiated request starts, and toggled false when the request ends

This is something we are thinking of adding to our app. I thought I'd check if there was interest here first.

Increases the scope of the selector to target all turbo frames, not only the lazy loading turbo frames, in the collection context sidebar.
@taylor-steve taylor-steve marked this pull request as ready for review May 8, 2024 20:22
@marlo-longley
Copy link
Contributor

marlo-longley commented May 8, 2024

Tested the branch and confirmed that this works to show the animation both for the original case of loading a long list of files after hitting the plus symbol:
Screenshot 2024-05-08 at 17 04 11

and also for the Expand button case described above by @taylor-steve.

@corylown corylown merged commit 0607f90 into main May 10, 2024
4 checks passed
@corylown corylown deleted the loading-animation-for-sidebar-expand-button branch May 10, 2024 17:32
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.

3 participants