ContentHubUI: Limit discipline to max 10

Description

Acceptance Criteria

1. Limit disciplines to max 10


2. If the user tries to select more show the message “You can select up to 10 disciplines”
Styling of the message should be the same as this message:

Acceptance Criteria

None

Activity

Show:
Jelena Milinovic
September 22, 2020, 2:52 PM

, , where we ended up on the parent discussion?

Did we conclude that selecting a parent discipline counts as only 1 selected discipline (we are not counting children as today)?
And If any of the children is selected, the parent is also selected (2 disciplines are selected in this case)?

Jelena Milinovic
September 22, 2020, 2:53 PM

yes that is what I thought. Since we are using the same UI in both sharing and searching UI for discipline selector, showing message there makes more sense for me!

Frode Petterson
September 23, 2020, 7:33 AM
Edited

What I think will be the main issue here is if someone has selected a discipline and we decide to introduce sub-categories to it later(which I see very likely happening). To support this having selected a parent must mean either all the children being selected implicitly or that the parent is simply a standalone category, meaning if you filter on one of the children you will not get the parent - The later is what I believe we want. Because when we add a new sub-category we cannot automatically tag content with the parent category with the new sub-category.

To summarize: If you select a parent none of the children should be selected. If you select a child the parent is automatically selected.

Erik Langhaug
September 23, 2020, 10:53 AM
Edited

The behaviour discussed will be addressed in a separate issue, and I very much agree with Frode’s latest comment in that a parent category should be a standalone category, meaning a separate option that does not mean the same as having all the children selected.

For the scope of this specific issue; I have pushed changes implementing the appearance of a error message tip next to a checkbox when attempting to select another discipline after the maximum amounts has already been selected. I’ve added a new UI string to core h5p-php-library

Pål Jørgensen
September 23, 2020, 12:59 PM

Wonderful!

Assignee

Erik Langhaug

Reporter

Frode Petterson

Labels

Funding

None

Code reviewer

Pål Jørgensen

Released

None

Time tracking

8h

Sprint

None

Priority

Medium
Configure