-
Notifications
You must be signed in to change notification settings - Fork 272
Conversation
Deploy preview for superset-ui ready! Built with commit abc0e4b |
Codecov Report
@@ Coverage Diff @@
## master #139 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 77 81 +4
Lines 988 1039 +51
Branches 238 258 +20
=====================================
+ Hits 988 1039 +51
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.
This looks good to me overall, had a few comments 👍
Name wise I sort of like chart-composition
or chart-anatomy
better than chart-companion
, but if you feel strongly about companion
we can go with that. @conglei wdyt?
|
||
#### API | ||
|
||
`fn(args)` |
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 update exports or skip for now?
import {
ChartFrame,
TooltipFrame,
TooltipTable,
WithLegend,
} from '@superset-ui/chart-companion';
flexDirection: this.getContainerDirection(), | ||
}; | ||
|
||
style.width = width; |
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.
why not just set these when you define style
? const style = { ..., width, height };
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.
ah true. delete the if
condition that is no longer needed and forgot to look around.
will fix.
import React, { CSSProperties, ReactNode, PureComponent } from 'react'; | ||
import { ParentSize } from '@vx/responsive'; | ||
// eslint-disable-next-line import/no-unresolved | ||
import * as CSS from 'csstype'; |
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.
can you just import FlexDirectionProperty
?
|
||
triggerResizeObserver(); | ||
// Have to delay > 300ms | ||
// because the default debounce time for ParentSize is 300. |
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.
you could expose this prop to avoid this (and also enable more flexibility)
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.
great comment!
|
b8bad0e
to
abc0e4b
Compare
🏆 Enhancements
@superset-ui/chart-companion
which includes the small things that are used to composite a chart.@superset-ui/plugins
'spreset-chart-xy