Pressing browser back button from new project creates another project #511

Closed
opened 2021-09-12 20:38:34 +02:00 by franknoirot · 1 comment
franknoirot commented 2021-09-12 20:38:34 +02:00 (Migrated from github.com)

Steps to Reproduce

  1. Sign in
  2. Create a new project
  3. Press the back button

You'll be taken to a new randomly-generate URL and both starter projects will be in your project library.

Expected behavior

Returning to the home page (or other previous page before creation)

Suggested reasons

The /draft/{cadPackage} endpoint is redirecting all traffic to the IDE after creating a new project. It might be worth adding logic within the endpoint to detect whether a back navigation is occurring through it. Redwood's router might have a pre-made solution for this case.

## Steps to Reproduce 1. Sign in 2. Create a new project 3. Press the back button You'll be taken to a new randomly-generate URL and both starter projects will be in your project library. ## Expected behavior Returning to the home page (or other previous page before creation) ## Suggested reasons The `/draft/{cadPackage}` endpoint is redirecting all traffic to the IDE after creating a new project. It might be worth adding logic within the endpoint to detect whether a back navigation is occurring through it. Redwood's router might have a pre-made solution for this case.
Irev-Dev commented 2021-09-12 22:07:44 +02:00 (Migrated from github.com)

Oh right, good observation. Don't have much experience detecting back clicks or any advanced stuff with the redwood router. The problem might also be the javascript redirect you mentioned I'm doing from /draft/{cadPackage} for logged in users. Maybe the buttons in the plus button dropdown should route differently depending on if the user is logged in or not.

Oh right, good observation. Don't have much experience detecting back clicks or any advanced stuff with the redwood router. The problem might also be the javascript redirect you mentioned I'm doing from `/draft/{cadPackage}` for logged in users. Maybe the buttons in the plus button dropdown should route differently depending on if the user is logged in or not.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#511