Closed mariongalley closed 1 year ago
@mariongalley @KDuerden
End of week update: This ticket has the highest complexity out of the current in-progress tickets (the rest of which are now complete but not deployed).
We can change the input type to a default multiselect field, but this will change the UI on most browsers and looks pretty clunky. I'm currently looking into libraries that will provide a nice UX. I believe that we have used Select2 in Grantnav, but most of the current design patterns won't work neatly with the dashboard.
I'm hoping to draft some examples next week that I'll try to share by screenshot.
Thanks @Lathrisk - happy for the other tickets to be deployed whenever you are.
For this one yes if you can show us how it will look and give us the option to test in a dev environment that would be brilliant.
@mariongalley @KDuerden This is a very early example of a library. It has quite plain styling, and uses vanilla javascript (so doesn't introduce any heavier dependancies like JQuery to the codebase as with libraries such as select2 etc).
The default styling is shown and then with 1 selection, and multiple selections. It would make most sense to style both with the same library but with different settings if you're happy with the appearance of this one. The box will expand as more items are selected in the filter.
This looks really good. @Lathrisk How does it appear when you're navigating through the list to select publishers? Does it look like a drop-down similar to its current iteration?
@mariongalley Yes, the dropdown looks similar (probably not identical). The screenshot is below. I've also updated the sort drop down to match the formatting so there is more consistency.
@Lathrisk Question from Katherine - will selecting publishers result in a URL that can be saved/shared or, as it does now, will it not have a specific URL for the publisher(s) selected?
@mariongalley, ~there is no change to the URL at present~. I thought I'd test how easy this was to do and give you an estimate, and in the process finished the work (not thoroughly tested though). Is this a feature we'd like to keep?
Is this a feature we'd like to keep?
Yes please!
@mariongalley @KDuerden I've made some final changes to this (and wrapped in #94).
I'll try and get a live demo version deployed soon. I have a call with @michaelwood at 3.30pm to talk about the dokku deployment and will update once we have a working demo URL.
@mariongalley @KDuerden We've now deployed the filter updates to a demo page - http://qualitydashboard-test.360dokku1.vs.mythic-beasts.com/publishers#
Edit: This includes the favicon update as well.
😮 Typing to search for a publisher works past the first letter now!
⭐⭐⭐⭐⭐ from me
I tested adding as many as I could until I got click-fatigue. I assume there's no limit in principle to how many you can select @Lathrisk ?
@KDuerden Do you think we need a clear all button, or are people unlikely to select more than a handful of publishers? My guess is people won't select more than 2 or 3 generally as after a point you can't really "see" them side by side.
Here's a couple of questions I don't know the answer to:
For what it's worth we don't persist the selected publisher or update the headline stats in the list view in the live dashboard, so this would be a totally new requirement. But I'm curious what others intuitions are and if we should consider doing this (and raise a separate issue) or leave it.
This is great, it's so much easier to use for single selection, as well as the filtering working really well!
Yes I think we should have a clear all button, if possible.
@mariongalley @KDuerden These are certainly all options (with different levels of effort).
We might be able to persist publishers throughout navigation, but it will definitely add some complexity and I don't think we'd want to muddy the URLs for the single publisher pages. That would mean either storing the selected publishers in the app or in local storage. It's definitely got some overhead. A copy change is easy though (i.e. Back to All Publishers).
A clear all button should be fairly straight forward. The library I have used doesn't have a clear all function for multiselect, that I can see. I think we would need to implement our own outside the drop down. I've attached a screenshot as an example of how that might look.
I'm happy to go with:
@Lathrisk On my questions above, do you have any thoughts, development effort aside, on how you'd expect function like this to behave?
@mariongalley
I assume there's no limit in principle to how many you can select
No limit. You could select them all if you wanted to.
would you expect to be taken back to your selection when you click "Back to Publishers"
Yes, probably. I think it would be more intuitive if it went back to the selection and I think we could do this with a little effort. The copy change is a quick and easy fix but we can likely persist selections throughout the app and navigation. As @KDuerden mentioned the back button will still work, but it might be frustrating to use the interface and lose your selections when navigating through a list of filtered publishers.
would you expect the headline stats to update to that number of publishers and associated stats
I think this would be a nice touch, and makes the filtered view more informative.
Clear all button (which it looks like will apply to all the filters not just the publisher filter, that's fine I think)
Yes, at present we just have the sort and the publisher filter so it will only clear the publisher list, but if we add others then we will need to think about the behaviour. I think clearing all filters would make sense in that scenario.
Could you also change the copy so it's "Select publisher(s)" instead of "Filter by publisher" so it's clear you can select multiple?
I think that is a good idea.
I'm happy to go with:
- "Back to all publishers" copy amend on the individual publisher page
- Clear all button (which it looks like will apply to all the filters not just the publisher filter, that's fine I think)
- Could you also change the copy so it's "Select publisher(s)" instead of "Filter by publisher" so it's clear you can select multiple?
@mariongalley Are we happy with these solutions to resolve this issue? And open new issues for any future improvements?
I can look into preserving the filtered publishers when navigating back from a single publisher but it might take a little longer - perhaps ~0.5 days worth of time as a rough estimate.
EDIT: With the new clear button I'm not currently sure how we are handling updates to the design system and whether these changes should be integrated into the design system as well as the dashboard. We can discuss this at the next meeting, and I can find some time next week to discuss this with @michaelwood.
I can look into preserving the filtered publishers when navigating back from a single publisher but it might take a little longer - perhaps ~0.5 days worth of time as a rough estimate.
Yeah I reckon let's open separate issues for preserving selected publishers and for updating headline stats.
@Lathrisk Are you able to complete the last few things we agreed above (so not persisting selected publishers) before moving on to widgets? We'd like to get this live relatively soon.
@mariongalley This work has been done and is in review, @michaelwood has suggested that the dashboard needs a selenium test for the filter functionality and I'm hoping to get that finished off today, and hopefully deployed, before I go on leave. I'll update with progress.
Wonderful, thank you. Please can you deploy it to the dev environment first for us to test @Lathrisk ?
@mariongalley I can push the changes to the dev site without the test - http://qualitydashboard-test.360dokku1.vs.mythic-beasts.com/publishers
I can write the selenium tests while you review the dev environment.
Thank you - it looks good to me @Lathrisk, except for the copy update on the filter hasn't been done so it would be "Select publisher(s)" instead of "Filter by publisher"
Katherine also happy with the Clear All button functionality. Happy for this to go live whenever the selenium tests are ready
This has now been deployed.
Multiselect publishers in Dashboard