Skip to content
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

Add values_order key to getVocabularyValues for retaining manual sorting #160

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JeffersonBledsoe
Copy link
Member

@JeffersonBledsoe JeffersonBledsoe commented Mar 5, 2025

Adds a values_order key to the return of getVocabularyValues so that we can un-sort the titles should we want to.

Fixes #161 without breaking the existing sorting

@mister-roboto
Copy link

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

@JeffersonBledsoe JeffersonBledsoe changed the title Add test to prove manually sorted titles is broken Add values_order key to getVocabularyValues for retaining manual sorted Mar 5, 2025
@JeffersonBledsoe JeffersonBledsoe changed the title Add values_order key to getVocabularyValues for retaining manual sorted Add values_order key to getVocabularyValues for retaining manual sorting Mar 5, 2025
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of returning 2 different structures (one with the original order and one sorted by title) would it make sense to support vocabularies that specify their own custom sort function as an attribute? (which could be a no-op)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants