Skip to content
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

Search history completions #423

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

MareStare
Copy link
Contributor

@MareStare MareStare commented Feb 15, 2025

Before you begin

  • I understand my contributions may be rejected for any reason
  • I understand my contributions are for the benefit of Derpibooru and/or the Philomena software
  • I understand my contributions are licensed under the GNU AGPLv3
  • I understand all of the above

This is WIP, I'll add some details about the mechanics of the feature to the PR description once I'm ready to request a review.

FIXME

  • Selecting the history item should overwrite all input, not just the last term after the last coma
  • Clicking on the history suggestion when the input is empty doesn't insert the item
  • In firefox if there is already some input in the search field and you reload the page it keeps the input the same, if you focus the input it won't show tag completions
  • Server-side suggestions render different labels. Instead, make the server return the necessary data in machine readable format without any display logic and render the results fully on frontend
  • The inserted text should be saved in user's undo history

TODO

  • Improve UI as much as possible. Make sure history is enabled on all relevant search inputs
  • Consider moving history lazy loading into the completions events subscriptions entirely
  • Ctrl shortcuts, establish the behavior
  • Consider removing suggestion items from the popup instead of hiding it
  • Add an setting to disable the hide the search history
  • Test watching for changes, multiple tabs scenario
  • Test clicking into random places inside of the input
  • Test various empty inputs with different number of whitespace characters
  • Load-test the history at the maximum number of inputs.
  • Do some automated testing. Update existing tests
  • Post-refactoring
  • Rebase and remove no-undefined suppressions

Unresolved Questions

Should there be a tag suggestion in this state? I think yes, but in old behavior it's as this:

image

So I changed it to this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant