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

Improve code/schema validation before registering #495

Merged
merged 15 commits into from Jan 11, 2024

Conversation

jl-santana
Copy link
Contributor

@jl-santana jl-santana commented Jan 9, 2024

More info about this can be found on this issue

Changes on this PR:

  • Validate code & schema before registering the indexer
    Logic: If formatting either the code or the schema fails, the Publish button is disabled. Only if type generation errors or no errors are detected, the Publish button will be enabled. More about this on this discussion
Screen.Recording.2024-01-08.at.4.42.31.PM.mov

Additionally

  • Created a reusable Modal with a global context to manage it, so we can trigger it from any component to display some info
  • Updated schema with granular error types for improved clarity
  • Created a custom error class to filter by type Error. We can add more fields on it if needed

@jl-santana jl-santana requested a review from a team as a code owner January 9, 2024 16:26
Copy link
Contributor

@roshaans roshaans left a comment

Choose a reason for hiding this comment

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

Changes look good to me. 💯

It would be nice though to clear out all errors that the user sees when they click the button to Reset Changes. At the moment the errors stay.

frontend/src/constants/Strings.js Outdated Show resolved Hide resolved
frontend/src/components/Editor/Editor.jsx Outdated Show resolved Hide resolved
jl-santana and others added 2 commits January 10, 2024 15:59
Co-authored-by: Roshaan Siddiqui <siddiqui.roshaan@gmail.com>
@jl-santana jl-santana merged commit 81edb7e into main Jan 11, 2024
4 checks passed
@jl-santana jl-santana deleted the feat/improve-validation-before-registering branch January 11, 2024 15:25
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.

None yet

2 participants