Skip to content
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] tables: set table color in custom colors #3776

Closed
wants to merge 2 commits into from

Conversation

hokolomopo
Copy link
Contributor

@hokolomopo hokolomopo commented Feb 29, 2024

Description:

[IMP] table: add table colors to custom colors

When inserting a table with a style in the sheet, it could be useful
for the user to be able to paint cells in the same colors as the table
cells.

This commit adds the table colors to the custom colors plugin, so they
are available to the user.

Another idea would have been to replace the color pickers colors by
the table colors. But then we end up with dull and sad colors in the
color picker so we gave up on that.

Also fixed some bugs and strange behaviors in the custom colors plugin:

  • we compute and store the custom colors at each finalize, but the
    getter getCustomColors was re-computing the colors instead of using
    the stored ones.
  • the colors stored by the plugin weren't loaded at import until a
    command modifying the colors was executed.
  • the colors were filtered/validated multiple times (once when computing
    the colors, and once when adding them to the plugin state).
  • the colors were sorted, then added to a POJO, making the sorting useless.

[IMP] colors: reduce number of custom colors

This commit aims to reduce the number of custom colors during a
normal use of a spreadsheet and in the demo by replacing custom colors
by colors present in the color picker.

The following were changed:

  • default scorecard baseline colors
  • CF up/down arrows icons
  • lot of demo data colors and their equivalent in the demo test xlsx

Task: : 3775936

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

@robodoo
Copy link
Collaborator

robodoo commented Feb 29, 2024

@hokolomopo hokolomopo changed the title Master table color custom colors adrm [IMP] tables: set table color in custom colors Feb 29, 2024
@hokolomopo hokolomopo force-pushed the master-table-color-custom-colors-adrm branch from e2d0d17 to 3671d0a Compare February 29, 2024 13:30
When inserting a table with a style in the sheet, it could be useful
for the user to be able to paint cells in the same colors as the table
cells.

This commit adds the table colors to the custom colors plugin, so they
are available to the user.

Another idea would have been to replace the color pickers colors by
the table colors. But then we end up with dull and sad colors in the
color picker so we gave up on that.

Also fixed some bugs and strange behaviors in the custom colors plugin:
- we compute and store the custom colors at each finalize, but the
getter `getCustomColors` was re-computing the colors instead of using
the stored ones.
- the colors stored by the plugin weren't loaded at import until a
command modifying the colors was executed.
- the colors were filtered/validated multiple times (once when computing
the colors, and once when adding them to the plugin state).
- the colors were sorted, then added to a POJO, making the sorting useless.

Task: 3775936
This commit aims to reduce the number of custom colors during a
normal use of a spreadsheet and in the demo by replacing custom colors
by colors present in the color picker.

The following were changed:
- default scorecard baseline colors
- CF up/down arrows icons
- lot of demo data colors and their equivalent in the demo test xlsx

Task: 3775936
@hokolomopo hokolomopo force-pushed the master-table-color-custom-colors-adrm branch from 3671d0a to 55c3f04 Compare March 1, 2024 13:24
Copy link
Collaborator

@LucasLefevre LucasLefevre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo r+ rebase-ff

@robodoo
Copy link
Collaborator

robodoo commented Mar 4, 2024

Merge method set to rebase and fast-forward.

robodoo pushed a commit that referenced this pull request Mar 4, 2024
When inserting a table with a style in the sheet, it could be useful
for the user to be able to paint cells in the same colors as the table
cells.

This commit adds the table colors to the custom colors plugin, so they
are available to the user.

Another idea would have been to replace the color pickers colors by
the table colors. But then we end up with dull and sad colors in the
color picker so we gave up on that.

Also fixed some bugs and strange behaviors in the custom colors plugin:
- we compute and store the custom colors at each finalize, but the
getter `getCustomColors` was re-computing the colors instead of using
the stored ones.
- the colors stored by the plugin weren't loaded at import until a
command modifying the colors was executed.
- the colors were filtered/validated multiple times (once when computing
the colors, and once when adding them to the plugin state).
- the colors were sorted, then added to a POJO, making the sorting useless.

Task: 3775936
Part-of: #3776
robodoo pushed a commit that referenced this pull request Mar 4, 2024
This commit aims to reduce the number of custom colors during a
normal use of a spreadsheet and in the demo by replacing custom colors
by colors present in the color picker.

The following were changed:
- default scorecard baseline colors
- CF up/down arrows icons
- lot of demo data colors and their equivalent in the demo test xlsx

closes #3776

Task: 3775936
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
@robodoo robodoo closed this Mar 4, 2024
@robodoo robodoo added the 17.2 label Mar 4, 2024
@fw-bot fw-bot deleted the master-table-color-custom-colors-adrm branch March 18, 2024 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants