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

fix advanced editor validation; enhance the Storylines schema #319

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

RyanCoulsonCA
Copy link
Member

@RyanCoulsonCA RyanCoulsonCA commented Jun 12, 2024

Related Item(s)

#318

Changes

  • Fixes an issue where the JSON validator did not run unless you clicked the Save button at the bottom of the editor (was removed in a previous PR). It now validates the JSON as you write the config.
  • If the user switches off the advanced editor with validation errors, they will be warned that the product may break but will be allowed to continue.
  • The Storylines schema has also been enhanced. I tested this on every type of panel through the demo product (00000000-0000-0000-0000-000000000000), but try out some different products and let me know if you run into any validation errors when using the advanced editor.

Notes

validator-improved

Testing

Steps:

  1. Open the sample page and load a product.
  2. Click on a slide and open the advanced editor.
  3. Make some config changes and check that the validator is working correctly. Test it out with both fake properties and real ones.
  4. Check that existing slides with valid schema aren't showing as invalid.
  5. Try switching off of the advanced editor with errors and ensure that the warning pops up.

This change is Reviewable

Copy link

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

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.

Just wondering if we need to validate the JSON as well. When breaking the JSON syntax the warning doesn't appear, is this intended?

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

Copy link
Member Author

@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.

The JSON editor has a handler to detect syntax errors so it's probably a good idea that we show those as well. Done!

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

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 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @RyanCoulsonCA)

Copy link
Member

@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.

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

@yileifeng yileifeng merged commit 11f06fa into ramp4-pcar4:main Jun 19, 2024
3 checks passed
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.

3 participants