Mike-Heneghan / ALISS

ALISS (A Local Information System for Scotland) is a service to help you find help and support close to you when you need it most.
https://aliss.org
0 stars 0 forks source link

Info for user if they try to add a fourth category when adding a service. #48

Closed Mike-Heneghan closed 5 years ago

Mike-Heneghan commented 5 years ago
screenshot 2019-03-08 at 12 54 47
Mike-Heneghan commented 5 years ago

At the moment after selecting 3 categories the checkboxes are't ticked although the seleted categories continue to populate.

There is also not any pop-up style explanation of why further categories can't be added.

Mike-Heneghan commented 5 years ago

Additionally any categories added after the first 3 will be added to the "selected categories" and won't be cleared resulting in situations as below:

screenshot 2019-03-08 at 13 05 26
Mike-Heneghan commented 5 years ago
screenshot 2019-03-08 at 13 08 58
Mike-Heneghan commented 5 years ago

Successfully amended the js code so that when the limit of categories is reached the "You have selected the following categories:" field doesn't continue to be populated.

Now need to have a message or info for the user that further categories cannot be added.

Mike-Heneghan commented 5 years ago

Tried mocking up a solution to the issue of a user trying to add a fourth category. Could create a tooltip style pop-up on the selected field and explain there is a max of 3

screenshot 2019-03-08 at 13 55 56
Mike-Heneghan commented 5 years ago

Using the data-tooltip dyamically doesn't seem to be possible.

Need to change the way I go about it.

Mike-Heneghan commented 5 years ago

The custom tooltips on the checkboxes had issues as they could not be dynamically hidden or shown based on the number of categories selected. This was due to the fact they were compiled in the static files and the attributes were not accessible in the dom?

Wasted a bit of time trying to get them to work although as a simpler alternative dynamically added an <h3> with info for the user about trying to add a third category as per: https://drive.google.com/file/d/1_Gdg6iyppBXxh_sYesAvMoD1KsjVTWKz/view?usp=sharing

The intention was to have the code that appends the <h3> hide and show the tool tips on the checkboxes but rather than use anymore time for the feature I thought it might be best to go with the current improvement.

Mike-Heneghan commented 5 years ago

Merged into master