-
Notifications
You must be signed in to change notification settings - Fork 13
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
Load product on page lang change and router param update #555
base: main
Are you sure you want to change the base?
Conversation
Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/issue-552 |
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @IshavSohal)
src/router/index.ts
line 49 at r1 (raw file):
}, { path: '/:lang/editor-metadata/:uid',
Are we able to remove this route now since the uid is added as an optional parameter above?
7861445
to
4024797
Compare
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.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @yileifeng)
src/router/index.ts
line 49 at r1 (raw file):
Previously, yileifeng (Yi Lei Feng) wrote…
Are we able to remove this route now since the uid is added as an optional parameter above?
Good catch, donethanks
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @IshavSohal)
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.
Temporary blocker as the socket server implementation may change.
Reviewed 3 of 4 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @IshavSohal)
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.
Socket server changes finalized for now. Please rebase with main
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @IshavSohal)
Related Item(s)
#552
Changes
editor-metadata
, product gets loaded in again upon a page lang change, by passing the product's uuid in the router linkuid
as a temporary prop for themetadataExisting
routeeditor-main
toeditor-metadata
(as well as changing page lang), the product gets loaded successfully, by preventing an unlock message from being sent to the web socketNotes
handleMessage
event handler is only able to process one of them, and since the unlock message is sent slightly before the lock message, that is the one that gets processedunlockStorylines()
already takes place upon updating router params, I decided to comment out this line to prevent a message from being sent to the web socket upon product unlock. This doesn't seem to cause any issues based on my testing, but lmk if this could be problematicTesting
Will need to update server locally to test this
Steps:
editor-main
editor-metadata
by updating the router paramsThis change is