quickwit-datasource icon indicating copy to clipboard operation
quickwit-datasource copied to clipboard

feat: Improved autocompletion

Open uptickmetachu opened this issue 1 year ago • 6 comments
trafficstars

Hi first time contribution here :)

My typescript is also bad so please be gentle and suggest feedback where neccessary!

Love quickwit but wanted to try a small PR to see how easy it was to make changes to the plugin and hopefully contribute some more changes in the future.

Motivation

Autocompletion is great but two things bugged me:

  1. When completing between two quotes; eg: span_attributes.filename:"CURSOR_IS_HERE" the suggestions will be surrounded by quotes. When accepting the suggestion, the final quote is inserted before the ending quote and as such we end up with incorrect syntax of span_attributes.filename:"SUGGESTION"" <--extra quote
  2. Autocompletion is limited to the first 100 results. This PR uses the field value to prefix search the terms. We need this when we are searching across a field with thousands of terms but the current implementation will never return any result beyond the initial 100 (sorted alphabetically).

uptickmetachu avatar Aug 17 '24 05:08 uptickmetachu

Hey @uptickmetachu! thanks for your contribution! Let me review it and get back to you.

fmassot avatar Aug 17 '24 20:08 fmassot

Happy to add a Loom/video recording of the changes in action as well if that helps with the review.

uptickmetachu avatar Aug 20 '24 23:08 uptickmetachu

Not needed, will review it today! thanks!

fmassot avatar Aug 21 '24 07:08 fmassot

@fmassot hi! How is going?

foxdalas avatar Feb 09 '25 21:02 foxdalas

Would be cool to see it merged :) @fmassot

kuzaxak avatar Apr 05 '25 09:04 kuzaxak

Sorry for the delay, I will review the PR this week.

fmassot avatar Apr 06 '25 21:04 fmassot

@foxdalas @kuzaxak @uptickmetachu I tried to reproduce but it seems fixed. Can you test the latest version of the plugin?

fmassot avatar Aug 09 '25 20:08 fmassot

Using 0.5

image

Double quotes still happening

https://www.loom.com/share/4647c64b491f4bee9642b500f80b947c

Unable to autocomplete beyond the limit

Don't have a video for this one but I'm still unable to auto complete beyond the initial window size of results.

@fmassot

uptickmetachu avatar Aug 10 '25 23:08 uptickmetachu