-
Notifications
You must be signed in to change notification settings - Fork 54
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
Namespace css classes + update class and style props where applicable #66
Conversation
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.
looks good to me
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 know that you just did a lot of namespacing around RCT, and I don't think it should go into this PR, but you may want to variable your namespace in the future, that way you can change your namespace quickly if you need to, then in the strings that you're declaring doing something like class=${NAMESPACE_CLASS}-area-barchart
other than that though looks good
@@ -225,7 +237,8 @@ export default class MarkerLineChart extends React.Component { | |||
if (!_.every([x1, x2, y1, y2], _.isFinite)) return null; | |||
return ( | |||
<line | |||
className="marker-line" | |||
className={`${getValue(lineClassName, d, i)}`} |
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.
does this need to be in strings?
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.
not sure what you mean by this but to clarify getValue
takes as its first argument a value or accessor function. so if lineClassName is a value (a string) then it's returned, if it's a function then it's the result of that function applied with the rest of the arguments
const tickType = getTickType(this.props); | ||
return ( | ||
<g className="rct-marker-line-chart"> | ||
{tickType === "RangeValue" |
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.
is RangeValue
something used across multiple files, and if so should this string be abstracted into a constants file?
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.
on inspection it's a tickType conceptually used only for MarkerLineChart
src/RangeRect.js
Outdated
@@ -85,7 +85,7 @@ export default class RangeRect extends React.Component { | |||
`RangeRect.props.yScale is not a valid d3 scale` | |||
); | |||
|
|||
const className = `chart-range-rect ${this.props.className || ""}`; | |||
const className = `${this.props.className || ""}`; |
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 remove the string
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.
good call!
* Histogram improvements + tests (#57) * Add react-docgen to devDependencies * Histogram improvements - calculate yDomain and based off given data. Include mouse interaction and styling props. Add tests. * Test horizontal props for BarChart * Histogram - move binning into render function to handle dynamic data, make value prop a function, improve docs, remove unused code * rebuild docs * Integrate prettier & eslint code styles + add linting as part of npm test (#58) * Add prettier & eslint code style rules * Include eslint process with npm test * Clean up and refactor (#59) * Add prettier & eslint code style rules * Remove legacy code and evaluate any todos * Only send valid XYPlot props to children. Resolves #22 * Check against master list of scaleTypes * Implement invertX and invertY scale * Alphabetically sort props displayed on docs * Update documentation for x and y axis labels and titles * Clean up code and todos * includeXZero and includeYZero props + test * feature(yaml): add ci/cd (#60) * feature(version): version bump (#61) * feature(version): version bump * feature(lockfile): add a lockfile * Clean up multiple warning logs and fix regression on children components not getting their defaultProps (#64) * Include css in root and add less -> css to build process (#63) * Include css in root and add to build process * Update readme directions to run examples * add AreaBarChart spec (#65) * Namespace css classes + update class and style props where applicable (#66) * AreaChartBar namespace * AreaChart namespace * AreaHeatMap namespace + accessor class and style funcs * BarChart update documentation * ColorHeatmap namespace and update documentation * FunnelChart namespace and accessors * Add lineStyle and lineClassName to KDE and remove unused prop in LineChart * MarketLineChart namespace and class and style accessors * RangeBarChart namespace * ScatterPlot namespace * PieChart documentation and updates * XYPlot namespace and underlying components * Add classes to linechart, remove unused styles * Namespace SankeyDiagram and updates to PieChart * Update tests * Update docs * Add backwards compatibility for markerLineClass * Update docs * Use className from props for RangeRect * Add disableMouseWheelZoom prop to ZoomContainer (#67) * Add disable mousewheel prop to reactochart * Update docs * 0.4.6 release (#68)
* Histogram improvements + tests (#57) * Add react-docgen to devDependencies * Histogram improvements - calculate yDomain and based off given data. Include mouse interaction and styling props. Add tests. * Test horizontal props for BarChart * Histogram - move binning into render function to handle dynamic data, make value prop a function, improve docs, remove unused code * rebuild docs * Integrate prettier & eslint code styles + add linting as part of npm test (#58) * Add prettier & eslint code style rules * Include eslint process with npm test * Clean up and refactor (#59) * Add prettier & eslint code style rules * Remove legacy code and evaluate any todos * Only send valid XYPlot props to children. Resolves #22 * Check against master list of scaleTypes * Implement invertX and invertY scale * Alphabetically sort props displayed on docs * Update documentation for x and y axis labels and titles * Clean up code and todos * includeXZero and includeYZero props + test * feature(yaml): add ci/cd (#60) * feature(version): version bump (#61) * feature(version): version bump * feature(lockfile): add a lockfile * Clean up multiple warning logs and fix regression on children components not getting their defaultProps (#64) * Include css in root and add less -> css to build process (#63) * Include css in root and add to build process * Update readme directions to run examples * add AreaBarChart spec (#65) * Namespace css classes + update class and style props where applicable (#66) * AreaChartBar namespace * AreaChart namespace * AreaHeatMap namespace + accessor class and style funcs * BarChart update documentation * ColorHeatmap namespace and update documentation * FunnelChart namespace and accessors * Add lineStyle and lineClassName to KDE and remove unused prop in LineChart * MarketLineChart namespace and class and style accessors * RangeBarChart namespace * ScatterPlot namespace * PieChart documentation and updates * XYPlot namespace and underlying components * Add classes to linechart, remove unused styles * Namespace SankeyDiagram and updates to PieChart * Update tests * Update docs * Add backwards compatibility for markerLineClass * Update docs * Use className from props for RangeRect * Add disableMouseWheelZoom prop to ZoomContainer (#67) * Add disable mousewheel prop to reactochart * Update docs * 0.4.6 release (#68) * Update README.md to include directions for importing styles (#71) * add ColorHeatmap spec (#72) * add ColorHeatmap spec * generate build docs * Add step labeling to sankey (#73) * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * PR review + documentation * Better ternary * Update changelog and bump version (#74)
* Histogram improvements + tests (#57) * Add react-docgen to devDependencies * Histogram improvements - calculate yDomain and based off given data. Include mouse interaction and styling props. Add tests. * Test horizontal props for BarChart * Histogram - move binning into render function to handle dynamic data, make value prop a function, improve docs, remove unused code * rebuild docs * Integrate prettier & eslint code styles + add linting as part of npm test (#58) * Add prettier & eslint code style rules * Include eslint process with npm test * Clean up and refactor (#59) * Add prettier & eslint code style rules * Remove legacy code and evaluate any todos * Only send valid XYPlot props to children. Resolves #22 * Check against master list of scaleTypes * Implement invertX and invertY scale * Alphabetically sort props displayed on docs * Update documentation for x and y axis labels and titles * Clean up code and todos * includeXZero and includeYZero props + test * feature(yaml): add ci/cd (#60) * feature(version): version bump (#61) * feature(version): version bump * feature(lockfile): add a lockfile * Clean up multiple warning logs and fix regression on children components not getting their defaultProps (#64) * Include css in root and add less -> css to build process (#63) * Include css in root and add to build process * Update readme directions to run examples * add AreaBarChart spec (#65) * Namespace css classes + update class and style props where applicable (#66) * AreaChartBar namespace * AreaChart namespace * AreaHeatMap namespace + accessor class and style funcs * BarChart update documentation * ColorHeatmap namespace and update documentation * FunnelChart namespace and accessors * Add lineStyle and lineClassName to KDE and remove unused prop in LineChart * MarketLineChart namespace and class and style accessors * RangeBarChart namespace * ScatterPlot namespace * PieChart documentation and updates * XYPlot namespace and underlying components * Add classes to linechart, remove unused styles * Namespace SankeyDiagram and updates to PieChart * Update tests * Update docs * Add backwards compatibility for markerLineClass * Update docs * Use className from props for RangeRect * Add disableMouseWheelZoom prop to ZoomContainer (#67) * Add disable mousewheel prop to reactochart * Update docs * 0.4.6 release (#68) * Update README.md to include directions for importing styles (#71) * add ColorHeatmap spec (#72) * add ColorHeatmap spec * generate build docs * Add step labeling to sankey (#73) * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * PR review + documentation * Better ternary * Update changelog and bump version (#74) * add AreaHeatmap, FunnelChart spec (#77) * add AreaHeatmap spec * add FunnelChart spec * feature(Standards): add in code of conduct and NOTICE file (#76) * Zoom container spec (#78) * Zoom Container spec * Added npm run test-files * Add eslint to tests (#79) * Add tests to linter * Update tests with lint-fix * Fix growl dependency via mocha (#80) * Fix growl dependency on mocha * Update package lock json * Update version and changelog (#81)
…#66) * AreaChartBar namespace * AreaChart namespace * AreaHeatMap namespace + accessor class and style funcs * BarChart update documentation * ColorHeatmap namespace and update documentation * FunnelChart namespace and accessors * Add lineStyle and lineClassName to KDE and remove unused prop in LineChart * MarketLineChart namespace and class and style accessors * RangeBarChart namespace * ScatterPlot namespace * PieChart documentation and updates * XYPlot namespace and underlying components * Add classes to linechart, remove unused styles * Namespace SankeyDiagram and updates to PieChart * Update tests * Update docs * Add backwards compatibility for markerLineClass * Update docs * Use className from props for RangeRect
* Histogram improvements + tests (#57) * Add react-docgen to devDependencies * Histogram improvements - calculate yDomain and based off given data. Include mouse interaction and styling props. Add tests. * Test horizontal props for BarChart * Histogram - move binning into render function to handle dynamic data, make value prop a function, improve docs, remove unused code * rebuild docs * Integrate prettier & eslint code styles + add linting as part of npm test (#58) * Add prettier & eslint code style rules * Include eslint process with npm test * Clean up and refactor (#59) * Add prettier & eslint code style rules * Remove legacy code and evaluate any todos * Only send valid XYPlot props to children. Resolves #22 * Check against master list of scaleTypes * Implement invertX and invertY scale * Alphabetically sort props displayed on docs * Update documentation for x and y axis labels and titles * Clean up code and todos * includeXZero and includeYZero props + test * feature(yaml): add ci/cd (#60) * feature(version): version bump (#61) * feature(version): version bump * feature(lockfile): add a lockfile * Clean up multiple warning logs and fix regression on children components not getting their defaultProps (#64) * Include css in root and add less -> css to build process (#63) * Include css in root and add to build process * Update readme directions to run examples * add AreaBarChart spec (#65) * Namespace css classes + update class and style props where applicable (#66) * AreaChartBar namespace * AreaChart namespace * AreaHeatMap namespace + accessor class and style funcs * BarChart update documentation * ColorHeatmap namespace and update documentation * FunnelChart namespace and accessors * Add lineStyle and lineClassName to KDE and remove unused prop in LineChart * MarketLineChart namespace and class and style accessors * RangeBarChart namespace * ScatterPlot namespace * PieChart documentation and updates * XYPlot namespace and underlying components * Add classes to linechart, remove unused styles * Namespace SankeyDiagram and updates to PieChart * Update tests * Update docs * Add backwards compatibility for markerLineClass * Update docs * Use className from props for RangeRect * Add disableMouseWheelZoom prop to ZoomContainer (#67) * Add disable mousewheel prop to reactochart * Update docs * 0.4.6 release (#68)
* Histogram improvements + tests (#57) * Add react-docgen to devDependencies * Histogram improvements - calculate yDomain and based off given data. Include mouse interaction and styling props. Add tests. * Test horizontal props for BarChart * Histogram - move binning into render function to handle dynamic data, make value prop a function, improve docs, remove unused code * rebuild docs * Integrate prettier & eslint code styles + add linting as part of npm test (#58) * Add prettier & eslint code style rules * Include eslint process with npm test * Clean up and refactor (#59) * Add prettier & eslint code style rules * Remove legacy code and evaluate any todos * Only send valid XYPlot props to children. Resolves #22 * Check against master list of scaleTypes * Implement invertX and invertY scale * Alphabetically sort props displayed on docs * Update documentation for x and y axis labels and titles * Clean up code and todos * includeXZero and includeYZero props + test * feature(yaml): add ci/cd (#60) * feature(version): version bump (#61) * feature(version): version bump * feature(lockfile): add a lockfile * Clean up multiple warning logs and fix regression on children components not getting their defaultProps (#64) * Include css in root and add less -> css to build process (#63) * Include css in root and add to build process * Update readme directions to run examples * add AreaBarChart spec (#65) * Namespace css classes + update class and style props where applicable (#66) * AreaChartBar namespace * AreaChart namespace * AreaHeatMap namespace + accessor class and style funcs * BarChart update documentation * ColorHeatmap namespace and update documentation * FunnelChart namespace and accessors * Add lineStyle and lineClassName to KDE and remove unused prop in LineChart * MarketLineChart namespace and class and style accessors * RangeBarChart namespace * ScatterPlot namespace * PieChart documentation and updates * XYPlot namespace and underlying components * Add classes to linechart, remove unused styles * Namespace SankeyDiagram and updates to PieChart * Update tests * Update docs * Add backwards compatibility for markerLineClass * Update docs * Use className from props for RangeRect * Add disableMouseWheelZoom prop to ZoomContainer (#67) * Add disable mousewheel prop to reactochart * Update docs * 0.4.6 release (#68) * Update README.md to include directions for importing styles (#71) * add ColorHeatmap spec (#72) * add ColorHeatmap spec * generate build docs * Add step labeling to sankey (#73) * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * PR review + documentation * Better ternary * Update changelog and bump version (#74)
* Histogram improvements + tests (#57) * Add react-docgen to devDependencies * Histogram improvements - calculate yDomain and based off given data. Include mouse interaction and styling props. Add tests. * Test horizontal props for BarChart * Histogram - move binning into render function to handle dynamic data, make value prop a function, improve docs, remove unused code * rebuild docs * Integrate prettier & eslint code styles + add linting as part of npm test (#58) * Add prettier & eslint code style rules * Include eslint process with npm test * Clean up and refactor (#59) * Add prettier & eslint code style rules * Remove legacy code and evaluate any todos * Only send valid XYPlot props to children. Resolves #22 * Check against master list of scaleTypes * Implement invertX and invertY scale * Alphabetically sort props displayed on docs * Update documentation for x and y axis labels and titles * Clean up code and todos * includeXZero and includeYZero props + test * feature(yaml): add ci/cd (#60) * feature(version): version bump (#61) * feature(version): version bump * feature(lockfile): add a lockfile * Clean up multiple warning logs and fix regression on children components not getting their defaultProps (#64) * Include css in root and add less -> css to build process (#63) * Include css in root and add to build process * Update readme directions to run examples * add AreaBarChart spec (#65) * Namespace css classes + update class and style props where applicable (#66) * AreaChartBar namespace * AreaChart namespace * AreaHeatMap namespace + accessor class and style funcs * BarChart update documentation * ColorHeatmap namespace and update documentation * FunnelChart namespace and accessors * Add lineStyle and lineClassName to KDE and remove unused prop in LineChart * MarketLineChart namespace and class and style accessors * RangeBarChart namespace * ScatterPlot namespace * PieChart documentation and updates * XYPlot namespace and underlying components * Add classes to linechart, remove unused styles * Namespace SankeyDiagram and updates to PieChart * Update tests * Update docs * Add backwards compatibility for markerLineClass * Update docs * Use className from props for RangeRect * Add disableMouseWheelZoom prop to ZoomContainer (#67) * Add disable mousewheel prop to reactochart * Update docs * 0.4.6 release (#68) * Update README.md to include directions for importing styles (#71) * add ColorHeatmap spec (#72) * add ColorHeatmap spec * generate build docs * Add step labeling to sankey (#73) * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * Add step labeling functionality to sankey * Update tests for sankey to include step labels * Update docs * PR review + documentation * Better ternary * Update changelog and bump version (#74) * add AreaHeatmap, FunnelChart spec (#77) * add AreaHeatmap spec * add FunnelChart spec * feature(Standards): add in code of conduct and NOTICE file (#76) * Zoom container spec (#78) * Zoom Container spec * Added npm run test-files * Add eslint to tests (#79) * Add tests to linter * Update tests with lint-fix * Fix growl dependency via mocha (#80) * Fix growl dependency on mocha * Update package lock json * Update version and changelog (#81)
rct-
markerLineClass
->markerLineClassName
in PieChart