Closed edmondchuc closed 1 year ago
Is this layout specific to VocPub? i.e. Is status & derivation mode relevant to other object listings (e.g. spatial datasets, etc.)? Why do these properties need to be displayed on a listing page?
There already was a slot for the description for each list item underneath the label that took up no extra horizontal space. Is there a reason that the description should be moved to a table-like row?
Is this layout specific to VocPub? i.e. Is status & derivation mode relevant to other object listings (e.g. spatial datasets, etc.)?
Ah I forgot to pose the question in the opening about whether this should be VocPub specific or not. It doesn't need to be, but currently only VocPub returns the predicate and values for the listing table.
We can either make this generic and have the listing table work with any profile or we can make it so that the listing table is only shown for Vocabularies listing and not for the other subsystems.
Why do these properties need to be displayed on a listing page?
There already was a slot for the description for each list item underneath the label that took up no extra horizontal space. Is there a reason that the description should be moved to a table-like row?
The requirement is from @nicholascar to display additional metadata in a table view for the vocabulary listing items with sorting capability. See an existing implementation for VocPrez 2 here http://vocab.nerc.ac.uk/collection/.
Another thing I forgot to mention in the opening comment is that the description is shown in its own column and if the length of the description string is longer than 80, it is truncated to only show the first 80 characters.
This layout should probably be limited to VocPub-related listings then. I would also prefer if the description was underneath the label as before.
We can either make this generic and have the listing table work with any profile or we can make it so that the listing table is only shown for Vocabularies listing and not for the other subsystems.
I would think this is best as a generic pattern, additional columns (or nested text) is driven by profiles. Would the other non vocpub pages not render the same in the current case where they do not declare additional properties?
If I've understood correctly this would reduce the number of patterns for rendering tables.
As this PR is now, the extra columns that are VocPub-specific have been hard-coded into the ItemListView component for all listing pages, so for pages that do not need these columns, they still display with no content.
Features like this need to account for all cases before modifying templates that are used across the application.
If the profile will dictate what properties will render as columns, then what predicates should the frontend look for (similar to how we use altr-ext:hasLabelPredicate etc)?
It would be sh:path, sh:inversePath, sh:sequencePath (how to display sequencePath I don't know - show >1 predicates?)
Alternately, as the listings endpoints only return URIs with classes, labels, description, and explanation predicates, you could assume anything returned in addition to these should be interpreted as an additional column / nested text. This would break if someone did want to display any of these properties as additional columns / nested text though
Hi all, thanks for the feedback. I've moved the table listing component into a vocab specific component for now in this commit https://github.com/RDFLib/prez-ui/pull/48/commits/a4c0b0751e14634231a69573b1d5de974e8643ce. Only VocPrez uses the table listing component.
SpacePrez and CatPrez listings now show the listing as they did previously.
We can look to improving this later on with the use of profiles, but that requires some thinking and design. It'd be good if we can settle on the current basic but working implementation before moving to a better and more sophisticated implementation.
I need to merge this in as I need the table-based listing for vocabs in the ISO VocPrez instance up at https://iso.dev.kurrawong.ai/ for a demo Wednesday next weekl. Will need to patch anything that goes wrong!
Displays the additional metadata defined in the updated VocPub profile made in https://github.com/RDFLib/prez/pull/102 for items listing page. This is displayed in a table with client-side ascending and descending alphabetical sorting.
Before and after screenshots.