biothings / discovery-app

The Data Discovery Engine project by the CD2H Data working-group
http://discovery.biothings.io
Apache License 2.0
4 stars 9 forks source link

preload cardinality when available #196

Closed gtsueng closed 1 year ago

gtsueng commented 1 year ago

Is your feature request related to a problem? Please describe. When extending from NIAID schema (which has cardinality encoded via owl:cardinality, and the cardinality toggle is enabled, preload the existing cardinality from the parent schema so that it's easy to see right away. Here, you can see the cardinality selector is empty even though the parent class has a cardinality information saved for the property: image

Describe the solution you'd like Have the cardinality preloaded if user toggles the cardinality editor. So in the previous example, it would look like this by default: image

Describe alternatives you've considered Ask users to scroll through the preloaded validation rules, identifying the owl:cardinality portion and selecting a cardinality based on the value. But, the preloaded json validation rules are working nicely--seems like preloading this makes sense.

marcodarko commented 1 year ago

@gtsueng is there a class in any of the namespaces that has cardinality like this already? I wanna test this feature.

flaneuse commented 1 year ago

NIAID and NDE should.

marcodarko commented 1 year ago

Cardinality is not preloaded when available automatically.