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

chore: SQLLab row limit warning using Alert component #14298

Merged
merged 1 commit into from
Apr 22, 2021

Conversation

zuzana-vej
Copy link
Contributor

SUMMARY

The longer warning message was using the new Alert component, but the warning message when rows were limited on result (not just what was displayed on UI) was not using the new Alert component. This PR addresses that for consistency.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
before

After:
after

TEST PLAN

Tested on local

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@zuzana-vej zuzana-vej force-pushed the zv-fix-sqllab-alert branch from 1f905d5 to 09f61b9 Compare April 22, 2021 06:02
@zuzana-vej zuzana-vej marked this pull request as ready for review April 22, 2021 16:05
@codecov
Copy link

codecov bot commented Apr 22, 2021

Codecov Report

Merging #14298 (09f61b9) into master (5d3191b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #14298   +/-   ##
=======================================
  Coverage   76.93%   76.93%           
=======================================
  Files         954      954           
  Lines       48070    48071    +1     
  Branches     5973     5974    +1     
=======================================
+ Hits        36982    36983    +1     
- Misses      10886    10891    +5     
+ Partials      202      197    -5     
Flag Coverage Δ
javascript 72.10% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...erset-frontend/src/SqlLab/components/ResultSet.tsx 70.00% <100.00%> (+0.13%) ⬆️
...end/src/SqlLab/components/RunQueryActionButton.tsx 64.28% <0.00%> (ø)
...d/src/filters/components/GroupBy/transformProps.ts 33.33% <0.00%> (ø)
...src/filters/components/TimeGrain/transformProps.ts 33.33% <0.00%> (ø)
...rc/filters/components/TimeColumn/transformProps.ts 33.33% <0.00%> (ø)
...ts/nativeFilters/FilterBar/FilterControls/state.ts 80.00% <0.00%> (ø)

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 5d3191b...09f61b9. Read the comment docs.

@zuzana-vej zuzana-vej requested a review from etr2460 April 22, 2021 16:50
Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM

@zuzana-vej zuzana-vej merged commit 86233d1 into apache:master Apr 22, 2021
@zuzana-vej zuzana-vej deleted the zv-fix-sqllab-alert branch April 22, 2021 17:14
@Steejay
Copy link

Steejay commented Apr 27, 2021

@zuzana-vej
I dont think all limit indicators should be in an alert state. we want to avoid adding disruptive messaging every time a user runs a query.

there were 2 states we looked at when designing this message. First was a general limit indicator that is supposed to give non disruptive feedback to the user that x amount of rows were returned based on a limit constraint they applied in the UI somewhere (sql or dropdown).

The second state is when a limit was applied based on a limit constraint configured on the server side (something a non admin could not see in the UI). For this state an alert was used to bring attention to the user that if they are seeing a row llimit that isnt shown in the UI its because of a configuration on the server side. hence the alert state (and improved copy you suggested in a previous issue).

cc @AAfghahi @yousoph

@zuzana-vej
Copy link
Contributor Author

I agree that sometimes limit is intentional and then it shouldn't be a warning. However the 1000 limit is default, many users don't realize this, and they query the data, sort through the displayed table not seeing what expected, or they download to CSV only to realize that they only downloaded 1000 records and they need to rerun the query again.

Based on this user feedback, when the 1000 limit was applied due to the default dropdown it should be a warning.

If there is N rows displayed because the query simply just returned 345 records, then I agree it shouldn't be a warning.

@Steejay
Copy link

Steejay commented Apr 27, 2021

Understood. Did the users miss the rows returned indicator too ("1000 rows returned")?

Does this framework work?:

When a limit is defined by the default 1000 dropdown= warning
When a limit is defined by a config on the server side = warning
When a limit is defined by the user changing the limit dropdown selection = no warning
When a limit is defined by the user creating it in SQL editor = no warning
When a limit isnt reached because the query returned < any limits applied = no warning

@Steejay
Copy link

Steejay commented Apr 27, 2021

I think there also needs to be more work done on the hierarchy of the SQL Lab controls. If users are missing the limit dropdown which has a default applied then that seems like one of the root problems to solve here. Generally, I dont love how the default options would send an alert to the user. But this could be a fix for now to at least bring attention to an important control to the user.

@AAfghahi
Copy link
Member

@zuzana-vej @Steejay
I implemented these changes here:
#14381

QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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/XS 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants