Commit Graph

6 Commits

Author SHA1 Message Date
evazion
a80ee22746 autocomplete: fix incorrect highlighting when tag contains repeated words.
Fix tags like `short_shorts` or `hunter_x_hunter` being highlighted
incorrectly. Typing `short_sh` would highlight it as SHort_SHorts
instead of as SHORT_SHorts.
2022-09-06 18:01:30 -05:00
evazion
4a77d67d1f autocomplete: fix completion of ai: metatag.
Fix it so we don't show the `ai:` prefix in front of results in the
autocomplete menu when completing the `ai: metatag.
2022-09-03 20:34:34 -05:00
evazion
f83af31a00 autocomplete: fix usernames not being highlighted in @mentions.
Fix usernames not being highlighted when completing @mentions.

This also changes it so the autocomplete results don't include the '@'
in front of the name.

Minor breaking change to the /autocomplete.json API. Autocomplete
results for mentions now have the type `mention` instead of `user`.
2022-09-03 20:34:26 -05:00
evazion
f20e1d5bc9 autocomplete: fix highlighting of short searches.
Fix a bug where tags weren't highlighted correctly when the search only contained one character.
2022-09-02 14:15:25 -05:00
evazion
8491bef6e6 autocomplete: highlight matches in autocomplete menu.
Highlight the matching part of the tag in the autocomplete menu. For
example, if you search "hair", then the word "hair" will be bolded in
every matching tag. This is so users can tell why a particular tag was
matched.
2022-09-02 13:56:52 -05:00
evazion
cf13ab1540 autocomplete: render html server-side.
Render the HTML for autocomplete results server-side instead of in
Javascript. This is cleaner than building HTML in Javascript, but it may
hurt caching because the HTTP responses are larger.

Fixes #4698: user autocomplete contains links to /posts

Also fixes a bug where tag counts in the autocomplete menu were different
from tag counts displayed elsewhere because of differences in rounding.
2022-08-30 01:26:02 -05:00