Skip to content

fix: Adds space under dataset change warning#14582

Merged
zhaoyongjie merged 5 commits into
masterfrom
space-under-dataset-change-warning
May 12, 2021
Merged

fix: Adds space under dataset change warning#14582
zhaoyongjie merged 5 commits into
masterfrom
space-under-dataset-change-warning

Conversation

@rusackas
Copy link
Copy Markdown
Member

SUMMARY

Fixes a missing gutter under the warning you see when you change datasets in explore. Started doing this as a css override to fix the acute problem, but decided it'd be better to add it as a prop to the Alert itself in case we see this sort of thing again.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image

After:
image

TEST PLAN

Check it out in the Explore view by switching dataset. Or try the prop in the Interactive Alert entry of Storybook

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

Comment on lines -63 to +72
padding: '6px 10px',
marginBottom: roomBelow ? gridUnit * 4 : 0,
padding: `${gridUnit * 2}px ${gridUnit * 3}px`,
alignItems: 'flex-start',
border: 0,
backgroundColor: baseColor.light2,
'& .ant-alert-icon': {
marginRight: 10,
marginRight: gridUnit * 2,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Happened to see some pixel measurements in here that I figured I might as well convert to gridUnits while we're in here. Trying to keep bycatch minimal these days, but... I couldn't help myself.

@rusackas
Copy link
Copy Markdown
Member Author

@junlincc

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2021

Codecov Report

Merging #14582 (03be27f) into master (7d28225) will decrease coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14582      +/-   ##
==========================================
- Coverage   77.40%   77.32%   -0.08%     
==========================================
  Files         958      958              
  Lines       48327    48329       +2     
  Branches     5677     5679       +2     
==========================================
- Hits        37406    37369      -37     
- Misses      10721    10760      +39     
  Partials      200      200              
Flag Coverage Δ
hive 80.89% <ø> (ø)
javascript 72.47% <100.00%> (+<0.01%) ⬆️
mysql 81.15% <ø> (ø)
postgres 81.18% <ø> (ø)
presto ?
python 81.56% <ø> (-0.16%) ⬇️
sqlite 80.79% <ø> (ø)

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

Impacted Files Coverage Δ
...-frontend/src/datasource/ChangeDatasourceModal.tsx 85.36% <ø> (ø)
superset-frontend/src/components/Alert/index.tsx 100.00% <100.00%> (ø)
superset/db_engine_specs/presto.py 84.42% <0.00%> (-5.48%) ⬇️
superset/connectors/sqla/models.py 88.61% <0.00%> (-1.46%) ⬇️
superset/models/core.py 88.85% <0.00%> (-0.28%) ⬇️

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 7d28225...03be27f. Read the comment docs.

@rusackas rusackas requested review from pkdotson and suddjian May 12, 2021 02:10
@junlincc
Copy link
Copy Markdown
Member

/testenv up

@github-actions
Copy link
Copy Markdown
Contributor

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

@zhaoyongjie zhaoyongjie self-requested a review May 12, 2021 02:42
Copy link
Copy Markdown
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM!

@junlincc
Copy link
Copy Markdown
Member

Lgtm thank you for the fix 😊

@zhaoyongjie zhaoyongjie merged commit 6d786d4 into master May 12, 2021
@github-actions
Copy link
Copy Markdown
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@rusackas rusackas deleted the space-under-dataset-change-warning branch May 12, 2021 04:44
@rusackas rusackas added the bash! label May 12, 2021
@junlincc junlincc added the rush! Requires immediate attention label May 18, 2021
henryyeh pushed a commit to preset-io/superset that referenced this pull request May 18, 2021
* fix: Adding a little margin under the warning about changing datasets

* feat: moves Alert spacing from a css override to an Alert prop

* fix: prop needs to be optional... proptional

* fix: moving the typing to a better spot, adding the new prop to storybook.

* style: linting

(cherry picked from commit 6d786d4)
@junlincc junlincc removed the rush! Requires immediate attention label May 27, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* fix: Adding a little margin under the warning about changing datasets

* feat: moves Alert spacing from a css override to an Alert prop

* fix: prop needs to be optional... proptional

* fix: moving the typing to a better spot, adding the new prop to storybook.

* style: linting
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* fix: Adding a little margin under the warning about changing datasets

* feat: moves Alert spacing from a css override to an Alert prop

* fix: prop needs to be optional... proptional

* fix: moving the typing to a better spot, adding the new prop to storybook.

* style: linting
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* fix: Adding a little margin under the warning about changing datasets

* feat: moves Alert spacing from a css override to an Alert prop

* fix: prop needs to be optional... proptional

* fix: moving the typing to a better spot, adding the new prop to storybook.

* style: linting
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 First shipped in 1.3.0 labels Mar 12, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
* fix: Adding a little margin under the warning about changing datasets

* feat: moves Alert spacing from a css override to an Alert prop

* fix: prop needs to be optional... proptional

* fix: moving the typing to a better spot, adding the new prop to storybook.

* style: linting
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 preset-io size/S 🚢 1.3.0 First shipped in 1.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants