Closed JeffersonBledsoe closed 5 months ago
Name | Link |
---|---|
Latest commit | 988502d620bda767778c1baab6f8334b1a8fee69 |
Latest deploy log | https://app.netlify.com/sites/volto/deploys/654923ac4888620008572c05 |
Deploy Preview | https://deploy-preview-3737--volto.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
0 | 493 | 20 | 0 | 0 |
Details:
Merge branch 'master' into sort-controlpanel-by-title | |||
Project: Volto | Commit: 4cc3886c1f |
||
Status: Passed | Duration: 14:36 💡 | ||
Started: May 11, 2023 3:24 PM | Ended: May 11, 2023 3:38 PM |
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
Will sorting work for all languages?
Will the sort be within groups of control panels?
AFAIK if you are using the title they will be sorted by title, because p.restapi takes care of exposing the translated title in the relevant controlpanel. But I can provide some screenshot in some languages to check it.
We tried this in the past (in classic, I contributed to it), and it does not work, because of languages. People preferred to have the icon in the same place across languages than have them alphabetically ordered.
But we already fixed it some time ago in classic to have it sorted by title:
We should have it both in classic and volto in the same way. I don't know which one (I prefer have it sorted) but the same.
I do not know now the state in classic, but I agree that we should follow the same approach.
I updated the PR title to reflect that it's sorted within each group.
if you are using the title they will be sorted by title
@erral That was my understanding too, but I haven't verified this yet.
People preferred to have the icon in the same place across languages than have them alphabetically ordered.
@sneridagh My experience with multi-lingual sites is very limited, but I imagine most users would use a single language most of the time? I agree that it's not ideal having them move in cases when they do switch, but I can't think of another way right now for them to be logically sorted the other 80% of the time. I'll finish this PR off, can always revisit it :)
Here are the screenshots using the branch in this PR with Plone 6b3
So this works.
Hmm, why are there different numbers of control panels shown in the different languages?
Good question :thinking: I think that's because I didn't change the Volto language when testing this, I only modified Plone language, but I will check it again
Here we have the screenshots with frontend + backend both configured correctly with the same language.
The controlpanel differences in French are because of some controlpanels are directly coded in Volto and are not comming from Plone, so their category indicator must be translated into French in the PO/JSON file and it is not. If you check it carefully we have a category called Général
(coming from Plone) and the one below called General
which comes from Volto and it is not translated yet.
@JeffersonBledsoe can you add a changelog entry so that the build is green?
@erral I'll sort that shortly, but I've still some tests failing locally
@tiberiuichim Update the snapshot and did some more testing, all finished :)
@sneridagh Thoughts on including this in the Plone6 release?
@JeffersonBledsoe upss I merged your other PR related to the SSR control panel and now there is a conflict that must be resolved.
@sneridagh Thanks for merging that other PR! I've fixed the merge conflict here, just waiting for tests to run. Are you fussed about the import sorting that VS Code seems to have done, or want me to undo it for a cleaner PR?
I have reached my (very low) limit of comprehension about why Controlpanels.test.jsx is problematic :)
Doh, clear example of buried PR... should we resurect it? BTW, I took a quick look, so we are sorting by (English - not translated GS property) title? Also in classic?
@sneridagh I think we should do it. It sorts on the translated title (it's translated in the @controlpanels
API). It doesn't make sense to sort in English if we're displaying a different language.
Ok I just checked and the endpoint return the translations. @davisagli ok! let's do it.
The control panels within each group are sorted alphabetically