Repository navigation
feat: search for tags in the global search and enhance the visually reasoning for matching results - #3558
Conversation
|
@tbsbdr fyi |
9b7dbe8 to
43e2f15
Compare
Especially on the iPhone, it’s often difficult to actually spot the matched section within a page when working with PDF files. I therefore generally find visual highlighting of search results very helpful. I find that many other products lack this kind of support for quickly locating search results. That’s why I think it’s very good from a user’s perspective. |
It will be hidden on small screens and we only show 2 tags at a time, everything else is hidden under a + button, expanding the right sidebar. In general, I like the idea of having the "reasoning" or "why has this item been found" in the same place (Name, Content, Tags)
@tbsbdr @kulmann What do you think, we could change the appearance for search results across the whole ui, wouldn't cause any harm but make it even more visible on smaller screens (we have a lot of those search inputs, nowaydays). That's being said, its not that visually appealing IHMO. (out of scope for this pr) |
|
Regarding open question 2 from #3558 (comment):
Implemented centering in 535507d: the found content is split at the first match. The text before the match is cut off at its start (
|
JammingBen
left a comment
There was a problem hiding this comment.
I found one related issue we already have on main, but maybe you could fix it here while you're at it? When filtering via a tag on the search result page and then reloading the page, the filter still applies, but the filter-chip for "Tags" lost its active state.
… active after reload
…easoning for matching results (#3558) * feat: experimental search for tags in the global search * feat(search): show found content and matching tags in the search preview and results * fix(search): show tags selected in the tag filter as matching tags * feat(search): keep the match visible in truncated content snippets * test(e2e): cover found content and matching tags in the search * refactor(search): simplify SearchHighlights and share e2e search result args * feat(design-system): make the xsmall tag size more compact * feat(search): mark the found content and tags with a search icon and align them with the name * fix(search): keep long matching tags within narrow tiles * feat(search): remove the search icon and space matching tags like text * fix(search): sanitize the search snippet and keep the tag filter chip active after reload
I can’t give it a thumbs-up. It looks very good. I was also wondering whether the TAG symbol might be a bit too much. I think it’s great that the magnifying glass has gone down well in the text excerpt. And that there’s a good solution for the TAG layout. |










Description
Experimental, meant for trying it out. The search term entered in the global search is also matched against tags, so typing a tag into the search bar finds the resources that have it. Each result shows why it was found: the found content and the matching tags.
tag:"*term*"), only if the server supports it (search.property.tag) and not in "Title only" mode.buildSearchTerm).OcTag: newxsmallsize.fullTextSearch.feature.Tags match as substrings and case-insensitively (
alphafinds the tagProject Alpha), like names.Search for
apollo:Protokoll-Teamsitzung.txtmatches by tag,Apollo-Roadmap.mdby name,Angebot-Nordwind.txtby content.Known limitations (to evaluate before a production release)
test→testing). There is no weighting of name vs. content vs. tag in the query, the ranking comes from the search service.Related Issue
How Has This Been Tested?
pnpm vite) against the docker-compose backend, Chromium at 1440px and 412pxtestingis found when searching for "test", in the search bar preview and on the results pagetag:"*test*"findstesting,tag:"*alpha*"findsProject Alpha, matching is case-insensitive,tag:"test"(without wildcards) only finds exact tagspnpm test:unit --run, all passing),vue-tsc --noEmitsearch shows why a resource was foundpasses in Chromium (as in CI) and fails with the previous snippet truncationTypes of changes