Skip to content

Adding styles & Configurations for R3 #1104

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

Merged
merged 10 commits into from
Aug 15, 2024
Merged

Adding styles & Configurations for R3 #1104

merged 10 commits into from
Aug 15, 2024

Conversation

hanbyul-here
Copy link
Collaborator

@hanbyul-here hanbyul-here commented Aug 13, 2024

Related Ticket: #1098

  • We are encouraging IMPACT team to use USWDS. This new style configuration that uses grid-layout will be useful for IMPACT team. (I also need this style for Carousel )

Description of Changes

  • Added grid-layout style from uswds design system
  • Edited purgecss configuration to include instance/overrides folder as content
  • Added CSS Variables for VEDA customization colors.

Notes & Questions About Changes

I almost gave up getting purgecss to work, but @dzole0311 helped me figure out what was wrong. (The default extractor doesn't allow special characters like :, which we need to target specific screen size like tablet: ex. https://designsystem.digital.gov/utilities/layout-grid/ Thank you so much 🙇 @dzole0311 !

@slesaad , you don't need to review this PR, but I think it would be beneficial to check how we are importing the styles and purging the styles through postcss.config.

Validation / Testing

This PR doesn't bring any visual change to UI, but this GHG pr uses this branch: US-GHG-Center/veda-config-ghg#482

Copy link

netlify bot commented Aug 13, 2024

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 60a6217
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/66bdfb046db3bc0008fc4f88
😎 Deploy Preview https://deploy-preview-1104--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@hanbyul-here
Copy link
Collaborator Author

purgecss configuration : FullHuman/purgecss#86 (comment)

@hanbyul-here hanbyul-here changed the title Purge config Adding styles & Configurations for R3 Aug 13, 2024
@hanbyul-here hanbyul-here marked this pull request as ready for review August 13, 2024 20:53
Copy link
Collaborator

@dzole0311 dzole0311 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @hanbyul-here! Looking forward to any future feedback on USWDS usage from @slesaad as well as we continue to transition towards USWDS.

In addition to the docs mentioned in the description, we also have on our disposal the <Grid /> React component from the react implementation of the USWDS library for layout purposes (depends on preference of the developer). Link to the relevant docs: https://trussworks.github.io/react-uswds/?path=/docs/components-grid--docs.

@hanbyul-here
Copy link
Collaborator Author

hanbyul-here commented Aug 14, 2024

Oh!! Thanks a lot for pointing the grid component from react-uswds @dzole0311 ! I didn't even think about it 😓 We probably need to list grid-related classes as a whitelist to use it, though, I guess?

  • If we are moving towards using more components from users, I wonder if we should depend on the selective imports of the scss file rather than purging. Because safelisting each component won't really scale. 🤔

@hanbyul-here hanbyul-here merged commit bae32d5 into main Aug 15, 2024
4 of 5 checks passed
@hanbyul-here hanbyul-here deleted the purge-config branch August 15, 2024 12:57
sandrahoang686 added a commit that referenced this pull request Aug 27, 2024
## 🎉 Features
- 🦗 
## 🚀 Improvements
- Adding styles & Configurations for R3
#1104
- Create new raster paint layer module and factor out
BaseTimeseriesProps #1105
- Remove PurgeCSS, configure USWDS to use only tablet breakpoints
#1112
- Open an external link in a new tab
#1116
- Expose USWDS card style
#1119

## 🐛 Fixes
- Do not render exploration component unless urlAtom is on the right
page #1106
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.

3 participants