-
Notifications
You must be signed in to change notification settings - Fork 31
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
[FIX] Charts: fix incoherent panel state #2929
Conversation
8311491
to
ad9293f
Compare
ad9293f
to
807ac9b
Compare
807ac9b
to
914e227
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.
Seems to work 👍 I'm not gonna comment on the SelectionInput changes, as long as it works I don't care, we should burn this whole things to the ground and code something better.
Needs a rebase :)
src/components/side_panel/chart/gauge_chart_panel/gauge_chart_config_panel.ts
Outdated
Show resolved
Hide resolved
914e227
to
30268d3
Compare
30268d3
to
5444acd
Compare
b47bfb5
to
32d431e
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.
👍
32d431e
to
3b81f59
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.
is it possible to split the commit in 2 commits? one for each issue described. Or is it chiant ?
It's easier to review when each change is isolated. It's also easier for the future when someone will try to understand it.
3b81f59
to
3a608ea
Compare
@LucasLefevre : the fix is the same for both issues, but the code has been simplified as discussed together so it should be easier to review :) |
src/helpers/charts/bar_chart.ts
Outdated
@@ -142,7 +147,7 @@ export class BarChart extends AbstractChart { | |||
} | |||
|
|||
getDefinition(): BarChartDefinition { | |||
return this.getDefinitionWithSpecificDataSets(this.dataSets, this.labelRange); | |||
return this.getDefinitionWithSpecificDataSets(this.fullDataSets, this.labelRange); |
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 don't understand the issue/fix anymore :/
in a DataSet
, dataRange
includes labelRange
...so it should end up being the same dataset string in the definition 🤔
I'll wait until you come back
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 data is lost inside createDataSets
when there's a single cell range and it includes (only) the title => the dataset is dropped (it should not)
Let's try reverting the fix below
see #2442
3a608ea
to
16fc7a0
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.
only some cleaning I think 😉
@@ -182,11 +182,6 @@ export function createDataSets( | |||
) | |||
); | |||
} | |||
} else if (zone.left === zone.right && zone.top === zone.bottom) { |
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.
In the end, all the diff in this PR except this one is useless right ? (and the tests)
Could you revert the useless diff ?
Even if some changes are clearer, it's not worth it here IMO (especially for a bug fix in stable). Useless changes makes the review more difficult, forward-ports (and future forward-ports) more likely to conflict.
As a general rule of thumb, keep the diff minimal for bug fixes in stable 😉 Refactorings are better in master and in different commits (not burried in a bug fix or a new feature)
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.
Yes, you're right. I though the other diff with the this.dataSetsHaveTitle
things were necessary, but not with this change :)
16fc7a0
to
7795ac2
Compare
Task Description This task aims to adress some issues in the side pannel of a chart: 1. When having only one point in a dataseries and selecting "First row as header", the point dissapear from the chart (legit), but we don't have the possibility to uncheck this checkbox. 2. When having a normal dataset and another dataset containing one point, checking the "... as header" checkbox works has expected, but unchecking it don't make the 'one-point' dataset come back Related Task: Task: 3380568
7795ac2
to
8331d6e
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.
robodoo r+
Thanks :)
Task Description This task aims to adress some issues in the side pannel of a chart: 1. When having only one point in a dataseries and selecting "First row as header", the point dissapear from the chart (legit), but we don't have the possibility to uncheck this checkbox. 2. When having a normal dataset and another dataset containing one point, checking the "... as header" checkbox works has expected, but unchecking it don't make the 'one-point' dataset come back Related Task: closes #2929 Task: 3380568 Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
@anhe-odoo @LucasLefevre this pull request has forward-port PRs awaiting action (not merged or closed): |
Description:
This task aims to address some issues in the side panel of a chart:
row as header", the point disappear from the chart (legit), but
we don't have the possibility to uncheck this checkbox.
point, checking the "... as header" checkbox works has expected, but
unchecking it don't make the 'one-point' dataset come back
Related Task:
Task: 3380568
Related Task(s):
Review Checklist