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

Added JSON schema definition for the theme configuration. #875

Merged
merged 8 commits into from
Dec 17, 2019

Conversation

devbucket
Copy link
Contributor

Description

In order to be able to validate the theme configuration, we added a JSON schema definition.

Type of change

Please add an "x" into the option that is relevant:

  • Bug Fix 🐛 (non-breaking change which fixes an issue)
  • Enhancement 🚀 (non-breaking change which adds functionality)
  • Breaking Change 💥 (fix or feature that would cause existing functionality to not work as expected)
  • Polish 💅 (Just some cleanups)
  • Internal 🏠 Only relates to internal processes.

How to test it

Copy the content of the theme-config.schema.json file into this UI: https://rjsf-team.github.io/react-jsonschema-form/ - here you can test the validation by either filling in the UI fields or filling JSON object in the formData section.

@devbucket devbucket added the enhancement New feature or request label Dec 10, 2019
@devbucket devbucket self-assigned this Dec 10, 2019
Copy link
Collaborator

@fkloes fkloes left a comment

Choose a reason for hiding this comment

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

You've implemented a general schema. This might fit right now since the themes have the same foundation. I think that we need a schema for each theme, since they might differ in the future. Additionally we might open the validation system also for extensions. So i think, the file should be located near the extension-config files which are used to generate the views for the settings section of the NMA.

The schema also just covers the theme property inside of the extension / theme config. But it think the issue which we want to solve here will also exist for the other settings inside of the config.

libraries/engage/core/config/theme-config.schema.json Outdated Show resolved Hide resolved
libraries/engage/core/config/theme-config.schema.json Outdated Show resolved Hide resolved
libraries/engage/core/config/theme-config.schema.json Outdated Show resolved Hide resolved
libraries/engage/core/config/theme-config.schema.json Outdated Show resolved Hide resolved
@fkloes fkloes merged commit 5740841 into v6.11.0 Dec 17, 2019
@fkloes fkloes deleted the PWA-2354-theme-config-json-schema branch December 17, 2019 15:18
@devbucket devbucket changed the title Added JSON schema defintion for the theme configuration. Added JSON schema definition for the theme configuration. Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants