Skip to content

Conversation

@sneridagh
Copy link
Member

@sneridagh sneridagh commented Sep 21, 2025

@davisagli Is there any reason why this hasn’t been implemented yet? I mean, it was there but not wired up… We need this for Seven, and eventually for Volto.


📚 Documentation preview 📚: https://plonerestapi--1947.org.readthedocs.build/

@mister-roboto
Copy link

@sneridagh thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@sneridagh
Copy link
Member Author

@jenkins-plone-org please run jobs

@davisagli
Copy link
Member

@sneridagh We intentionally removed it from the PR that added the site endpoint: #1465 (comment)

My reasoning was that it is an anti-pattern because the site data should be fetched once on the SSR load, and not every time new content is fetched.

There is a tradeoff because if it's only fetched on the initial load, it might get out of date if settings that affect the site data are changed later. So I can see the argument for making it available as an expander -- but I still don't like that it does extra work on every content request that isn't needed in most cases.

Can you say more about how you plan to use it in Seven and why it's not sufficient to use the separate endpoint?

@sneridagh
Copy link
Member Author

@davisagli I understand your point, that's why we should put some memoization in place, so if the attributes do not change, then you don't do the work again.

Why this can't be done in Seven? Because HTTP and how modern SSR works where all requests are isolated from each other. In Volto this can be done because Redux store. I don't want such a thing or poor man replacement in Seven.

In Volto are you aware that since the TTW settings that we are pushing in there, eg. you change the square images setting. It does not take place until you reload the whole app? This would fix it.

@sneridagh
Copy link
Member Author

@davisagli btw, the memoization, could you please help me with it? I'd like to have this soon, so Volto and the distributions can also benefit from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants