-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
[SIP-5] Refactor and repair partition #5718
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5718 +/- ##
==========================================
- Coverage 63.43% 63.38% -0.05%
==========================================
Files 361 361
Lines 22977 22995 +18
Branches 2558 2560 +2
==========================================
Hits 14575 14575
- Misses 8387 8405 +18
Partials 15 15
Continue to review full report at Codecov.
|
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.
couple comments, looks solid overall! 🎈
fill: rgba(0, 0, 0, 0.8); | ||
} | ||
|
||
.partition g:hover text { | ||
fill: rgba(0, 0, 0, 1); | ||
} | ||
|
||
.partition .partition-tooltip { |
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.
It'd be nice at some point to have consistent colors/padding across things like chart tooltips. not sure how to best do that in the plugin world... css in javascript makes it easy to pass variables around. something to think about.
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.
I would love to get rid of in-chart tooltips and make all use vx
tooltip. Can do another sweep after converting these to react
import './partition.css'; | ||
|
||
d3.hierarchy = require('d3-hierarchy').hierarchy; |
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.
interesting 🤔
.append('div') | ||
.attr('class', 'nvtooltip') |
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.
👏
return d.color; | ||
}); | ||
|
||
// Zoom out when clicking outside vis |
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.
should we remove this?
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.
sgtm. will do.
|
||
const nodes = init(root); | ||
|
||
let kx = w / root.dx; |
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.
these var names are a little cryptic but nbd
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.
Must be from the blocks.org examples
logScale, | ||
metrics, | ||
numberFormat, | ||
partitionLimit: partitionLimit ? parseInt(partitionLimit, 10) : partitionLimit, |
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.
have seen this flagged by linting (outside of Superset) too many times to not comment 😬 these two could be simplified to partitionLimit && parseInt(partitionLimit, 10)
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.
👍
); | ||
t += ( | ||
'<tr class="emph">' + | ||
'<td class="legend-color-guide" style="opacity: 0.75">' + |
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.
do styles for .legend-color-guide
and .x-value
come from another style sheet? or do they do anything?
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.
Umm, this might be an nvd3 thing. I did not touch this part.
40c5d4b
to
a71c0d8
Compare
I addressed the comments above.
|
Codecov Report
@@ Coverage Diff @@
## master #5718 +/- ##
==========================================
- Coverage 63.8% 63.75% -0.05%
==========================================
Files 364 364
Lines 23066 23083 +17
Branches 2568 2568
==========================================
Hits 14717 14717
- Misses 8334 8351 +17
Partials 15 15
Continue to review full report at Codecov.
|
* Extract slice and formData * reorder functions * fix tooltip * remove commented code * remove commented code and rename variables * remove verboseMap * rename kx, ky to zoomX, zoomY (cherry picked from commit 00f2771)
* Extract slice and formData * reorder functions * fix tooltip * remove commented code * remove commented code and rename variables * remove verboseMap * rename kx, ky to zoomX, zoomY
* Extract slice and formData * reorder functions * fix tooltip * remove commented code * remove commented code and rename variables * remove verboseMap * rename kx, ky to zoomX, zoomY
slice
andformData
according to [SIP-5]@williaster @conglei
Before

After
