-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8591b89
to
69f0a99
Compare
The clients requested a loading screen that covers the entire page so users can't click on anything while the redirect is happening.
69f0a99
to
22d126a
Compare
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.
4c4c8dc
to
f95caa5
Compare
I'm seeing an error in production and this should help with debugging.
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.
jeremyf
reviewed
Jan 19, 2024
jeremyf
suggested changes
Jan 19, 2024
Co-authored-by: Jeremy Friesen <[email protected]>
jeremyf
reviewed
Jan 19, 2024
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.
jeremyf
reviewed
Jan 19, 2024
return if retries > RETRY_MAX | ||
|
||
retries += 1 | ||
CreateGroupAndAddMembersJob.set(wait: 10.minutes).perform_later(cdl_id, retries) |
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.
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.
jeremyf
approved these changes
Jan 19, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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