-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make collection filters discoverable #2750
Comments
Big +1 to this feature request. This is one of the biggest things I feel is missing, and not straightforward to implement yourself. Additional features that would make this even better:
|
I think this is an excellent idea. As I started reading, I was thinking about the placeholder being a good solution, but when you've got several it's not so nice. But I wonder if we can randomly show a different filter in there, or something! Tooltips are a bit easier to achieve now, so I think writing our own here would be the right approach to take. We could then use this to provide tooltips in other areas of the project where it makes sense. A good place to start, if someone wanted to pick this up, would be to see if we've got the right sort of data accessible in the view to populate a tooltip, and then start exploring a tooltip implementation we could ship as part of Administrate (it shouldn't involve any dependencies, use modern standards and as little JS as we can get away with.) @kevinkimball, thanks! Those are good ideas too. Could you create different issues to track those? Especially so if you could do a mockup like @jared-thoughtbot did. |
You can add collection filters to a dashboard and then use them in the search bar on the index page. eg. `email:[email protected]` However, these collection filters are not discoverable. You have to know about them already to know how to use them. This change introduces a tooltip which lists the available collection filters, allowing all users to discover what is available. Closes #2750
You can add collection filters to a dashboard and then use them in the search bar on the index page. eg. `email:[email protected]` However, these collection filters are not discoverable. You have to know about them already to know how to use them. This change introduces a tooltip which lists the available collection filters, allowing all users to discover what is available. The tooltip icon is `question-mark-circle` from [heroicons] (MIT licensed) We use [anchor positioning] with a [polyfill] to position the [popover] by the tooltip. Some basic JavaScript is introduced to show/hide the popover on hover to ensure the tooltip behaviour works as expected for a tooltip. I've had a first pass at the design, borrowing from existing styles. But I don't feel strongly about it if we want to go in a different direction. Do we want an option to disable the tooltip even if there are collection filters? [heroicons]: https://heroicons.com/solid [anchor positioning]: https://developer.mozilla.org/en-US/docs/Web/CSS/position-anchor [polyfill]: https://github.com/oddbird/css-anchor-positioning [popover]: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/popover Closes #2750
Current state
You can add collection filters to a dashboard and then search using them using the search bar on the index page.
Problem
These collection filters are not discoverable. You have to know about them already to know how to use them.
Potential solution
Add a tooltip next to the search box when collection filters are provided. Probably with an option to disable the tooltip in case some people do not want it.
We could dynamically populate the content based on the collection filters. Eg.
I appreciate we might not want to introduce tooltip code and assets just for this one thing. I don't know if there are other issues / future features on the roadmap that could also benefit from tooltips?
Alternatives
The text was updated successfully, but these errors were encountered: