-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement component factory for data viewing and entering #5
Comments
The first, and insufficient, implementation of this is currently in: component factory and rule-set and mapping. This is insufficient because the rule-set is hardcoded into the PropertyShapeEditor component code, and the mapping is hardcoded into the How could this be improved? Firstly, we note the following explanation provided by the vite project setup, in relation to the
Thoughts:
|
#26 implements the basic design for such a component factory. This is specific to editors (not viewers), but the design for viewers will be a duplicate. The main remaining feature will be to return a score from the matchers instead of a boolean match or no match. But this can be implemented as a new feature and does not have to form part of the open PR, nor would it be necessary to complete as a prerequisite to closing this issue. |
VueJS rendering is built on the concept of components. For any unit that needs rendering, a separate component can be created/authored. These components can be invoked programmatically as needed.
Practically, this means that if we have a schema that specifies e.g. an author of a dataset can be of type
schema:Person
orschema:Organization
, we could create VueJS rendering components for both of these types, and any other arbitrary types. Application logic could then determine which component to use to render a given author depending on the data.In addition, an automated matching procedure could be used to select the most appropriate rendering component from a factory of components, and to default to a generic component if no appropriate ones are found. This means that the factory could be added to in an ad hoc way without having to register a component explicitly in some deterministic way.
A first step towards developing such a component factory could be to work from an example schema that already has a minimal set of annotations that would assist the matching procedure. E.g. whether a component is supposed to render data or allow the user to enter data; or what type of data format needs to be rendered/entered (text / date / integer, etc). This is closely connected to, and likely dependent on, #2.
The text was updated successfully, but these errors were encountered: