-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Loki: Fix Autocomplete in stream selector overwriting existing label names, or inserting autocomplete result within label value #76485
Merged
gtk-grafana
merged 13 commits into
gtk-grafana/logs/issues/75820/autocomplete-between-labels
from
gtk-grafana/logs/issues/75925/auto-complete-fixes
Oct 13, 2023
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ing the word pattern to include label value separator (=), include valid sting chars (-), and value wrapper ("), adding some more logic in the range calculation to prevent autocomplete results from partially overwriting adjacent label names or portions of the current label value
…ls' into gtk-grafana/logs/issues/75925/auto-complete-fixes
…ls' into gtk-grafana/logs/issues/75925/auto-complete-fixes
…es/75925/auto-complete-fixes
…es/75925/auto-complete-fixes
…es/75925/auto-complete-fixes
Backend code coverage report for PR #76485 |
Frontend code coverage report for PR #76485
|
It looks like it requires quotes to trigger the value autocompletes. Would it be possible to trigger it after the equal? Quotes.mov |
Fantastic, thanks! |
matyax
approved these changes
Oct 13, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
c4187d2
into
gtk-grafana/logs/issues/75820/autocomplete-between-labels
28 of 29 checks passed
gtk-grafana
added a commit
that referenced
this pull request
Oct 13, 2023
…ore or between other labels (#75925) * Fix issue getting current labels that would only grab values to the left of the cursor * Loki: Fix Autocomplete in stream selector overwriting existing label names, or inserting autocomplete result within label value (#76485) * Better autocomplete functionality in loki, changing the word pattern to include label value separator (=), include valid sting chars (-), and value wrapper ("), adding some more logic in the range calculation to prevent autocomplete results from partially overwriting adjacent label names or portions of the current label value
darrenjaneczek
pushed a commit
that referenced
this pull request
Oct 23, 2023
…ore or between other labels (#75925) * Fix issue getting current labels that would only grab values to the left of the cursor * Loki: Fix Autocomplete in stream selector overwriting existing label names, or inserting autocomplete result within label value (#76485) * Better autocomplete functionality in loki, changing the word pattern to include label value separator (=), include valid sting chars (-), and value wrapper ("), adding some more logic in the range calculation to prevent autocomplete results from partially overwriting adjacent label names or portions of the current label value
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
add to changelog
area/frontend
area/query-editor
datasource/Loki
no-backport
Skip backport of PR
type/bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this feature?
PoC:
Changing the wordPattern monaco uses to identify words which we used to calculate the monaco range.
This allows us to somewhat dynamically calculate range passed into monaco to prevent overwriting adjacent label names, or portions of label values surrounding the users cursor.
Why do we need this feature?
Makes writing queries easier, fixes code UX papercuts.
Who is this feature for?
Loki users
Which issue(s) does this PR fix?:
Fixes #75820
Special notes for your reviewer:
Child PR of #75925
Created this PR after I accidentally pinged every reviewer (by merging main into this branch instead of the parent)
#76080
Please check that: