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
155 stars 70 forks source link

No validation on the Content Picker overlay if Max Number of items is configured #59

Closed marcemarc closed 3 years ago

marcemarc commented 3 years ago

Note: for support questions, please use the Umbraco Community forum. This repository's issues are reserved for bug reports and feature requests.

Hey, Lee, this is a great package #h5yr, etc but I've noticed a little thing

What is the current behaviour?

When I configure A Data List Property Editor, with Data Source 'Umbraco Content' and List Editor 'Item Picker' - and I configure the Item Picker to be restricted to 4 Maximum Items.

image

Then when I use the picker, if 4 items are already picked, then as expected I don't have the 'Add' button to enable further items to be picked - all good.

But when there are less than the maximum items, and I click the Add button - I am permitted to add as many items as I like.

ContentmentPickerMaxItemsBug

What is the expected behaviour?

I'd expect if more than the maximum items were selected that the 'Select' button at the bottom would be disabled

image

and perhaps when a restriction is in place there might be a little bit of text at the top that says 'you have picked 3 items of a possible 4'

image

which when you go over the number of picked items, flashes red repeatedly spins and makes a klaxon noise?

Finally (or is this a different issue?) would the editor to expect the items they had picked previously to be checked on the overlay?

What is the motivation / use case for changing the behaviour?

So we can restrict the number of items picked by editors, with feedback to let them know they have picked tooooo many. (eg we could let them pick more and only use the first 'max items' but that would cause confusion.

Please tell us about your set-up:

Anything else?

leekelleher commented 3 years ago

Thank you @marcemarc, I shall look into this! Excellent bug report detail too! 🌟

re: "Modelsbuilder is turned Off" - good hint! I shall add this to the issue template.

leekelleher commented 3 years ago

Good news, this has been fixed in v1.1.2 patch release - out now!

Thanks again for raising this bug.