Skip to content
Snippets Groups Projects

Autocomplete tweaks: remove search blocker, fix debounce params #869

Merged Shpuld Shpludson requested to merge feat/tweak-autocomplete-search into develop
1 unresolved thread

This is to address #869 (closed)

I changed the debounce parameters makes sure it doesn't fetch on the initial character but when you stop typing.

I removed the "don't search if we already have some results" as it can make it impossible to get the results you want, and added a list of recent queries to remove duplicate searches.

Edited by Shpuld Shpludson

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

    • Looks good but I wonder if the recentQuery thing is really needed. It does prevent probably useless queries but introduces another place where things can 'not work until refresh'.

    • Author Maintainer

      yeah I was thinking if it was needed as well, asked about it in the issue

      it won't be until refresh, but until 10 queries have been made, so the biggest risk is making a query for user X that doesn't exist yet, then not being able to find him 10 minutes later after he has created an account

    • That was the case i was thinking about. Seems like a rather rare edge case. I'm a bit ambivalent about the whole thing, but overall I don't think the added complexity is worth it, as hammering the server is already prevented by the debounce.

    • Author Maintainer

      yeah, I can remove it easily, it's not many lines of code but if the benefits aren't worth anything it's no point keeping it

    • My vote would be to remove, just to keep things simpler.

    • Please register or sign in to reply
  • added 1 commit

    Compare with previous version

  • Nice quick fix :thumbsup:

  • merged

  • lain mentioned in commit 2ea5bff3

    mentioned in commit 2ea5bff3

  • lain mentioned in issue #869 (closed)

    mentioned in issue #869 (closed)

  • Please register or sign in to reply
    Loading