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

Add static input validation for Page Editor #1480

Closed
twschiller opened this issue Sep 26, 2021 · 0 comments · Fixed by #1641
Closed

Add static input validation for Page Editor #1480

twschiller opened this issue Sep 26, 2021 · 0 comments · Fixed by #1641
Assignees
Labels
enhancement New feature or request page editor user experience Improve the user experience (UX)
Milestone

Comments

@twschiller
Copy link
Contributor

twschiller commented Sep 26, 2021

Questions

  • Use Yup or just write our own validation method? Using Yup might not be worth it because we need custom logic based on brick types and are also overlaying runtime errors (via traces)

Part of the Yup schema will need to be dynamically created based on:

  • Extension type (affects which prop name is used for the block configuration pipeline)
  • Number of bricks in the pipeline

Validation:

  • outputKey format validation (must be valid identifier, i.e., start with a letter and only including letters and numbers). NOTE: effect and renderer bricks should not have outputKeys (the field is disabled in the UI)
  • Panel/Sidepanel extensions should have exactly 1 renderer. (If there's more than 1, add a warning to each renderer after the first)
@twschiller twschiller added enhancement New feature or request user experience Improve the user experience (UX) labels Sep 26, 2021
@twschiller twschiller added this to the 1.4.1 milestone Sep 26, 2021
@twschiller twschiller assigned BLoe and BALEHOK and unassigned BLoe Sep 30, 2021
@twschiller twschiller modified the milestones: 1.4.1, 1.4.2 Oct 5, 2021
@twschiller twschiller changed the title PLACEHOLDER: Add Yup schema for Page Editor Add static input validation for Page Editor Oct 5, 2021
BLoe pushed a commit that referenced this issue Oct 12, 2021
BALEHOK added a commit that referenced this issue Oct 15, 2021
* FormikError type

* Validate Renderers

* Display block error

* Validate if renderer is not the last block

* Using FormikErrorTree

* Rewording

* code review fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request page editor user experience Improve the user experience (UX)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants