Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Navigation tweaks #11256

Merged
merged 4 commits into from
Sep 19, 2023
Merged

Conversation

rtibbles
Copy link
Member

Summary

  • Prevents redundant navigation errors by using next rather than router.replace for synchronous navigation guards
  • Ensures that the side nav always closes for navigation events, now that it always displays as a modal
  • Ensures backlink gets properly generated for Home Page by passing classId parameter

References

Fixes #11253

Reviewer guidance

Are all the behaviours working as one might expect?
Did I miss any instances where Home, Reports, or Plan links are being generated without a classId (now that the parameter is optional, it does not automatically get supplied by the getRoute method.

New side nav behaviour - only does the toggle behaviour when navigating within an SPA, otherwise it looked a bit janky:
Screencast from 09-15-2023 04:03:30 PM.webm

Bug fix for back route:
Screencast from 09-15-2023 04:00:21 PM.webm

No redundant navigation errors:
Screencast from 09-15-2023 04:01:35 PM.webm


Testing checklist

  • Contributor has fully tested the PR manually
  • If there are any front-end changes, before/after screenshots are included
  • Critical user journeys are covered by Gherkin stories
  • Critical and brittle code paths are covered by unit tests

PR process

  • PR has the correct target branch and milestone
  • PR has 'needs review' or 'work-in-progress' label
  • If PR is ready for review, a reviewer has been added. (Don't use 'Assignees')
  • If this is an important user-facing change, PR or related issue has a 'changelog' label
  • If this includes an internal dependency change, a link to the diff is provided

Reviewer checklist

  • Automated test coverage is satisfactory
  • PR is fully functional
  • PR has been tested for accessibility regressions
  • External dependency files were updated if necessary (yarn and pip)
  • Documentation is updated
  • Contributor is in AUTHORS.md

@rtibbles rtibbles added the TODO: needs review Waiting for review label Sep 15, 2023
@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) SIZE: small labels Sep 15, 2023
Copy link
Contributor

@thanksameeelian thanksameeelian left a comment

Choose a reason for hiding this comment

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

i've read through the code and have been clicking around and almost everything is looking good to me. and kudos to @pcenov for finding that redundant navigation problem!

the only small issue i noticed was while i was testing out that scenario of clicking on the same sidenav link twice. afterwards, the page gave the appearance of perpetual loading, with the top loading bar running continuously

perpetual-loading.mov

@rtibbles
Copy link
Member Author

Seems like this was happening because we always set the global loading state to true before entering any route in coach. Have resolved it for now by turning it off when the class param required guard returns true.

Ultimately, my suggestion elsewhere has been that we should only use the core loading state to show navigation is still in progress and control it entirely from navigation guards in the core of the app - but that's for another day!

Copy link
Member

@pcenov pcenov left a comment

Choose a reason for hiding this comment

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

Thanks @rtibbles and @thanksameeelian - no extra issues uncovered while regression testing, good to go!

@thanksameeelian thanksameeelian self-requested a review September 18, 2023 14:33
Copy link
Contributor

@thanksameeelian thanksameeelian left a comment

Choose a reason for hiding this comment

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

looks great to me!

@thanksameeelian thanksameeelian merged commit 485c31c into learningequality:release-v0.16.x Sep 19, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) SIZE: small TODO: needs review Waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coach routing - Minor issues
3 participants