-
Notifications
You must be signed in to change notification settings - Fork 39
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
[FW][FIX] chart: wrong line dot size #4156
Conversation
@hokolomopo @pro-odoo cherrypicking of pull request #4066 failed. stdout:
stderr:
Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?). In the former case, you may want to edit this PR message as well. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
There was a problem that the doz sizes in the line charts were at their "hover" size by default. This was caused by the "active" parameters given to window.chart.update(), which updated the chart animations to be in "active" state. Task: 3697660
There was an `useEffect` in the `chartJS` component to update the chartJS object on runtime change. There was 2 problems: 1) useEffect on object compare the references, so if the chart plugin was ever changed to return copy of runtime it would break 2) the chart plugin re-build every chartRuntime on each command that could affect a chart. This created a chart update at each UPDATE_CELL even if the actual runtime didn't change. This commit replace the `useEffect` dependency with a `deepEquals` Task: 3697660
8994a91
to
ecd03d6
Compare
@robodoo r+ |
There was a problem that the doz sizes in the line charts were at their "hover" size by default. This was caused by the "active" parameters given to window.chart.update(), which updated the chart animations to be in "active" state. Task: 3697660 Part-of: #4156
There was an `useEffect` in the `chartJS` component to update the chartJS object on runtime change. There was 2 problems: 1) useEffect on object compare the references, so if the chart plugin was ever changed to return copy of runtime it would break 2) the chart plugin re-build every chartRuntime on each command that could affect a chart. This created a chart update at each UPDATE_CELL even if the actual runtime didn't change. This commit replace the `useEffect` dependency with a `deepEquals` closes #4156 Task: 3697660 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com> Signed-off-by: Adrien Minne (adrm) <adrm@odoo.com>
[FIX] chart: wrong line dot size
There was a problem that the doz sizes in the line charts were at their
"hover" size by default. This was caused by the "active" parameters
given to window.chart.update(), which updated the chart animations
to be in "active" state.
[FIX] chart: avoid useless chart updates
There was an
useEffect
in thechartJS
component to update thechartJS object on runtime change. There was 2 problems:
was ever changed to return copy of runtime it would break
could affect a chart. This created a chart update at each UPDATE_CELL
even if the actual runtime didn't change.
This commit replace the
useEffect
dependency with adeepEquals
Task: : 3697660
review checklist
Forward-Port-Of: #4066