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

fix(sqllab): fix control x to stop query #21899

Merged
merged 3 commits into from
Oct 24, 2022
Merged

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Oct 21, 2022

SUMMARY

After the refactor of the sqleditor component users weren't able to to stop query by control + x. This pr ensures that the component rebinds the mouestrap keys when latesquery is updated.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

after

Screen.Recording.2022-10-21.at.3.06.30.PM.mov

TESTING INSTRUCTIONS

Go to sqllab and run a query and use the control + x key to stop the query.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@pkdotson
Copy link
Member Author

/testenv up

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Merging #21899 (91b6f97) into master (b1bf25e) will increase coverage by 0.04%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master   #21899      +/-   ##
==========================================
+ Coverage   66.85%   66.89%   +0.04%     
==========================================
  Files        1805     1806       +1     
  Lines       69058    69119      +61     
  Branches     7368     7393      +25     
==========================================
+ Hits        46167    46239      +72     
+ Misses      20995    20971      -24     
- Partials     1896     1909      +13     
Flag Coverage Δ
javascript 53.31% <83.33%> (+0.11%) ⬆️

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

Impacted Files Coverage Δ
...frontend/src/SqlLab/components/SqlEditor/index.jsx 55.91% <83.33%> (+0.17%) ⬆️
...ls/DndColumnSelectControl/DndAdhocFilterOption.tsx 50.00% <0.00%> (-50.00%) ⬇️
...frontend/src/components/Chart/ChartContextMenu.tsx 11.53% <0.00%> (-32.47%) ⬇️
...ols/DndColumnSelectControl/utils/optionSelector.ts 24.13% <0.00%> (-13.80%) ⬇️
...ontrols/DndColumnSelectControl/DndMetricSelect.tsx 47.45% <0.00%> (-13.58%) ⬇️
.../CRUD/data/database/DatabaseModal/ExtraOptions.tsx 75.00% <0.00%> (-11.96%) ⬇️
...et-frontend/src/dashboard/actions/dashboardInfo.ts 50.00% <0.00%> (-11.54%) ⬇️
...iews/CRUD/data/dataset/AddDataset/Header/index.tsx 81.81% <0.00%> (-5.69%) ⬇️
...perset-frontend/src/views/CRUD/alert/AlertList.tsx 59.63% <0.00%> (-2.87%) ⬇️
.../src/explore/components/ControlPanelsContainer.tsx 77.37% <0.00%> (-2.79%) ⬇️
... and 71 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions
Copy link
Contributor

@pkdotson Ephemeral environment spinning up at http://35.92.164.144:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@@ -219,6 +219,7 @@ const SqlEditor = ({
if (latestQuery && ['running', 'pending'].indexOf(latestQuery.state) >= 0) {
dispatch(postStopQuery(latestQuery));
}
return false;
Copy link
Member

Choose a reason for hiding this comment

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

What is this used for?

Copy link
Member Author

@pkdotson pkdotson Oct 21, 2022

Choose a reason for hiding this comment

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

yes to prevent the event from bubbling up. This is for the stopquery fn. Mousetrap sometimes recommends this.

@hughhhh hughhhh merged commit 88e98d5 into apache:master Oct 24, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants