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

Store the color directly instead of the RGBA values #49

Merged
merged 4 commits into from
Feb 28, 2024

Conversation

mbarringer
Copy link

Currently, MarkupStyleColor stores the RGBA values directly, which doesn't work with dynamic colors, so toggling from white mode to dark mode leaves the text dark and illegible.

This PR changes MarkupStyleColor to store a provided UIColor or NSColor directly, rather than converting it to RGBA.

@zhgchgli0718
Copy link
Member

Could you also take a look at the unit tests that are failing and fix them?, thank you.

@mbarringer
Copy link
Author

The related unit tests are fixed to compare the colors directly, but the snapshot tests fail even against HEAD, so I don't think that has anything to do with my changes.

@zhgchgli0718
Copy link
Member

I'll check it later, thank you.

Copy link

codecov bot commented Feb 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (75f4f6d) 77.43% compared to head (a9ace27) 77.41%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
- Coverage   77.43%   77.41%   -0.02%     
==========================================
  Files         119      119              
  Lines        4343     4340       -3     
==========================================
- Hits         3363     3360       -3     
  Misses        980      980              
Files Coverage Δ
...rkupParser/Core/MarkupStyle/MarkupStyleColor.swift 95.55% <100.00%> (-0.15%) ⬇️
...MarkupParserTests/Core/MarkupStyleColorTests.swift 100.00% <100.00%> (ø)
...MLTagStyleAttributeToMarkupStyleVisitorTests.swift 95.40% <100.00%> (ø)

@zhgchgli0718
Copy link
Member

will release ASAP

@zhgchgli0718 zhgchgli0718 merged commit 77360a7 into ZhgChgLi:main Feb 28, 2024
3 checks passed
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