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 sharing layouts to all household charts #625

Merged
merged 2 commits into from
Jul 25, 2023

Conversation

nikhilwoodruff
Copy link
Contributor

@nikhilwoodruff nikhilwoodruff commented Jul 25, 2023

🤖 Generated by Copilot at f5a246b

Summary

📱📸📊

This pull request enhances the responsiveness and screenshot functionality of several components that display charts on the household output page. It uses a custom Screenshottable component and a useMobile hook to adapt the charts to different screen sizes and enable users to capture and share them. It also adds a title option to the Screenshottable component and a feature to show the change in marginal tax rate by employment income on the MarginalTaxRates component.

Sing, O Muse, of the skillful coder who devised
A wondrous tool to capture and display the charts
That show the income and the tax of mortal households
Under the shifting scenarios of policy reforms.

Walkthrough

  • Add title prop to Screenshottable component and render it as a heading element in the screenshot container (link, link)
  • Wrap Plot components with Screenshottable component and pass appropriate title props for each chart (link, link, link, link, link, link, link, link, link, link)
  • Use useMobile hook to determine device type and adjust chart logo positioning accordingly (link, link, link, link, link, link, link, link, link, link, link)
  • Remove top margin of charts by adding margin object to layout prop of Plot component (link, link)

cc @MaxGhenis

e.g. like the below

image

@nikhilwoodruff nikhilwoodruff self-assigned this Jul 25, 2023
@nikhilwoodruff nikhilwoodruff linked an issue Jul 25, 2023 that may be closed by this pull request
@nikhilwoodruff nikhilwoodruff merged commit 4f860eb into master Jul 25, 2023
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.

No logo on household charts
2 participants