Repository navigation
fix(pdf): colour the Mostly true and Inaccurate verdict icons - #16
Merged
Merged
Conversation
The fact-check preset grew two verdicts, ☑️ Mostly true and 🔸 Inaccurate,
but the PDF tone map still knew only the original five. Both icons were
wrapped in the emoji span without a colour class, so Symbola drew them
as grey hairline outlines next to the coloured ✅ ⚠ ❓.
Give them their own colours (a lighter green, an amber between True and
Misleading), and add a test that reads the verdict icons straight from
presets/{en,ru}/factcheck.md so a new verdict can't miss the map again.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015RDD6r1JBR7wJRSEwWDpH2
|
🎉 This PR is included in version 1.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The fact-check preset now has two more verdicts, ☑️ Mostly true and 🔸 Inaccurate, but the PDF renderer's tone map (
_EMOJI_TONEinunread/bot/_pdf_worker.py) still listed only the original five. Both new icons were wrapped in the emoji span with no colour class, so in PDF reports Symbola drew them as grey outlines (☑, ◇) next to the coloured ✅ ⚠ ❓.emoji-mostly(lighter green) for ☑ andemoji-minor(amber, between True and Misleading) for 🔸, with matching rules in_PDF_CSS.presets/{en,ru}/factcheck.md, so a new verdict can't be left out of the map again.Related issue
n/a
Test plan
uv run pytest -q tests/test_pdf_fonts.py tests/test_factcheck_preset.py(49 passed)_pdf_worker.py(3 failures) and pass with the fixuv run ruff check/ruff format --checkon the changed filesChecklist
🤖 Generated with Claude Code
https://claude.ai/code/session_015RDD6r1JBR7wJRSEwWDpH2
Generated by Claude Code