-
Notifications
You must be signed in to change notification settings - Fork 50
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
[IMP] Charts: keep and disable useless dataseries for pyramid chart #5782
base: master
Are you sure you want to change the base?
[IMP] Charts: keep and disable useless dataseries for pyramid chart #5782
Conversation
d3539fe
to
c963e50
Compare
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.
🤟
nextProps.enabled?.join() !== this.props.enabled?.join() && | ||
nextProps.enabled?.join() !== this.store.enabled.join() |
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.
deepEquals instead ?
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.
Got a stacktrace with deepEquals when running the tests :/
7c0c0a7
to
b19ddd8
Compare
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.
boup boup 🤖
src/components/side_panel/chart/building_blocks/data_series/data_series.ts
Outdated
Show resolved
Hide resolved
src/components/side_panel/chart/geo_chart_panel/geo_chart_config_panel.ts
Outdated
Show resolved
Hide resolved
b19ddd8
to
04c9172
Compare
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.
Functional question: should be we able to edit the unused ranges ? ATM when adding a third range to a pyramid, we can edit the input, then after pressing confirm it's impossible to edit the range value. And when editing the selection input, the disabled ranges are not colored, but still have colored highlights in the grid.
I don't have strong feelings on this, I think it's fine as it, but it probably deserves a discussion with a "po".
src/components/side_panel/chart/pyramid_chart/pyramid_chart_config_panel.xml
Outdated
Show resolved
Hide resolved
src/components/side_panel/chart/pyramid_chart/pyramid_chart_config_panel.ts
Outdated
Show resolved
Hide resolved
src/components/side_panel/chart/building_blocks/generic_side_panel/config_panel.ts
Outdated
Show resolved
Hide resolved
04c9172
to
bf41eaf
Compare
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.
Some nitpicks/small things, otherwise LGTM :)
@@ -25,11 +29,13 @@ | |||
t-on-keydown="onKeydown" | |||
t-att-value="range.xc" | |||
t-att-style="getColor(range)" | |||
t-att-title="range.disabled ? props.disabledTitle : ''" |
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-att-title="range.disabled ? props.disabledTitle : ''" | |
t-att-title="range.disabled ? props.disabledTitle : undefined" |
nitpick. I think this avoids having empty title in the HTML and having to change the snapshots
@@ -47,6 +50,8 @@ interface Props { | |||
onSelectionRemoved?: (index: number) => void; | |||
onSelectionConfirmed?: () => void; | |||
colors?: Color[]; | |||
disabledRanges?: boolean[]; | |||
disabledTitle?: 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.
disabledTitle?: string; | |
disabledRangeTitle?: string; |
nitpick. Probably a bit better ?
Task Description Currently, when creating a pyramid chart with more than two data series, we are removing the unused ones, which lead to a loss of data series when switching back to another chart type. This PR aims to change this behavior, by keeping all the data series but keeping only the first two in the runtime, and showing the redundant series as disabled in the config panel. Related Task Task: 4570622
bf41eaf
to
46972d3
Compare
Task Description
Currently, when creating a pyramid chart with more than two data series, we are removing the unused ones, which lead to a loss of data series when switching back to another chart type.
This PR aims to change this behavior, by keeping all the data series but keeping only the first two in the runtime, and showing the redondant series as disabled in the config panel.
Related Task
review checklist