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

TINY-10916: Transparent color is converted into #00000 #9649

Merged
merged 17 commits into from
May 21, 2024

Conversation

ArvinJ-H
Copy link
Contributor

@ArvinJ-H ArvinJ-H commented May 15, 2024

Related Ticket:
TINY-10916

Description of Changes:

  • Added a seperate if statement to cover the edge case of transparent

Pre-checks:

  • Changelog entry added
  • Tests have been added (if applicable)
  • Branch prefixed with feature/, hotfix/ or spike/

Review:

  • Milestone set
  • Docs ticket created (if applicable)

GitHub issues (if applicable):
#9391

@ArvinJ-H ArvinJ-H requested a review from a team as a code owner May 15, 2024 07:08
@ArvinJ-H ArvinJ-H added this to the 7.2.0 milestone May 15, 2024
@ArvinJ-H ArvinJ-H requested review from a team, ltrouton, shanmen-tiny and danoaky-tiny and removed request for a team May 15, 2024 07:08
@ArvinJ-H ArvinJ-H requested review from spocke and TheSpyder May 16, 2024 03:17
@ArvinJ-H ArvinJ-H requested a review from TheSpyder May 17, 2024 06:21
Copy link
Member

@TheSpyder TheSpyder left a comment

Choose a reason for hiding this comment

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

I think this will make a lot of people happy 👍

modules/tinymce/src/core/main/ts/api/html/Styles.ts Outdated Show resolved Hide resolved
@ArvinJ-H ArvinJ-H merged commit c1ecd27 into main May 21, 2024
3 checks passed
@ArvinJ-H ArvinJ-H deleted the feature/TINY-10916 branch May 21, 2024 05:46
const fromString = (rgbaString: string): Optional<Rgba> => {
if (rgbaString === 'transparent') {
return Optional.some(rgbaColour(0, 0, 0, 0));
const getColorFormat = (colorString: string): string => {
Copy link
Member

Choose a reason for hiding this comment

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

This return should've been a sum type, not a string.

All I really wanted was some sort of function to run rgbRegex.test - not a full "get format" method when we only ever want to check one of the conditions...

ArvinJ-H added a commit that referenced this pull request May 28, 2024
* TINY-10916: Convert transparent to fully transparent black in Styles.ts

* TINY-10916: Add changelog

* TINY-10916: Prevent transparent from been converted

* TINY-10916: Add and refactor tests

* Update .changes/unreleased/tinymce-TINY-10916-2024-05-15.yaml

Co-authored-by: Andrew Herron <thespyder@programmer.net>

* TINY-10916: Add more test

* TINY-10916: Add more tests

* TINY-10916: Update rgba regex to do exact match.

* TINY-10916: Remove transparent string check (WIP)

* TINY-10916: Rever rgba regex to rgb regex

* TINY-10916: Lint fix

* TINY-10916: Remove global match in rgb regex

* TINY-10916: Refactor code, add support and test for new format

* Update tinymce-TINY-10916-2024-05-15.yaml

Co-authored-by: spocke <spocke@moxiecode.com>

* TINY-10916: Update rgba regex

* TINY-10916: Add RgbaColour test

* TINY-10916: Update rgba regex and test

---------

Co-authored-by: Andrew Herron <thespyder@programmer.net>
Co-authored-by: spocke <spocke@moxiecode.com>
ArvinJ-H added a commit that referenced this pull request May 30, 2024
* TINY-10916: Convert transparent to fully transparent black in Styles.ts

* TINY-10916: Add changelog

* TINY-10916: Prevent transparent from been converted

* TINY-10916: Add and refactor tests

* Update .changes/unreleased/tinymce-TINY-10916-2024-05-15.yaml



* TINY-10916: Add more test

* TINY-10916: Add more tests

* TINY-10916: Update rgba regex to do exact match.

* TINY-10916: Remove transparent string check (WIP)

* TINY-10916: Rever rgba regex to rgb regex

* TINY-10916: Lint fix

* TINY-10916: Remove global match in rgb regex

* TINY-10916: Refactor code, add support and test for new format

* Update tinymce-TINY-10916-2024-05-15.yaml



* TINY-10916: Update rgba regex

* TINY-10916: Add RgbaColour test

* TINY-10916: Update rgba regex and test

---------

Co-authored-by: Andrew Herron <thespyder@programmer.net>
Co-authored-by: spocke <spocke@moxiecode.com>
ArvinJ-H added a commit that referenced this pull request Jun 5, 2024
* TINY-10897: Bumped version for next patch release

* TINY-10974: fix tests for new Firefox version (126) (#9666) (#9668)

* TINY-10974: fix tests fro new Firefox version (126)

* TINY-10974: add comment

* TINY-10974: typo

* TINY-10904: now polaris manage acronyms correctly (#9671)

* TINY-10904: now polaris manage acronyms correctly

* TINY-10904: improve test

* TINY-10904: add changelog entry

* TINY-10904: [test] fix tests

* TINY-10904: fix error in rebase

* TINY-10904: typo

* TINY-10904: improve test

* TINY-10904: [TEST] improve preformance

* TINY-10904: removed doplication

* TINY-10904: refactor

* TINY-10904: refactor

* TINY-10904: refactor without mutable boolean

* TINY-10904: remove useless comment

* TINY-10916: Transparent color is converted into #00000 (#9649) (#9670)

* TINY-10916: Convert transparent to fully transparent black in Styles.ts

* TINY-10916: Add changelog

* TINY-10916: Prevent transparent from been converted

* TINY-10916: Add and refactor tests

* Update .changes/unreleased/tinymce-TINY-10916-2024-05-15.yaml



* TINY-10916: Add more test

* TINY-10916: Add more tests

* TINY-10916: Update rgba regex to do exact match.

* TINY-10916: Remove transparent string check (WIP)

* TINY-10916: Rever rgba regex to rgb regex

* TINY-10916: Lint fix

* TINY-10916: Remove global match in rgb regex

* TINY-10916: Refactor code, add support and test for new format

* Update tinymce-TINY-10916-2024-05-15.yaml



* TINY-10916: Update rgba regex

* TINY-10916: Add RgbaColour test

* TINY-10916: Update rgba regex and test

---------

Co-authored-by: Andrew Herron <thespyder@programmer.net>
Co-authored-by: spocke <spocke@moxiecode.com>

* TINY-10936: Prepare changelog for release (#9682)

* TINY-10936: Prepare changelog for release

* TINY-10936: Recover polaris change log

* TINY-10936: Update changelog

---------

Co-authored-by: Spocke <spocke@moxiecode.com>
Co-authored-by: lorenzo-pomili <pomili.lorenzo85@gmail.com>
Co-authored-by: Andrew Herron <thespyder@programmer.net>
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.

👍 force_hex_color - Converts background-color:transparent to background-color:#000000 (black)
5 participants