plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
427 stars 575 forks source link

Navigation reducer should keep items extra-data sent from the navigation endpoint #5772

Closed tiberiuichim closed 4 weeks ago

tiberiuichim commented 2 months ago

The fact that this reducer is so limiting induces using bad development patterns when it comes to custom Volto navigation components. Developers will avoid to enhance the @navigation endpoint, for example, to pass extra information from the items, via extra behavior fields.

https://github.com/plone/volto/blob/4e5d508d97f438315b3477d166e26d42797875af/packages/volto/src/reducers/navigation/navigation.js#L33-L37

tiberiuichim commented 2 months ago

https://github.com/eea/volto-cca-policy/blob/1d49d2e3c18f37ed9ae642c013c3a94c1387bcd4/src/customizations/volto/reducers/navigation/navigation.js#L32-L40

Hrittik20 commented 2 months ago

Hi @tiberiuichim, I see that the earlier PR is closed. If this issue is still open then I can make a PR for it.

stevepiercy commented 2 months ago

@Hrittik20 please see item 4 in Things not to do. You are welcome to claim this issue.