twinejs
twinejs copied to clipboard
2.4.x Allow filter passages by tag
Is your feature request related to a problem? Please describe.
Tags are a great tool for organisation, but with only limited colours available, and no way to see uncoloured tags on the story map, it can be hard to pick out all the passages with a particular tag. You can search for tags by name, but that still requires you to remember tag names, and doesn't allow multiple tags to be filtered for at once.
Describe the solution you'd like.
Add a way to highlight all the passages containing a particular tag outside the search.
My ideal solution is that you open the "Passage Tags" dialog, and then click a tag to highlight all tagged passages on the story map.
Describe alternatives you've considered.
The "Find and Replace" dialog searches passage tags in addition to content, but does not allow you to search only tags, and doesn't allow you to search multiple tags at once (searching two tag names does not highlight passages with both tags). An alternative is to allow the Find/Replace to search only tags (with another checkbox) and for multiple tags at once, but selecting them on the Tags dialog seems more obvious.
Additional context on this suggestion.
This is a parallel feature to the story tag filter on the library.
Presubmission checklist
- [ ] I am interested in working on code that would implement this feature request. (This is not required to submit a suggestion.)
- [X] I have done a search and believe that an issue does not already exist for this idea in the GitHub repository.
- [X] I have read and agree to abide by this project's Code of Conduct.
The spirit of this suggestion makes sense but the highlighting part is potentially tricky. If you can highlight by both text search and tag at the same time, what does that look like visually? Doing it from the find & replace dialog feels funny to me at first glance--to me, that dialog is all about passage text and names.
Oh dear, I did a bad test and convinced myself that it already worked with the find & replace, but it doesn't. In that case I would double down on the highlighting from the Tags dialog.
As to what happens if you do both, I don't think it would be an issue to just have both highlight in the same way, that's a user choice to do that search. Alternatively, highlight with a different colour, or have one clear the other.