Skip to content

support display of labels in autocompletion popup - #14245

Merged
kevinushey merged 6 commits into
mainfrom
feature/autocompletion-labelled-variables
Feb 8, 2024
Merged

kevinushey merged 6 commits into
mainfrom
feature/autocompletion-labelled-variables

Conversation

@kevinushey

Copy link
Copy Markdown
Collaborator

Intent

Addresses #14242.

Screenshot 2024-02-08 at 11 13 18 AM

Approach

Some R variables might be annotated with a "label" attribute. This PR bundles that information as part of the completion metadata when available, and uses that in the displayed completion list.

Automated Tests

N/A

QA Notes

Test via notes in #14242.

Documentation

Not included; not sure if this is worth documenting.

Checklist

  • If this PR adds a new feature, or fixes a bug in a previously released version, it includes an entry in NEWS.md
  • If this PR adds or changes UI, the updated UI meets accessibility standards
  • A reviewer is assigned to this PR (if unsure who to assign, check Area Owners list)
  • This PR passes all local unit tests

@kevinushey
kevinushey requested a review from gtritchie February 8, 2024 17:14
@kevinushey

Copy link
Copy Markdown
Collaborator Author

I wonder if I should alter the styling for the metadata included, just to ensure it's distinct from the completion itself?

callback.onError(error);
}

private boolean isPriorityCompletion(int type)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helps fix an issue where column-based completions were displayed below so-called "context" completions in [ and [[ completion contexts, e.g.

Screenshot 2024-02-08 at 11 19 13 AM

@gtritchie gtritchie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kevinushey

Copy link
Copy Markdown
Collaborator Author

Now also filtering on the whole display string:

Screenshot 2024-02-08 at 1 22 46 PM

@kevinushey
kevinushey merged commit 70e8b24 into main Feb 8, 2024
@kevinushey
kevinushey deleted the feature/autocompletion-labelled-variables branch February 8, 2024 19:23
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.

2 participants