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

feat: Implement colors in custom formatting for vaadin-spreadsheet #7148

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

thevaadinman
Copy link
Contributor

@thevaadinman thevaadinman commented Feb 25, 2025

Description

Fixes #6835. Does not introduce new public API. Enables the use of named colors and indexed colors
compatible with Excel: black, white, red, green, blue, yellow, magenta, cyan, as well as Color 1-56.

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/overview
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

@CLAassistant
Copy link

CLAassistant commented Feb 25, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@thevaadinman thevaadinman changed the title feat: Implement colors in custom formatting feat: Implement colors in custom formatting for vaadin-spreadsheet Feb 25, 2025
@thevaadinman
Copy link
Contributor Author

SonarCloud Code Analysis result can be ignored, it's hallucinating and complaining about existing code.
Submitted code now looks quite ugly after application of mandatory "beautification" step, which I suggest be dropped or tuned for the future.

Comment on lines 11 to 15
/*
* The Vaadin CI pipeline requires Vaadin's license header to be first in the file.
* While this file is modified, most of it was part of Apache POI, which is licensed
* under the Apache License, Version 2.0.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's exclude this class from the formatter to preserve the license header and not add our own:

flow-components/pom.xml

Lines 547 to 550 in 695e072

<excludes>
<!-- Do not modify GWT sources / license headers -->
<exclude>**/com/google/gwt/**/*.*</exclude>
</excludes>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll also return the file to its original unmangled state

@thevaadinman
Copy link
Contributor Author

Looks like I'll have to shim the custom cell formatting bits. This will take a while.

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@thevaadinman thevaadinman marked this pull request as draft February 26, 2025 15:20
@thevaadinman
Copy link
Contributor Author

There seems to be a hard-to-resolve issue with getting the reworked CellFormatPart class to load reliably. All tests thus far have worked locally, but something seems very different on the CI cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vaadin Flow Spreadsheet Conditional Formatting dataFormat color support feature
4 participants