plone / plone.app.querystring

Provides an queryparser, querybuilder and extra helper tools, to parse stored queries to actual results, used in new style Plone collections
https://pypi.org/project/plone.app.querystring/
2 stars 26 forks source link

Include vocabulary token #107

Open jackahl opened 2 years ago

jackahl commented 2 years ago

fix for #106 merge https://github.com/plone/plone.restapi/pull/1403 first.

mister-roboto commented 2 years ago

@jackahl 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!

jensens commented 2 years ago

@jenkins-plone-org please run jobs

jackahl commented 2 years ago

@jensens @ksuess proposed to change the returned data to "token": {"title":title" instead. In principle I agree with this idea, as it is more consistent with the way vocabulary terms are supposed to work. I agree in principle, but as already discussed this would mean quite a major change. What would preferred course of action? Go for my "stop-gap" solution first or directly implementing the token as the dict key?

jensens commented 2 years ago

So, @ksuess is right, this would be clean: No value at on the declarative level, lookup when needed at the server side. Since the original implementation is wrong and in use now, this would be a really breaking change with a lot of implications, also in bunch . I would rather keep the existing code and implement a new method, then changing piece by piece the other parts, but in non-breaking way, deprecating the usage of the old way.

I think we first solve the problem the "stop-gap" way. The other solution needs way more effort and probably something like a PLIP summarizing the whole.