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

After creating a section, redirect the user to where that section is visible #58370

Merged
merged 5 commits into from
May 6, 2024

Conversation

TurnerRiley
Copy link
Contributor

@TurnerRiley TurnerRiley commented May 2, 2024

Currently, when a user creates/edits a section they are then redirected to the Teacher Homepage regardless of which type of section it is (i.e. PL or non-PL). This PR redirects the user to the page where they will see the section they just created/edited.

Teacher Homepage

Creating a non-PL section (should redirect back to the Teacher Homepage)

video1775467993.mp4

Creating a PL section (should redirect to the My PL page)

video2775467993.mp4

Editing a non-PL section (should redirect back to the Teacher Homepage)

video4775467993.mp4

My PL page

Creating a non-PL section (should redirect to the Teacher Homepage)

video5775467993.mp4

Creating a PL section (should redirect back to the My PL page)

video6775467993.mp4

Editing a PL section (should redirect back to the My PL page)

video3775467993.mp4

Links

Jira ticket: here

Testing story

Local testing and updating unit tests.

@TurnerRiley TurnerRiley changed the title After creating a section, redirect the user to where it was created After creating a section, redirect the user to where that section is visible May 2, 2024
@TurnerRiley TurnerRiley requested a review from a team May 2, 2024 19:11
navigateToHref(
`/sections/new?participantType=${participantType}&loginType=${loginType}`
);
const createSectionFromMyPl = participantType !== 'student';
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious ... would it be better to always redirect to the My PL page if the user created a PL section and otherwise direct to home?

Not saying we should change what's here -- just thinking out loud!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what these lines are effectively doing if I'm understanding your message properly! If it's a PL section, it redirects the user to the My PL page, otherwise it redirects home. I left the URL variable as redirectToPage in case we have other pages we want to redirect to in the future!

Copy link
Contributor

Choose a reason for hiding this comment

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

ooo got it got it!

@TurnerRiley TurnerRiley merged commit 53061dd into staging May 6, 2024
2 checks passed
@TurnerRiley TurnerRiley deleted the redirect-user-after-create-section branch May 6, 2024 16:52
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.

None yet

2 participants