Closed TRexStark closed 3 years ago
Hi @TRexStark - my understanding is this is the expected behaviour, and the on-save validation will notify the user that they have added an invalid number of blocks.
However... I think it makes better sense to not allow adding extra blocks at all - if these were complex blocks with lots of fields, it's not a great user experience to spend the time adding the content to then have it discarded. Better to disable the add button when the limit is reached (and/or provide visible feedback when the list has a min or max limit).
Pinging @nielslyngsoe for his thoughts.
You're right @nathanwoulfe ... Like NC, I think the validation limit should kick in earlier
I agree it would be great to hide "Add" button when the maximum is reached. This would be consistent with other pickers. Of course if you have added 10 blocks and edit maximum to 5 in configuration, you would get validation error on save and have to remove some to save and add new blocks.
Thanks to everyone for bringing their thoughts to the table.
The concept is in general to make Content Editors work freely. As with a text-field the user can paste in larger texts than allowed, and afterward, they correct it to fit the required amount. The user is notified by a message telling them that they have too many characters. The same principle goes for lists. A list can contain more items than it's allowed to, enabling Editors to write new Blocks while keeping the old for reference. This also allows the editor to paste one or multiple new entries for then to remove the ones they don't want for the publishing to succeed. They can save the content that exceeds the limit for then to make the decision later. In the same manner, the user is supposed to know that they have exceeded the required amount so they become aware while working with the content.
This thread has made me aware that we do not practice this concept for Nested Content. Neither did we implement it the right way for Block List.
For the Block List property editor, the issue is that we are supposed to see this message when the requirements are not meet, no matter if the user has done any actions. (as in before the user tries to save or publish etc.)
I hope you all find this reasonable and that you find the concept of begin able to work freely right for Umbraco, though this is not a consistent experience jet. We will make that happen.
We should create issues for each property that does not follow this concept to ensure the future versions will be consistent.
Thanks :-)
Thanks @nielslyngsoe, that all makes good sense - I'll update the pr to display the text rather than hiding the button.
@nathanwoulfe thanks. I'm realy happy that this is being fixed, thanks!
@nielslyngsoe pr is updated, let me know if you're happy with the approach
Fixed in this PR - https://github.com/umbraco/Umbraco-CMS/pull/8983 due for release in 8.7.1
Is this merged to version 9 @nielslyngsoe @warrenbuckley
When creating a block list editor (following the documentations), I added 0 - 1 in the Amount range fields. However, I was able to add more than one Block into the page.