erikjanwestendorp / Our.Umbraco.Domains

Umbraco package which gives a simple overview of used domains.
5 stars 1 forks source link

Rethink the location in the Settings tree #6

Open stefankip opened 3 years ago

stefankip commented 3 years ago

Hey there!

At this moment the Domains item in the tree is at the top, right above Document Types. I think developers are used to having the Document Types item at the top and let's face it, Document Types are the most important inside the Settings section, right? It might be better to move the Domains items right above or underneath the Languages item?

ronaldbarendse commented 3 years ago

Having it right below Languages would indeed make most sense!

erikjanwestendorp commented 3 years ago

@stefankip @ronaldbarendse Thanks for your suggestion! I definitely agree that it is more beautiful to have it above or underneath the Languages! I labeled it as Help wanted, It would be great if you or someone else wants to work on it :-)

stefankip commented 3 years ago

I think it's a matter of adding a SortOrder property to the Tree attribute: https://github.com/erikjanwestendorp/Our.Umbraco.Domains/blob/db4ddff8bb0739971fafd984fe1999ad7435badd/Our.Umbraco.Domains.Core/Trees/DomainTreeController.cs#L15 The question is, what number we should provide ;-)

ronaldbarendse commented 3 years ago

Looking that up in the Umbraco source code is the easy part, but as Umbraco doesn't leave empty sort orders between Languages (11) and ContentBlueprints (12), picking the 'right' one is a little harder.

If it's set to either 11 or 12, the actual sorting will depend on the tree title translations, because IIRC that's used if the sort order is the same... The best option is to use 12, as that positions it either below Languages or otherwise as last item (assuming Umbraco doesn't add new trees or changes the sort order). The safest option is to use e.g. 100, so it's always last 🦺