Views should enforce schemas
See original GitHub issuePrerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Running the latest version of Constellation
- Attached the Support Package via
Help
>Support Package
- Checked the FAQs: https://github.com/constellation-app/constellation/wiki/FAQ
- Checked that your issue isn’t already filed: https://github.com/constellation-app/constellation/issues
- Checked that there is not already a module that provides the described functionality: https://github.com/constellation-app/constellation/wiki/Catalogue-of-Repositories
Description
Constellation has long had an issue where a plugin could create attributes on a graph whose schema does not support them, and the behaviour has always been that that plugin should fail. I think instead we should allow plugins to create any attributes they want, and have views enforce schemas. For example, you might have a plugin create latitude and longitude attributes on a graph, but unless that graph is backed by the Analytic Schema (or one of its children) the Map View will not function as that is the minimum requirement of that view. We could build this functionality into the view framework - perhaps if a view is opened on top of an incompatible graph, it will default to a pane informing the user that their graph is incompatible with this view.
Steps to Reproduce
N/A
Expected behaviour:
Plugins can create attributes that are incompatible with underlying schemas.
Actual behaviour:
As per description, investiagte the statement: “We could build this functionality into the view framework - perhaps if a view is opened on top of an incompatible graph, it will default to a pane informing the user that their graph is incompatible with this view.” and implement if possible.
Reproduces how often:
Unable to quantify.
Additional Information
N/A
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
To follow up: different graph schemas will not work on all views. Simple Schema will not have default attributes content, geo or date time. When these schemas are in use, or if the current graph does not have the correct attributes registered that the view requires - The view should be disabled when opened. Upon adding those attributes the view should become active. Constellation should do nothing behind the users view - Constellation should alert the user that there is not a prerequisite met and therefore prompt them to add it if needed.
This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.