-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 IFormValidator
#13927
Closed
Closed
Add IFormValidator
#13927
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for making a pull request to jupyterlab! |
github-actions
bot
added
Design System CSS
pkg:completer
pkg:lsp
pkg:settingeditor
pkg:settingregistry
pkg:ui-components
tag:CSS
For general CSS related issues and pecadilloes
tag:Testing
labels
Feb 5, 2023
bollwyvl
force-pushed
the
gh-13746-refactor-ajv8
branch
2 times, most recently
from
February 5, 2023 19:39
f6c0e52
to
af9a119
Compare
bollwyvl
force-pushed
the
gh-13746-refactor-ajv8
branch
2 times, most recently
from
February 5, 2023 19:51
a69f102
to
da73ae7
Compare
5 tasks
bollwyvl
force-pushed
the
gh-13746-refactor-ajv8
branch
from
February 8, 2023 23:00
da73ae7
to
986d19a
Compare
github-actions
bot
removed
Design System CSS
pkg:completer
tag:Testing
pkg:lsp
tag:CSS
For general CSS related issues and pecadilloes
labels
Feb 8, 2023
This PR has bitrotted, unlikely to continue this work at this time. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References
Elevator Pitch
This starts the process of making the JupyterLab's JSON Schema validator replaceable.
Motivation
The choice of underlying validator library is now inextricably (but correctly) linked to the visual presentation of settings and notebook metadata.
Being able to swap to another, as-of-yet unspecified validator, is ultimately to avoid breakage when JupyterLab is hosted with the
unsafe-eval
CSP set (this can be done, e.g. by portal iframes, over which the application deployer and consumer may have no control). Choosing a validator is out of scope, and discussed in the Future Work session belowAnd yes, all of this is a little silly when the user controls the application. But here we are.
Code changes
@jupyterlab/validator-ajv8-extension
@jupyterlab/validator-ajv8-extension:form-validator
IFormValidator
stays in@jupyterlab/ui-components
@rjsf/validator-ajv8
into a single async importUser-facing changes
Backwards-incompatible changes
Future Work
On a follow-on PR:
@jupyterlab/validator
ajv
ISchemaValidator
hereISettingsRegistry
composite
from defaultsISchemaValidator
provider to@jupyterlab/validator-ajv8-extension
Even if that were done, there would be more work to address the use of
eval
in a number other known places in this codebase and dependencies.Of those, probably only
pageconfig
is "critical," difficult to replace functionality, while the others could probably be worked around.