leekelleher / umbraco-contentment

Contentment for Umbraco - a state of happiness and satisfaction
https://marketplace.umbraco.com/package/umbraco.community.contentment
Mozilla Public License 2.0
157 stars 72 forks source link

Made the umbraco content properties order by name #334

Closed prjseal closed 1 year ago

prjseal commented 1 year ago

This change makes the Umbraco Content Properties Data List Source order by name to make the result much more usable.

As you can see, when not ordered alphabetically they are all over the place:

image

prjseal commented 1 year ago

As discussed on Twitter, we could configure a field to make this optional

Here is a link to where it has been done before in the enum data list source

Field defined here:

https://github.com/leekelleher/umbraco-contentment/blob/e190aa3b279106e375b5f31589d52f36815b0a18/src/Umbraco.Community.Contentment/DataEditors/DataList/DataSources/EnumDataListSource.cs#L95

Field used here:

https://github.com/leekelleher/umbraco-contentment/blob/e190aa3b279106e375b5f31589d52f36815b0a18/src/Umbraco.Community.Contentment/DataEditors/DataList/DataSources/EnumDataListSource.cs#L155

prjseal commented 1 year ago

Also discussed on Twitter, it would be good to have an option to include the Name field or not.

prjseal commented 1 year ago

I was able to add the option for sort alphabetical and include name in my local version. I will add it to the PR later.

image

image

prjseal commented 1 year ago

Hi Lee, I've pushed the configuration changes. Would like to hear your thoughts.

leekelleher commented 1 year ago

HI @prjseal, all looking good. I've made a couple of amends to the code (see commit 3405a76edc439885dc6244e5e1468bfc02c4f315), namely:

If you're happy with those amends, then I'll merge it in. Thanks again! 🚀

prjseal commented 1 year ago

Looks spot on to me. I don't know how to change it from being a draft PR. Happy for you to merge it

prjseal commented 1 year ago

I've changed it from a draft to ready for review now. Hopefully that means you can merge it now.

leekelleher commented 1 year ago

Thanks @prjseal. I did an early dart on Friday, (hence my radio silence). All merged in now. Thanks again!

leekelleher commented 1 year ago

@prjseal I've just put a patch release out with this feature, Contentment v4.4.5. Thanks again!