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 loading splash screen and speed up redirect #961

Merged
merged 13 commits into from
Jan 19, 2024

Conversation

kirkkwang
Copy link
Contributor

@kirkkwang kirkkwang commented Jan 17, 2024

The clients requested a loading screen that covers the entire page so users can't click on anything while the redirect is happening.

Zight.Recording.2024-01-18.at.16.11.55.mp4

@kirkkwang kirkkwang force-pushed the fixing_reshare_some_more_part_deux branch 2 times, most recently from 8591b89 to 69f0a99 Compare January 17, 2024 06:04
The clients requested a loading screen that covers the entire page so
users can't click on anything while the redirect is happening.
@kirkkwang kirkkwang force-pushed the fixing_reshare_some_more_part_deux branch from 69f0a99 to 22d126a Compare January 17, 2024 06:19
Kirk Wang added 5 commits January 17, 2024 10:50
This job will create a `Hyrax::Group` with the same name as the `Cdl` to
ensure uniqueness, then add the `Cdl` and all its child works to that
group.
These jobs will make sure the split pages and the CDL groups are
destroyed when the CDL is destroyed which will help tidy things up.
The file sets also need to have their read_groups updated as well.
Also, while destroying, we need to ensure all of a CDL's work's memebers
and file sets get destroyed as well.
The previous approach was to grant a user access to each work and their
child works and their file sets, which can be a lot of trips to the
database.  This commit will instead grant the user read access to the
group that the work, its child works, and all of its file sets belong
to which will reduce the number of trips to the database.
ReShare will have a few works that were already ingested and this rake
task should help us create a group and add members to it.
@kirkkwang kirkkwang force-pushed the fixing_reshare_some_more_part_deux branch from 4c4c8dc to f95caa5 Compare January 18, 2024 00:10
I'm seeing an error in production and this should help with debugging.
@kirkkwang kirkkwang changed the title 🎁 Add loading splash screen while redirecting 🎁 Add loading splash screen and speed up redirect Jan 18, 2024
@kirkkwang kirkkwang marked this pull request as ready for review January 18, 2024 16:04
The redirect text was talking about a book because that was just
something the client mentioned but in context it's clearer with the new
text.  Also the styling was weird on the dashboard loading page, the
loading circle was not centered.
@kirkkwang kirkkwang marked this pull request as draft January 18, 2024 18:44
@kirkkwang kirkkwang marked this pull request as ready for review January 19, 2024 00:13
Co-authored-by: Jeremy Friesen <[email protected]>
jeremyf and others added 2 commits January 19, 2024 09:17
We add a `CreateRelationshipsJobDecorator` so we can move the call of
`CreateGroupAndAddMembersJob` from the after_create callback of `Cdl` to
it.  This way we won't worry about timing.
@kirkkwang kirkkwang requested a review from jeremyf January 19, 2024 21:19
return if retries > RETRY_MAX

retries += 1
CreateGroupAndAddMembersJob.set(wait: 10.minutes).perform_later(cdl_id, retries)
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes this one gets to retry!

This is a better approach because it won't fire off if the
CreateRelationshipsJob fails and we need to retry it.
@kirkkwang kirkkwang requested a review from jeremyf January 19, 2024 22:12
The `Sushi::Info` constant would some times load or some times not load.
Adding a require statement to the model that calls it seems to fix it.
@kirkkwang kirkkwang merged commit 9bc5bd9 into main Jan 19, 2024
5 of 7 checks passed
@kirkkwang kirkkwang deleted the fixing_reshare_some_more_part_deux branch January 19, 2024 23:44
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.

2 participants