Skip to content

[FW][FIX] selection input: highlight color not sync with range color#5811

Closed
fw-bot wants to merge 1 commit intomasterfrom
master-master-fix-selection-input-reorder-colors-adrm-416262-fw
Closed

[FW][FIX] selection input: highlight color not sync with range color#5811
fw-bot wants to merge 1 commit intomasterfrom
master-master-fix-selection-input-reorder-colors-adrm-416262-fw

Conversation

@fw-bot
Copy link
Copy Markdown
Collaborator

@fw-bot fw-bot commented Feb 27, 2025

Description

After re-ordering the selection inputs of a chart, the highlight colors would not be the same as the range colors.

This was because the store mutator updateColors would not update the store range colors. And store.highlights is based on ranges.colors while store.selectionInputs ignores the colors of store.ranges.

The test update of colors are taken into account was also a bit sketchy. We would modify the props.colors array in place, thus the condition nextProps.colors !== props.colors would never be satisfied, and store.updateColors would never be called.

Task: 4577803

review checklist

  • feature is organized in plugin, or UI components
  • support of duplicate sheet (deep copy)
  • in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • in model/UI: ranges are strings (to show the user)
  • undo-able commands (uses this.history.update)
  • multiuser-able commands (has inverse commands and transformations where needed)
  • new/updated/removed commands are documented
  • exportable in excel
  • translations (_t("qmsdf %s", abc))
  • unit tested
  • clean commented code
  • track breaking changes
  • doc is rebuild (npm run doc)
  • status is correct in Odoo

Forward-Port-Of: #5734

After re-ordering the selection inputs of a chart, the highlight colors
would not be the same as the range colors.

This was because the store mutator `updateColors` would not update
the store range colors. And `store.highlights` is based on
`ranges.colors` while `store.selectionInputs` ignores the colors
of `store.ranges`.

The test `update of colors are taken into account` was also a bit
sketchy. We would modify the `props.colors` array in place, thus
the condition `nextProps.colors !== props.colors` would never
be satisfied, and `store.updateColors` would never be called.

Task: 4577803
X-original-commit: 0bea738
@robodoo
Copy link
Copy Markdown
Collaborator

robodoo commented Feb 27, 2025

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Collaborator Author

fw-bot commented Feb 27, 2025

@hokolomopo @rrahir this PR targets master and is the last of the forward-port chain.

To merge the full chain, use

@robodoo r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@rrahir
Copy link
Copy Markdown
Collaborator

rrahir commented Feb 27, 2025

@robodoo r+

robodoo pushed a commit that referenced this pull request Feb 27, 2025
After re-ordering the selection inputs of a chart, the highlight colors
would not be the same as the range colors.

This was because the store mutator `updateColors` would not update
the store range colors. And `store.highlights` is based on
`ranges.colors` while `store.selectionInputs` ignores the colors
of `store.ranges`.

The test `update of colors are taken into account` was also a bit
sketchy. We would modify the `props.colors` array in place, thus
the condition `nextProps.colors !== props.colors` would never
be satisfied, and `store.updateColors` would never be called.

closes #5811

Task: 4577803
X-original-commit: 0bea738
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
@robodoo robodoo added the 18.3 label Feb 27, 2025
@robodoo robodoo closed this Feb 27, 2025
@fw-bot fw-bot deleted the master-master-fix-selection-input-reorder-colors-adrm-416262-fw branch March 13, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants