twinejs icon indicating copy to clipboard operation
twinejs copied to clipboard

Idea: passage search highlighter should show number of occurrences of search term as a badge on the passage

Open webbedspace opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

I think the passage search highlighter should let you see how many occurrences of a search term are in a given passage at a glance. This would let you see how "dense" the term is within the passage and, if you're doing a search to refactor or rewrite something, give an idea of how long that would take.

The 2.3 search already listed the number of occurrences in each passage, but in a textual list format. It was hard to relate the list of passage names to the actual passages in the story map. A passage is uniquely identified both nominally and spatially in Twine: authors identify passages based on their position just as much as their name. Thus, I think the number needs to be on the passages themselves to provide the greatest clarity.

Describe the solution you'd like.

See this crude mockup as an example. This avoids covering up the tag colour bar too much. Triple-digit occurrences could be reduced to just "99+". image

Describe alternatives you've considered.

You could alternatively try different colouring levels (thicker yellow colouring, for instance) to give a looser approximation of how many search terms are in the passage, but I think this is the most helpful approach.

Additional context on this suggestion.

No response

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.

webbedspace avatar Jun 15 '22 10:06 webbedspace

I like the badge idea but yeah, need to explore how that would look and how to make it accessible to screen readers/other AX tech. I think altering color shades alone is a no-go for AX reasons.

klembot avatar Jun 16 '22 02:06 klembot