-
Notifications
You must be signed in to change notification settings - Fork 2.8k
WIP: Language sortorder #19515
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
base: main
Are you sure you want to change the base?
WIP: Language sortorder #19515
Conversation
Hi there @bjarnef, thank you for this contribution! 👍 While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution. If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
@iOvergaard @nielslyngsoe @leekelleher do we have any concept to update sorting in a collection? Currently I think we only a have sorting of children in context menu (not sure if it consider paged items), simple collections/lists like domains and approved colors .. and furthermore properties like here (+ tabs): Line 194 in 89b2120
How would we handle this in a collection? Line 113 in 89b2120
Most projects we probably only have a few language, but some has 20+ languages. Currently I think child nodes in a collection/list view is only sortable from tree context actions - could we integrate this in someway in a collection itself? Something I considered: If sortable mode is enabled, can the checkbox in table be replaced with the draggable handle instead? But it would of course only be sortable within the same page something similar to this https://dev.to/gaisinskii/draggable-table-row-with-vuejs-vuetify-and-sortablejs-1o7l Perhaps a entity action to move position as suggested here: https://ux.stackexchange.com/a/111996 |
@bjarnef hi! Thanks very much for your PR to start sorting languages as per the issue link #18098. It looks like one you will want HQ input on as you have requested. In terms of the actual code change, I'll check with HQ if they have initial feedback. We might want to consider the additional points as separate tasks to keep this one tightly focused. Once confirmed, if the code is ready for review myself or one of the Core Collaborators team can check and validate it. Cheers, Emma |
@bjarnef actually, just spotted this is in draft - I'll wait on this to be moved from draft to ready to review if that works, but in the meantime, if there is anything you need to help please let us know. Thanks :) |
@emmagarland thanks for following up on this :) We have sortable feature on simple lists like domains and approved colors. My suggestion is that we can have a button to enable sortable similar to properties in content type or in block grid. @madsrasmussen recently added some changes here, but I still we may need a way to sort table rows inside To simplify this, I think this would be useful: umbraco/Umbraco.UI#1118 Sorting of rows within a single page in table may not be too complicated. So the questions are mainly about the UX/UI part to update sort order via |
Just a quick thought on this before you go too far - would it be enough, or even better, here to just ensure the languages are ordered alphabetically? I completely agree that created order which seems to be the current behaviour isn't very useful. But it would seem that alphabetical would be quite reasonable, and maybe even easier for editors than some custom order that the administrator thought would be best. Also less work for the administrator in that without doing anything the editor will get a good experience when selecting languages. If so, that could be implemented more straightforwardly without any UI updates or additional fields; nor updates to downstream packages like Deploy and uSync. |
Sorting by name is not what editors want. They most of the time have a main language or a specific order they would like the languages to show up in the dropdown when working multi lingual sites. So I think a user specific sort order is best - in my opinion :) |
I agree alphabetically may not always be the best option (and also mean it would sorted differently depending on backoffice language - I think is still an issue in Settings section, because the tree group headers are not sorted identical in Danish and English, which is confusing if one if use to the order: content types, templates, third party in tree, see this old issue #4285). E.g. for dictionary items some may prefer field for German is sorted first, but if sorted alphabetically it would be sorted as (D)eutch 🇩🇪, (G)erman 🇬🇧 or (T)ysk 🇩🇰 (so it may not always appear first - or in same order). The regular sort action on tree nodes has the options to drag nodes in custom sort order and a trick, which sometimes is overlooked, is that the nodes can be sorted alphabetically by clicking the table header. Perhaps we need a bulk action as well on collections which support For example something like this: |
Prerequisites
Discussed in #18098
Description
Initial PR to add sort order on language similar to e.g.
Domain
. The migration will most likely be moved to v17 (or later).I noticed the model for domain if named
UmbracoDomain
andDomaintDto
, but for language justLanguage
andLanguageDto
.Domain
would probably better align unless it collide with another model and since it is public a rename would be a breaking change.