Skip to content

fix(print): print links instead of hiding them #908 - #910

Open
intermetric wants to merge 3 commits into
rcfrom
fix/908-print-links-should-be-printed
Open

intermetric wants to merge 3 commits into
rcfrom
fix/908-print-links-should-be-printed

Conversation

@intermetric

@intermetric intermetric commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Changes

    • Buttons are now hidden when printing, while links remain visible in printed output.
    • Print behavior is applied consistently across button variants without adding extra visible content.
  • Documentation

    • Updated printing guidance, including link and text colors, background handling, pagination considerations, and browser compatibility.
    • Clarified <Print> component behavior, print state handling, and page-break limitations.
  • Tests

    • Added coverage confirming buttons are excluded from print output and links are included.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: TEDI-Design-System/react/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6c773dbd-f4c9-4acc-b46e-0c9792967a0a

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: TEDI-Design-System/react/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 2be697f0-b3bd-4dfc-8482-9ca2d3676831

📥 Commits

Reviewing files that changed from the base of the PR and between 423295d and c8e92bd.

📒 Files selected for processing (7)
  • src/community/components/button-content/button-content.tsx
  • src/community/components/button/button.tsx
  • src/tedi/components/buttons/button-content/button-content.tsx
  • src/tedi/components/buttons/button/button.spec.tsx
  • src/tedi/components/buttons/button/button.tsx
  • src/tedi/components/misc/print/printing.mdx
  • src/tedi/components/navigation/link/link.spec.tsx

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Buttons now apply print hiding at the button component level. Button content renders directly. Tests verify button and link print classes. Printing documentation describes updated color, pagination, Print, and provider behavior.

Changes

Print visibility updates

Layer / File(s) Summary
Button print rendering
src/community/components/button*, src/tedi/components/buttons/button*
Button components wrap ButtonContent with Print visibility="hide". Button-content components no longer add the print wrapper.
Print behavior tests
src/tedi/components/buttons/button/button.spec.tsx, src/tedi/components/navigation/link/link.spec.tsx
Tests verify that buttons receive no-print and links remain printable.
Printing documentation
src/tedi/components/misc/print/printing.mdx
Documentation describes print colors, visible links, page breaks, Print behavior, and usePrint() provider state.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to c8e92

The print visibility changes are mergeable; the community Button's Print import is valid.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: links remain visible when printing instead of being hidden. It matches the implementation and documentation updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 6…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

♿ Accessibility — ❌ 2 blocking violations in changed component

These are in components this PR changed and must be fixed (or marked parameters: { a11y: { test: 'todo' } } with justification).

Component Rules Stories
TEDI-Ready/Components/Buttons/Button unknown ×2 2
Failing stories

⚠️ Pre-existing — 1 violation in components not changed here (warn only)

Component Rules Stories
TEDI-Ready/Components/Navigation/Tabs unknown 1
Stories

🔕 Known issues — 13 stories marked todo (warn only)

Stories

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

🎨 Chromatic

No visual changes.

Built from 1313ac8. Commits pushed after this are not covered; approve again to rebuild.

View the build

@intermetric
intermetric force-pushed the fix/908-print-links-should-be-printed branch from c8e92bd to 1313ac8 Compare September 24, 2026 11:05

This branch was successfully deployed

1 active (outdated) deployment
github-pages — c8e92bd5 Deployed Sep 22, 2026 by intermetric via Deploy #1701
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.

4 participants