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

[Enhancement] Keyboard shortcut for running queries #8322

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

sumukhswamy
Copy link
Contributor

Description

cmd+enter functionality runs the query in the editor

Issues Resolved

Screenshot

Testing the changes

Changelog

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Copy link
Contributor

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 8322.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.14%. Comparing base (8d45530) to head (2b22fe5).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8322   +/-   ##
=======================================
  Coverage   64.14%   64.14%           
=======================================
  Files        3743     3743           
  Lines       88841    88841           
  Branches    13855    13855           
=======================================
  Hits        56985    56985           
  Misses      31241    31241           
  Partials      615      615           
Flag Coverage Δ
Linux_1 30.06% <ø> (ø)
Linux_2 58.86% <ø> (ø)
Linux_4 31.58% <ø> (ø)
Windows_1 30.08% <ø> (ø)
Windows_2 58.81% <ø> (ø)
Windows_3 40.35% <ø> (ø)
Windows_4 31.58% <ø> (ø)

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.

@@ -72,6 +72,20 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) {
},
} = opensearchDashboards.services;

useEffect(() => {
function handleCmdEnter(event: KeyboardEvent) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we could use

this.inputRef which is the Monaco Editor ref and add an action like this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have updated it

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
@kavilla kavilla added the discover for discover reinvent label Sep 26, 2024
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.

2 participants