-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
feat(sqllab): Show sql in the current result #24787
feat(sqllab): Show sql in the current result #24787
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24787 +/- ##
==========================================
+ Coverage 67.23% 68.95% +1.72%
==========================================
Files 1902 1906 +4
Lines 73939 74126 +187
Branches 8176 8212 +36
==========================================
+ Hits 49713 51117 +1404
+ Misses 22113 20885 -1228
- Partials 2113 2124 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 82 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
I'll leave the design review for @kasiazjc but I think we can truncate the query (add ...) to indicate that we're only showing part of the query. |
Thanks @michael-s-molina and thanks @justinpark for the PR! I have a few suggestions:
|
Wow, that's a great suggestion. @justinpark Could we also display the number of rows using the Label (pill) component?
@justinpark If this is possible it would be an awesome UX! |
@kasiazjc this is a good idea but it might be broken if a user modify the sql content which is not same from the ran query. |
Sure. I'll update accordingly |
True, so I think for now let's keep the modal. Thanks! |
@kasiazjc I updated the layout as you suggested. I also replaces the existing limit message by the tooltip (+ exclamation indicator when exists). Feel free to give any feedback at your convenience. update--current-sql.mov |
@kasiazjc circle back related to the update |
@kasiazjc @michael-s-molina could you help a review again? |
/testenv up |
@michael-s-molina Ephemeral environment spinning up at http://34.214.125.159:8080. Credentials are |
> | ||
<Label | ||
css={css` | ||
line-height: 17px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use theme
object to calculate the line-height
(16 is fine), font-size
and margin-right
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michael-s-molina updated by theme variables.
4a5ee98
to
6a174e6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@kasiazjc I will remain open until next Tuesday and will merge it if you don't have any concerns. |
Ephemeral environment shutdown and build artifacts deleted. |
* fix: Issue apache#24493; Resolved report selection menu in chart and dashboard page (apache#25157) * fix: DML failures in SQL Lab (apache#25190) * fix: All values being selected in Select (apache#25202) * docs: fix wrong type in PREFERRED_DATABASES example (apache#25200) Signed-off-by: cmontemuino <1761056+cmontemuino@users.noreply.github.com> * docs: add CVEs for 2.1.1 (apache#25206) * chore: back port 2.1.1 doc changes (apache#25165) * feat(sqllab): Show sql in the current result (apache#24787) * docs(FAQ): add answer re: necessary specs, copy-edit existing answer (apache#24992) * fix: `is_select` (apache#25189) * fix: Cypress test to force mouseover (apache#25209) * fix(sqllab): Force trino client async execution (apache#24859) * fix: granularity_sqla and GENERIC_CHART_AXES (apache#25213) * chore: Convert deckgl class components to functional (apache#25177) * fix: Cypress test to force mouseover (follow-up) (apache#25223) * fix(docs): Fixing a typo in README.md (apache#25216) * chore(read_csv): remove deprecated argument (apache#25226) * chore(trino): remove unnecessary index checks (apache#25211) --------- Signed-off-by: cmontemuino <1761056+cmontemuino@users.noreply.github.com> Co-authored-by: Sandeep Patel <33354423+suicide11@users.noreply.github.com> Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> Co-authored-by: Carlos M <1761056+cmontemuino@users.noreply.github.com> Co-authored-by: Daniel Vaz Gaspar <danielvazgaspar@gmail.com> Co-authored-by: Elizabeth Thompson <eschutho@gmail.com> Co-authored-by: JUST.in DO IT <justin.park@airbnb.com> Co-authored-by: Sam Firke <sfirke@users.noreply.github.com> Co-authored-by: Beto Dealmeida <roberto@dealmeida.net> Co-authored-by: Rob Moore <giftig@users.noreply.github.com> Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com> Co-authored-by: yousoph <sophieyou12@gmail.com> Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
I filed this cosmetic issue for the yellow banner of the query limit, it looks like the yellow banner is now on the edge of the query filed. |
This reverts commit 2d4de51.
SUMMARY
Following #24329, SQLLab can run a portion of the sql editor without highlighted.
Like other 3rd party sql editor, it will be useful to display the current running sql in the result panel to identify the actual executed query.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After:
after--show-sql.mov
Before:
before--show-sql.mov
TESTING INSTRUCTIONS
Go to sqllab
Run a query and check the result panel
ADDITIONAL INFORMATION