Skip to content

Revert "Create rainbow_cube.svg"#214

Merged
jfly merged 1 commit into
mainfrom
revert-212-main
Mar 31, 2026
Merged

Revert "Create rainbow_cube.svg"#214
jfly merged 1 commit into
mainfrom
revert-212-main

Conversation

@jfly
Copy link
Copy Markdown
Member

@jfly jfly commented Mar 31, 2026

Reverts #212

@VictorMdN, FYI, your change caused some tests to fail: https://github.com/cubing/icons/actions/runs/23811841789.

We recently made our tests stricter, so this isn't a surprise. Could you send in a new PR with the tests passing?

@jfly jfly merged commit 3df9b34 into main Mar 31, 2026
4 checks passed
@jfly jfly deleted the revert-212-main branch March 31, 2026 17:57
@VictorMdN
Copy link
Copy Markdown
Contributor

Some errors are easy to fix, but the test no longet support masks. I need this for the code to pass the tests.

@jfly
Copy link
Copy Markdown
Member Author

jfly commented Apr 18, 2026

Which test is preventing masks? Why do you need them? I'm ok allowing them, just curious.

@VictorMdN
Copy link
Copy Markdown
Contributor

Expected to be one of: [ "svg", "g", "path", "circle", "defs" ] Received: "mask" at checkElement (/home/runner/work/icons/icons/script/test-svg.spec.ts:126:60)

Received: "white" at checkElement (/home/runner/work/icons/icons/script/test-svg.spec.ts:76:69) at checkElement (/home/runner/work/icons/icons/script/test-svg.spec.ts:91:9)

These two.

I used a mask to simplify the definition. Didn't need to draw the stickers, just the cuts. This way, I didn't have to calculate size or position of the stickers (given the size of the cuts) and I could focus on making it mathematically accurate.

@jfly
Copy link
Copy Markdown
Member Author

jfly commented May 4, 2026

@VictorMdN, that sounds totally reasonable to me. Could you send in another PR that relaxes those tests and adds your icon?

@lgarron
Copy link
Copy Markdown
Member

lgarron commented May 5, 2026

Unfortunately, ImageMagick does not handle the <mask> element properly — at least not ImageMagick 7.1.2-21 on my macOS 26.4.1 system. Since ImageMagick is the de facto open-source choice for image processing, this means that it will break a whole bunch of use cases.

This is what the output of magick https://raw.githubusercontent.com/cubing/icons/c75eed3fe7a2b384b2e550bd139ddb24424580eb/src/svg/unofficial/rainbow_cube.svg rainbow_cube.svg.png looks like on my computer:

rainbow_cube svg

I would prefer to avoid <mask> unless we know how to make it compatible across a wide range of use cases.

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.

3 participants