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

Hotkeys in SQL Lab #4680

Merged
merged 3 commits into from
Mar 27, 2018
Merged

Hotkeys in SQL Lab #4680

merged 3 commits into from
Mar 27, 2018

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Mar 23, 2018

screen shot 2018-03-23 at 3 19 00 pm

@hughhhh
Copy link
Member

hughhhh commented Mar 23, 2018

@dubtran

@codecov-io
Copy link

codecov-io commented Mar 24, 2018

Codecov Report

Merging #4680 into master will increase coverage by 0.19%.
The diff coverage is 88.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4680      +/-   ##
==========================================
+ Coverage    71.4%   71.59%   +0.19%     
==========================================
  Files         190      191       +1     
  Lines       14934    14950      +16     
  Branches     1102     1100       -2     
==========================================
+ Hits        10663    10703      +40     
+ Misses       4268     4244      -24     
  Partials        3        3
Impacted Files Coverage Δ
superset/assets/javascripts/SqlLab/actions.js 72.32% <100%> (ø) ⬆️
superset/assets/javascripts/components/Hotkeys.jsx 100% <100%> (ø)
...javascripts/SqlLab/components/AceEditorWrapper.jsx 76.47% <100%> (+1.47%) ⬆️
...assets/javascripts/SqlLab/components/SqlEditor.jsx 78% <69.23%> (+3.26%) ⬆️
superset/cli.py 48.38% <0%> (ø) ⬆️
superset/sql_lab.py 74.6% <0%> (+0.39%) ⬆️
superset/assets/javascripts/modules/colors.js 77.08% <0%> (+0.48%) ⬆️
superset/connectors/druid/models.py 78.85% <0%> (+2.5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76394d3...0166f56. Read the comment docs.

@mistercrunch mistercrunch changed the title [WiP] Hotkeys in SQL Lab Hotkeys in SQL Lab Mar 26, 2018
@mistercrunch
Copy link
Member Author

removed the [WiP] tag, this is ready for review

@@ -226,6 +229,32 @@ class SqlEditor extends React.PureComponent {
render() {
const height = this.sqlEditorHeight();
const defaultNorthHeight = this.props.queryEditor.height || 200;
const SQLLAB_HOTKEYS = [
Copy link
Member

Choose a reason for hiding this comment

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

nit: Can we put this at the top of the file or even in config file for adding new hotkeys more easily. I'm like the idea of a having this separate and we import it

Copy link
Member Author

Choose a reason for hiding this comment

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

the actions aren't in scope at that point though...

Copy link
Member

Choose a reason for hiding this comment

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

Ahhh true, the func param, i just don't like the bulky render view, but if there isn't a way to clean it up we can just go with it.

Copy link
Member Author

Choose a reason for hiding this comment

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

moved to this.getHotkeyConfig()

@@ -196,7 +196,10 @@ export function setDatabases(databases) {
}

export function addQueryEditor(queryEditor) {
const newQe = Object.assign({}, queryEditor, { id: shortid.generate() });
const newQe = {
Copy link
Member

@hughhhh hughhhh Mar 26, 2018

Choose a reason for hiding this comment

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

nit: neQe >> newQuery

<Popover id="popover-hotkeys" title={this.props.header} style={{ width: '300px' }}>
<Table
className="table table-condensed"
data={this.props.hotkeys.map(keyConfig => ({
Copy link
Member

Choose a reason for hiding this comment

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

Nice!!!!

@hughhhh
Copy link
Member

hughhhh commented Mar 27, 2018

🚢

@mistercrunch mistercrunch merged commit f510956 into apache:master Mar 27, 2018
@mistercrunch mistercrunch deleted the hotkeys branch March 27, 2018 22:54
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 27, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 30, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 30, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 30, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Mar 30, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Apr 4, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
hughhhh pushed a commit to lyft/incubator-superset that referenced this pull request Apr 11, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Hotkeys

* Making it work in AceEditor

* Addressing comments
@mistercrunch mistercrunch added the 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels label Feb 27, 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 🚢 0.25.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants