esmero / strawberryfield

A Field of strawberries
GNU Lesser General Public License v3.0
10 stars 5 forks source link

Add extra configurations to Semantic Breadcrumbs #314

Open DiegoPino opened 5 months ago

DiegoPino commented 5 months ago

What?

Right now our ADO breadcrumbs are very flexible but sometimes when you have multiple levels of relationship between children and parent you might want to be able to choose to e.g exclude from breadcrumb a few predicates or the opposite, force breadcrumb to only work on a few.

Because breadcrumbs use one of our computed field here https://github.com/esmero/strawberryfield/blob/5319d100356b0dfc02b93c18646f7bbaa41c9db0/strawberryfield.module#L216-L229 that fetches any ADO to ADO relationship, one option would be to allow computed level sub properties So a getValue() directly on the field will get me all, but another accessor with arguments would allow me to filter out Another option is to have a second computed one. We could of course simply use this via normal field/data logic (kinda bring out of the class the code and query the JSON directly) but i like computed fields because they abstract and hide complexities and allow us in the future to improve the logic without changing the calling code.

Anyway. This is needed for 1.4.0 before the release