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

[bugfix] Fix slice width calculation in dashboard #5867

Merged
merged 1 commit into from
Sep 12, 2018

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Sep 12, 2018

My previous fix (#5839) was incorrect.
It only works for slices that spans 1-2 columns, but compute less width than it should be for the slices that span >2 columns.

The previous formula did not take GRID_GUTTER_SIZE into account. A slice with n columns also contains n-1 gutter.

The formula for width is updated to

widthMultiple * columnWidth + (widthMultiple - 1) * GRID_GUTTER_SIZE - CHART_MARGIN

@john-bodley @graceguo-supercat

@kristw kristw closed this Sep 12, 2018
@kristw kristw reopened this Sep 12, 2018
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

@codecov-io
Copy link

Codecov Report

Merging #5867 into master will increase coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5867      +/-   ##
==========================================
+ Coverage   63.73%   63.79%   +0.05%     
==========================================
  Files         374      374              
  Lines       23325    23462     +137     
  Branches     2607     2607              
==========================================
+ Hits        14867    14968     +101     
- Misses       8445     8481      +36     
  Partials       13       13
Impacted Files Coverage Δ
...ashboard/components/gridComponents/ChartHolder.jsx 93.18% <ø> (ø) ⬆️
superset/utils.py 89.53% <0%> (+0.5%) ⬆️
superset/cli.py 56.36% <0%> (+2.55%) ⬆️

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 c82cea3...ac0a98a. Read the comment docs.

Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

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

🤦‍♂️ thanks for fixing this

@williaster williaster merged commit 166058d into apache:master Sep 12, 2018
@kristw kristw deleted the kristw-fix-slice-width branch September 12, 2018 20:35
kristw added a commit to kristw/incubator-superset that referenced this pull request Sep 12, 2018
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Oct 12, 2018
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels 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.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants