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

Modify routes and add option to change config lang in preview mode #368

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

yileifeng
Copy link
Member

@yileifeng yileifeng commented Jul 23, 2024

Related Item(s)

Closes #311

Changes

  • [FEATURE] Adds change lang in preview mode
  • [ROUTE] Removes preview route with no UID specified

Testing

Steps:
Change languages in preview mode by loading the preview route directly through URL as well as loading the preview route through the editor.


This change is Reviewable

Copy link

Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/preview-lang-route

@yileifeng yileifeng force-pushed the preview-lang-route branch from 318d580 to 8aa5f1f Compare July 23, 2024 19:23
Copy link
Member

@RyanCoulsonCA RyanCoulsonCA left a 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: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yileifeng)

Copy link
Member

@dnlnashed dnlnashed left a comment

Choose a reason for hiding this comment

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

Noticed that when switching between the languages in preview mode multiple times the local server ends up crashing. Not sure how much of an issue this will be in prod.

Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yileifeng)

@yileifeng yileifeng force-pushed the preview-lang-route branch from 8aa5f1f to a5ed861 Compare August 7, 2024 18:12
Copy link
Member Author

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Did a rework for the preview component to save both lang configs and only trigger a refresh of the Vue component upon language toggle rather than relying on a server fetch. This should solve the issue as the server will not get overloaded. Should be a much faster loadup time as well when switching languages.

Reviewable status: 2 of 4 files reviewed, all discussions resolved (waiting on @dnlnashed and @RyanCoulsonCA)

Copy link
Member

@dnlnashed dnlnashed left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @yileifeng)

@yileifeng yileifeng merged commit 824dec8 into ramp4-pcar4:main Aug 21, 2024
3 checks passed
@yileifeng yileifeng deleted the preview-lang-route branch August 21, 2024 13:03
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.

Language switch in editor-preview
3 participants