RDFLib / prez-ui

BSD 3-Clause "New" or "Revised" License
10 stars 7 forks source link

Updated prez lib types #139

Closed recalcitrantsupplant closed 9 months ago

recalcitrantsupplant commented 10 months ago

for review

jamiefeiss commented 10 months ago

Thanks for this. I want to keep the types separate between the component-related types for props in prez-components vs the types used for prez-lib.

Also, just wondering why PrezList is a separate type compared to PrezUIListPage? Could displayProperties be merged into PrezList rather than separating the types out?

recalcitrantsupplant commented 10 months ago

PrezList was for prez-lib; PrezUIListPage was for one of the other libraries (prez-components? @hjohns) - so that was the reason for separation.

The intention with displayProperties was to allow specification of which properties should be displayed on the page (whether or not there is data) - kind of the opposite of a filter. It would be driven from SHACL profiles. It would be needed on PrezList and PrezItem. If it is on PrezItem, it will be inherited to PrezList, and would mean each individual item in a listing could have a different set of displayProperties - which would be a confusing level of flexibility we don't want. Specifying it at the page level avoids this. As an alternative, we could add a third class which PrezItem and PrezList inherit from which has displayProperties on it.

jamiefeiss commented 10 months ago

Okay sounds good. I'd prefer that types were separated so that the types for component props are in prez-components and other types are in prez-lib. I'm happy to do that after the PR