Skip to content

Add support for stripColor#245

Merged
alexandercerutti merged 2 commits intoalexandercerutti:masterfrom
slootjes:master
May 28, 2025
Merged

Add support for stripColor#245
alexandercerutti merged 2 commits intoalexandercerutti:masterfrom
slootjes:master

Conversation

@slootjes
Copy link
Copy Markdown
Contributor

Description

First of all, thanks for this library!

I was trying a lot of combinations and noticed that as soon as I set a strip image/buffer, the primary fields text is always rendered with a white color and did not follow the labelColor like I would expect. I stumped upon some places that mentioned "stripColor", tried it and it's indeed working. I couldn't get tests running on Windows 11 with Powershell unfortunately, I only got errors from jest (SyntaxError: Cannot use import statement outside a module).

Hope this change also can help others facing the same issue.

Check relevant checkboxes

  • I've run tests (through npm test) and they passed
  • I generated a working Apple Wallet Pass after the change
  • Provided examples keep working after the change
  • This improvement is or might be a breaking change

Relevant information

Sources I could find about "stripColor":

@alexandercerutti
Copy link
Copy Markdown
Owner

Hey @slootjes, thank you for using passkit-generator and for contributing!

Jest issue is likely to be something related to how the process is run. I'm not sure how you are running the tests, but if you see the test commands, or the test command in .vscode/settings.json, you'll see that there's a flag to use ESM imports.

Talking about your change, thank you very much for the references.
I wonder if Apple forgot such property of if it is part of like a "private api". Not sure, but I've seen it as well from time to time in other places, but I've never added it.

Might sound stupid, but do you confirm it works with both RGB and HEX syntaxes? Just to be sure.

Let me know.

@slootjes
Copy link
Copy Markdown
Contributor Author

slootjes commented May 27, 2025 via email

@alexandercerutti
Copy link
Copy Markdown
Owner

alexandercerutti commented May 27, 2025

The test failing in this PR is because the tests use some certificates and private key I created and set as env var in Github, but they are apparently not accessible from jobs run in PRs. Dunno why. So it fallbacks to file system paths, but the file is not available.

Do not worry. I saw the changes but nothing can be broken with these changes.

@slootjes
Copy link
Copy Markdown
Contributor Author

Thanks for confirming.

I tested both hex and rgb and both are working as expected on an iPhone 16e with iOS 18.4.1.

Copy link
Copy Markdown
Owner

@alexandercerutti alexandercerutti left a comment

Choose a reason for hiding this comment

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

LGTM!

I'll merge it and release it later today. Thank you for your contribution, @slootjes!

If you could, also, leave a ⭐️ to the project, it would be great!

@slootjes
Copy link
Copy Markdown
Contributor Author

Amazing, thanks for your quick response. I've starred the repo and sent you a small donation for the hard work on this project, it's very useful :)

@alexandercerutti
Copy link
Copy Markdown
Owner

Thank you very much! 🚀

May I ask you in which context are you going to use (or are you already using) passkit-generator?

@slootjes
Copy link
Copy Markdown
Contributor Author

I will be using it to generate event type tickets with a QR code.

@alexandercerutti alexandercerutti merged commit 1b28661 into alexandercerutti:master May 28, 2025
1 of 2 checks passed
@alexandercerutti
Copy link
Copy Markdown
Owner

Released in v3.4.0 🎉 Thank you very much again for improving passkit-generator @slootjes!

@slootjes
Copy link
Copy Markdown
Contributor Author

Awesome, happy to help and thanks for the quick merge ans release!

alexandercerutti referenced this pull request in ianbale/passkit-generator Sep 7, 2025
Added stripColor to OverridablePassProps
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.

2 participants