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 plugin UI #2661

Closed
14 tasks
VakarisZ opened this issue Dec 6, 2022 · 1 comment
Closed
14 tasks

Add plugin UI #2661

VakarisZ opened this issue Dec 6, 2022 · 1 comment
Labels
Feature Issue that describes a new feature to be implemented. Plugins

Comments

@VakarisZ
Copy link
Contributor

VakarisZ commented Dec 6, 2022

Is your feature request related to a problem? Please describe.
UI needs to be capable to display dynamically added plugins.

Prerequisites
It would be best if we already had the code that merges the plugins into the configuration prior to implementing this.

Tasks

  • Migrate from react-jsonschema-form-bs4 to react-jsonschema-form
    We need to migrate because of multiple reasons. Main reasons are easier styling and bugs like this
  • Build mock plugins. The mock has to have some required fields, some with defaults and some without. There also needs to be some other validation rules in order to properly test the capabilities of the added plugin UI infrastructure. We have examples in the 2538-plugin-prototype, but ideally, we should fetch those from the island. Alternatively we can fake the fetching process on the UI. The purpose of this task is to simulate that we get complex plugins from the back end in a way back end provides them (global schema, global config instance, plugin schemas, plugin manifests)
  • Modify the configuration page to display the new selector for plugins
    • Create a function that would generate a UI schema for the configuration. UI doesn't know where the plugins are in the schema. UI needs to figure out the paths to all plugins and specify that they need to be displayed with a specific template. One way this could be achieved is to pull the whole schema (which includes plugins) and to pull all plugins. Then go through each plugin, find it in the schema and mark the path in the UI schema to display the specific template.
    • Modify the prototype selector UI, to have checkmarks indicating the selection of the plugin
    • Add safety check and a warning for unsafe options
  • Add/extend a data transformation layer that will:
    • Remove required fields from plugins. They are not supported until this is released
    • Remove the plugins from an instance if they are not enabled. Once this is fixed we'll be able to remove this. Overall this is not a big deal, because we need to generate a default plugin instance either way. Removing objects we don't need might even be easier than explicitly generating the objects we need.
  • Make sure that related functions of the configuration still work (these are not directly linked to the plugin refactoring, but at this point we changed a lot of code surrounding these):
    • Safety prompts
    • Export/imports
    • Tabs/submits/resets
  • Modify/stylize the prototype selector to more closely resemble the mock provided at the bottom of this issue (timeboxed)

Predicted critical path

image

Resources

UI mock:
image

@VakarisZ
Copy link
Contributor Author

Got split up into the following: #2694 #2697 #2698 #2699 #2700 #2702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Issue that describes a new feature to be implemented. Plugins
Projects
None yet
Development

No branches or pull requests

1 participant