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

Add print behavior for components with hidden content #2969

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

hughess
Copy link
Member

@hughess hughess commented Jan 3, 2025

Description

Some components in Evidence have hidden content which is interactive on a page. This is great in the browser, but doesn't work well in a PDF. This PR adds some optional behaviour to show content on print.

This includes:

  • Tabs
  • Details
  • LastRefreshed (shows date rather than time ago)

Other components that should be considered for this:

  • Accordion
  • Modal

To resolve

  • Should this be default on or off?
    • My take is on since currently they are unusable in print, with prop to turn off or hide component entirely during print
  • Ideally, the font inside a Details component would be much smaller. I haven't been able to figure out how to override the markdown class that gets applied to p tags in the content of that component

Tabs

CleanShot 2025-01-03 at 11 17 24

Details

CleanShot 2025-01-03 at 11 18 22

LastRefreshed

CleanShot 2025-01-03 at 11 19 11

Checklist

  • For UI or styling changes, I have added a screenshot or gif showing before & after
  • I have added a changeset
  • I have added to the docs where applicable
  • I have added to the VS Code extension where applicable

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.

1 participant