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

[Auto Suggest] Look and Feel changes #7991

Merged
merged 13 commits into from
Sep 6, 2024

Conversation

paulstn
Copy link
Contributor

@paulstn paulstn commented Sep 4, 2024

Description

Videos

Light Mode:

Screen.Recording.2024-09-04.at.2.38.27.PM.mov

Dark Mode:

Screen.Recording.2024-09-04.at.2.41.26.PM.mov

Changes

Keeping the suggestion window open

This PR aims to keep the suggestion window open as long as possible by doing the following three things:

  1. Triggers the suggestion window to open whenever the editor is 'focused' (clicked on)
  2. Triggers the suggestion window after the user types a space
  3. Triggers the suggestion window after a suggestion has been chosen, thereby showing the next suggested option immediately

Part of the behavior that already exists is that the suggestion window will close when the user presses ESC

User hints below suggestions

This change appends user hints below the suggestion window: Tab to insert, ESC to close window. It does this through scss

DQL Operators

AND, OR, and NOT have been distinguished as operators - the details and the icon have been changed

image

Also, DQL Autocomplete was modified slightly to work better with change number 3. PPL and SQL will also have to be modified, because currently the cursor is still sitting on the previous word so the next suggestions aren't available until a space is put.

Changelog

  • feat: Keep Autocomplete suggestion window open and put user hints below the suggestion window

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 60.58%. Comparing base (7b83b57) to head (ca571d0).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ashboards_react/public/code_editor/code_editor.tsx 0.00% 3 Missing ⚠️
...c/plugins/data/public/antlr/dql/code_completion.ts 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7991      +/-   ##
==========================================
- Coverage   60.58%   60.58%   -0.01%     
==========================================
  Files        3732     3732              
  Lines       88427    88436       +9     
  Branches    13701    13703       +2     
==========================================
+ Hits        53577    53582       +5     
- Misses      31591    31594       +3     
- Partials     3259     3260       +1     
Flag Coverage Δ
Linux_1 28.75% <0.00%> (-0.01%) ⬇️
Linux_2 56.26% <ø> (ø)
Linux_3 37.45% <85.71%> (+<0.01%) ⬆️
Linux_4 29.64% <0.00%> (-0.01%) ⬇️
Windows_1 28.77% <0.00%> (-0.01%) ⬇️
Windows_2 56.21% <ø> (ø)
Windows_3 37.45% <85.71%> (+0.01%) ⬆️
Windows_4 29.64% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ashwin-pc
ashwin-pc previously approved these changes Sep 4, 2024
Copy link
Member

@ashwin-pc ashwin-pc left a comment

Choose a reason for hiding this comment

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

Nice!

ashwin-pc
ashwin-pc previously approved these changes Sep 4, 2024
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
ashwin-pc
ashwin-pc previously approved these changes Sep 5, 2024
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
@kavilla kavilla merged commit 4776fcd into opensearch-project:main Sep 6, 2024
67 of 69 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2024
* put in trigger suggest on focus and on type space

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify dql suggestions to keep suggestion chaining fluid

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR #7991 created/updated

* user hints

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* specify dql operators in details and icon

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR #7991 created/updated

* Changeset file for PR #7991 created/updated

* update testing constants

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify scss

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR #7991 created/updated

---------

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 4776fcd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2024
* put in trigger suggest on focus and on type space

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify dql suggestions to keep suggestion chaining fluid

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR #7991 created/updated

* user hints

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* specify dql operators in details and icon

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR #7991 created/updated

* Changeset file for PR #7991 created/updated

* update testing constants

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify scss

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR #7991 created/updated

---------

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 4776fcd)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Sep 8, 2024
* put in trigger suggest on focus and on type space

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify dql suggestions to keep suggestion chaining fluid

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR opensearch-project#7991 created/updated

* user hints

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* specify dql operators in details and icon

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR opensearch-project#7991 created/updated

* Changeset file for PR opensearch-project#7991 created/updated

* update testing constants

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify scss

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR opensearch-project#7991 created/updated

---------

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request Sep 9, 2024
* put in trigger suggest on focus and on type space



* modify dql suggestions to keep suggestion chaining fluid



* Changeset file for PR #7991 created/updated

* user hints



* specify dql operators in details and icon



* Changeset file for PR #7991 created/updated

* Changeset file for PR #7991 created/updated

* update testing constants



* modify scss



* Changeset file for PR #7991 created/updated

---------



(cherry picked from commit 4776fcd)

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
kavilla pushed a commit that referenced this pull request Sep 9, 2024
* put in trigger suggest on focus and on type space



* modify dql suggestions to keep suggestion chaining fluid



* Changeset file for PR #7991 created/updated

* user hints



* specify dql operators in details and icon



* Changeset file for PR #7991 created/updated

* Changeset file for PR #7991 created/updated

* update testing constants



* modify scss



* Changeset file for PR #7991 created/updated

---------



(cherry picked from commit 4776fcd)

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Sep 10, 2024
* put in trigger suggest on focus and on type space

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify dql suggestions to keep suggestion chaining fluid

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR opensearch-project#7991 created/updated

* user hints

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* specify dql operators in details and icon

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR opensearch-project#7991 created/updated

* Changeset file for PR opensearch-project#7991 created/updated

* update testing constants

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* modify scss

Signed-off-by: Paul Sebastian <paulstn@amazon.com>

* Changeset file for PR opensearch-project#7991 created/updated

---------

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants