-
Notifications
You must be signed in to change notification settings - Fork 45
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
Updating to USWDS 2.0.1 #421
Conversation
32dcde3
to
0f6e83a
Compare
0f6e83a
to
b590f5e
Compare
On the Jekyll SASS build problem: I can fix it by adding a line to I can make a PR to USWDS to see if they'll accept it, not sure if there are some negative implications in there but it seems like our best bet. |
It'd be cool if you can submit a PR, but maybe if we update the file in the project and import that instead of uswds file? At least until they fix? The only reason I have those scss files is to use the variables and function.s |
@jaredcunha-usds I was going to make a PR but I can't find |
@dmethvin-gov is this what you're look for?
|
That's copied by the website setup from |
I think the first link you sent is closest to the right place. I don't know where they are taking PRs, but perhaps you can ask the TTS channel? I think that |
Found it, I think. I'll make a PR against this and if I'm wrong I'll discuss with them there. |
The fix should be in USWDS 2.0, yay! 🎉 uswds/uswds#3008 |
c76070f
to
ab8cada
Compare
This is awesome, Dave! That has been bugging me for ages! I’ll go ahead and grab that file on work that into my branch.
From: "Dave Methvin (USDS)" <notifications@github.com>
Reply-To: usds/website <reply@reply.github.com>
Date: Friday, March 29, 2019 at 2:27 PM
To: usds/website <website@noreply.github.com>
Cc: "Cunha, Jared C. EOP/OMB" <Jared_C_Cunha@omb.eop.gov>, Mention <mention@noreply.github.com>
Subject: Re: [usds/website] DO NOT MERGE - Setting up for future USWDS updates (#421)
The fix should be in USWDS 2.0, yay! 🎉 uswds/uswds#3008<uswds/uswds#3008>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#421 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AYQcmYTbmr4yPopbiVqJb4HzPMQVrvZIks5vblsSgaJpZM4basWa>.
|
ab8cada
to
c690eb0
Compare
update package and css overrides/changes sort of working, swithching variables update breakpoints remove test accordion updating css remove uneccesary variables create task to update without overwriting theme files clean old gulp files reorganize uswds src files, remove uneccessary files update gulpfile and scss package.json update
c690eb0
to
cffe885
Compare
@dmethvin-gov I think this is ready to merge now. I've removed some of the unused utilities, which saved around 50KB in CSS from the uswds.css file. I've made updates to the job application form in salesforce to support the USWDS changes. I was using |
Thanks! I'll take a look! It's my first real look at USWDS 2.0 so it may take a day or two. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, those were a lot of class renames!
What is your feeling on committing all the font binaries? Are they all coming from USWDS and only referenced from their [S]CSS? If so can we just have the build process copy them to the theme directory rather than putting them in the repo?
Are all the files in assets
also copied from various dependencies, or are they "ours"? If they are unchanged from a dependency it would be nicer to just copy them there as with fonts. I don't know if Jekyll has a way to do that but can look into it if you want.
|
||
#### Update USDS and get new functions and tokens | ||
1. Compile usds.css `gulp uswds-build-sass` | ||
2. Run Jekylll `bundle exec jekyll serve` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only two l
s in Jekyll 😸
1. Update the USWDS version in `package.json` | ||
2. Install the package `npm install` | ||
2. Compile usds.css `gulp uswds-build-sass` | ||
3. Run Jekylll `bundle exec jekyll serve` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jekyll
README.md
Outdated
## Adding Content | ||
* [How to add people](https://github.com/usds/website/wiki/Adding-People-(carousel-and-pages)) | ||
* [How to add projects](https://github.com/usds/website/wiki/Adding-projects-(carousel-and-pages)) | ||
**Before you do this**: The USWS Sass uses many of the USWDS functions and tokens. While the USWDS.css is already compiled, the site relies on Jekyll to compile the Sass files. There is currently an issue with Jekyll the way it handles `.5` spacing tokens. [See here](https://github.com/uswds/uswds-sandbox/issues/18). **A fix has been merged, but still waiting to be deployed.** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this make it into 2.0.0 or 2.0.1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah! It did it. I had this in two places. Must have missed that.
README.md
Outdated
Use this to patch any display bugs through updates to USWDS. | ||
|
||
1. Update the USWDS version in `package.json` | ||
2. Install the package `npm install` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first two steps can be done as npm install --save-dev *new-USWDS-version-number*
README.md
Outdated
This will will update some of the scss files in `assets/uswds-sass`, but will not overwrite any of your files in `assets/uswds-theme`. | ||
|
||
1. Update the USWDS version in `package.json` | ||
2. Install the package `npm install` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npm install --save-dev *new-USWDS-version-number*
assets/stylesheets/application.scss
Outdated
@@ -45,3 +62,5 @@ | |||
@import "utilities-add-ons/display"; | |||
@import "utilities-add-ons/flex"; | |||
@import "utilities-add-ons/position"; | |||
|
|||
@import "shame/salesforce"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file supposed to be empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is part of that salesforce test form. I'm going to remove this before I merge it.
@@ -1,18 +1,20 @@ | |||
html { | |||
-webkit-font-smoothing: antialiased; | |||
-moz-osx-font-smoothing: grayscale; | |||
font-size: 100%; | |||
font-family: family('body'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a much nicer way to do the font sizing!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still prefer this because it makes the math easier, but USWDS 2.0 doesn't seem to play as nicely with it.
html {
font-size: 10px;
}
body {
font-size: 1.7rem;
}
@dmethvin-gov Yeah, this ended being a much larger effort than I anticipated, but it works! I tackled a few of your suggestions, but some of them were on files copied over via gulp from dependencies. Please see my responses for those.
They're all moved over the gulp file. This is actaully from the USWDS team, but I'm open to changing at some point. I don't think this should affect performance, but it does make for a large commit.
It's a mix of "ours" and what's copied from a dependency. They are unchanged except for the |
Big changes between alpha and beta, so this update will allow teams to build more closely to the documentation in USWDS 2.0 when it's ready for release.
I still need to write tasks for preserving theme customizations (they are overwritten by USWDS gulp task)
Two outstanding items I'd like to cover:
1) how to handle deprecation in jekyll
2) Seeing how USWDS handles
.5
system token issue in a future builduswds/uswds-sandbox#18
What about this?
Do I just let gulp build the CSS instead of Jekyll? That means building CSS locally and having the compiled application.css under version control, but it is that worth the tradeoff? If that is the case, we can get rid of the
assets/uswds-sass
folder entirely, importing the files fromnode_modules
instead. I'm kinda leaning towards this, and it seems the USWDS team prefers letting gulp build the CSS for now.