-
-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
contextual vocabularies #6236
base: main
Are you sure you want to change the base?
contextual vocabularies #6236
Conversation
✅ Deploy Preview for plone-components canceled.
|
I've run into this problem on one project, but I decided it was too risky to load all vocabularies with a context-sensitive path. For one thing, this means the results can't be HTTP-cached in cases when they are not context-dependent. For that project, I customized this action to check a setting with a list of vocabularies that are context-dependent. That way it's possible to opt in where it's needed.
|
@davisagli, Good point! Do you think your solution might be in Volto? With |
@mamico I think that would be okay, and fully backward-compatible. On the other hand, it might be nice if there were a way to mark a vocabulary as context-dependent when it is defined, and have plone.restapi & volto use that information. There would be a lot more details and moving parts to figure out for this, though. |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maintaining the list might suck, and not obvious for front-end/integrators that do not know about which vocabularies are contextual and which not.
Can we provide a default list of vocabularies at least? or defaulting to []
is for backwards compatibilities concerns? Maybe suggest a good known list of them for new projects? or the other way around, suggest the list by default, warn about it in the upgrade guide and suggest people to use []
if they want to be conservative.
Aside of this, LGTM.
Agree
We can look into the default vocabularies of
I had set the |
@mamico @sneridagh So a different and maybe easier to use approach here would be:
We need to keep in mind that there might be a core vocabulary which never varies based on the context, but an integrator needs to replace it with a custom version that is context-dependent. |
IMHO we are talking about acting in the serializer of schemes, like here: in other cases the developer has complete control of the vocabulary url. My plan:
I think both changes could be independent, without major breaking, and there are no needs for a new configuration. thoughts? |
@davisagli @mamico this is an interesting PR, how can we keep this going? |
Fixes #3216
When there is a contextualized vocabulary url in the schema, Volto must call it with the full path and not return it to the site root.
There is a risk, however, that this change may bring out problems hidden by the anomaly it solves.