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

Avoid displaying CoachClassListPage until after data is finished loading #12951

Merged

Conversation

LianaHarris360
Copy link
Member

Summary

This pull request handles the brief flash of the CoachClassListPage when there's only a single class, after navigating from another plugin to a page in the Coach plugin. The page now renders and displays only after the data is fully loaded. This allows the redirection implemented in classIdParamRequiredGuard() to correctly display the CoachClassListPage only when necessary.

Correct behavior:

coachplugincorrect.mov

References

Fixes #12815

Reviewer guidance

  1. Navigate to any coach page from another plugin. Inspecting the page, pressing the Network tab, and setting the network throttling to slow 4g or 3g would be helpful to see a slower transition.

…the page until after data is finished loading
@LianaHarris360 LianaHarris360 added P1 - important Priority: High impact on UX APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Dec 16, 2024
@LianaHarris360 LianaHarris360 requested review from nucleogenesis and removed request for akolson December 16, 2024 17:33
Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

I tested this locally and still see the flash.

2024-12-16.13-35-21.mp4

Does the CoachClassListPage have to be loaded at all if there is only one class? I wonder if maybe we could avoid routing to the page altogether in this case?

@LianaHarris360
Copy link
Member Author

LianaHarris360 commented Dec 17, 2024

I was able to prevent loading the CoachClassListPage if there is only one class, avoiding the brief flash before the correct page is displayed. I added the check classListPageEnabled to the page, which will not display the page if there is only one class. Thanks for the suggestion @nucleogenesis

CoachClassListCorrect.mov

Copy link
Member

@AllanOXDi AllanOXDi left a comment

Choose a reason for hiding this comment

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

Tested it locally and works fine for me. Thanks @LianaHarris360

Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

Code changes LGTM! Thanks Liana

@LianaHarris360 LianaHarris360 merged commit 018ae11 into learningequality:develop Dec 19, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend P1 - important Priority: High impact on UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coach > Class home - Briefly seeing the Classes page when there's only a single class
3 participants