U4-5722 - Set max/min items allowed in a grid row configuration area

Created by Matt Brailsford 30 Oct 2014, 15:12:15 Updated by Sebastiaan Janssen 24 Oct 2017, 07:34:08

Tags: Unscheduled PR

Subtask of: U4-9609

When configuring a row area, have the ability to set a max/min number of items in a cell.

Comments

Per Ploug 30 Oct 2014, 23:04:38

Config supports it, but UI doesnt atm, is this a common scenario?


Matt Brailsford 31 Oct 2014, 07:22:20

Min maybe not so much, but if you are producing a fixed grid layout, where you only one them to put 1 item per cell, then max is definitely handy.


Peter Gregory 09 Mar 2015, 05:15:11

I have just put in a PR to allow the user to set the max. I may have approached it differently than the config. https://github.com/umbraco/Umbraco-CMS/pull/651


Shannon Deminick 19 Mar 2015, 04:06:56

Unfortunately not enough time to get this in to 7.2.3, have assigned to @Per.Ploug as he's more familiar with this part of the code


Mark Bowser 02 Oct 2015, 18:07:05

I need this and tried out the code in Peter's pull request. Works awesome! Looks like there's a merge conflict keeping it from the core. Just poking at this so it doesn't get forgotten. :)

Thanks, Peter!


Stefan Kip 21 Dec 2015, 14:25:31

I'd really like this as well!


Nik 04 Oct 2016, 10:39:44

@pploug I've submitted an updated pull request for this feature taking into account comments here and on the original one. I've also updated for the latest version of the grid.

https://github.com/umbraco/Umbraco-CMS/pull/1506


Robert Ghafoor 05 Apr 2017, 20:21:35

Any updates on this ?


Nik 30 Jul 2017, 01:34:55

@pploug & @Shandem I've updated the pull request to the latest version of Umbraco with the hope it will encourage it to be included.


Stephan 16 Oct 2017, 15:28:34

so, have tested both the original PR at https://github.com/umbraco/Umbraco-CMS/pull/651 and the revised PR at https://github.com/umbraco/Umbraco-CMS/pull/1506 - with the revised one, I can confirm that I can set a max on items, and then the "add content" option will disappear and one cannot drop content either.

it's been reported by many as working, and by my tests it works and it all seems clean enough. Proposing we merged.


Stephan 16 Oct 2017, 15:30:39

OK, the PR we want to review is https://github.com/umbraco/Umbraco-CMS/pull/2247


Geoff Beaumont 16 Oct 2017, 15:41:08

Any chance of the minimum as well? It's actually a very common scenario (example: if you add a three column grid row, you don't want content in two columns but nothing in the third).

I can't think of a grid based site I wouldn't want this on!


Stephan 16 Oct 2017, 16:44:40

Well I am currently going through a number of some quite old PRs, the idea being to get them merged and clean the queue -- not to spend time expanding their scope. The current PR does not include support for a minimum. We are going to merge it "as is" but I totally understand the need for minimum -- feel free to create another issue (and a PR!).


Robert Copilau 17 Oct 2017, 11:19:17

Great job guys, tested the feature and works as described, merging :).


Priority: Normal

Type: Feature (request)

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.2.0

Due in version: 7.7.4

Sprint: Sprint 70

Story Points: 1

Cycle: