Repository navigation
Release 2.10.0 - #3901
Merged
Merged
Release 2.10.0#3901
Conversation
Add a clearer outside link section for collection
Add new icons to accordion
Update notifications and dependencies
Add more resilience to decorative SVGs
Update refs to 2.10.0
Final-stage bug fixes
mejiaj
approved these changes
Dec 17, 2020
mejiaj
left a comment
Contributor
There was a problem hiding this comment.
There are some code style differences on some of the new templates (no new line or indent/spacing issues) but no major issues.
We can make those changes on beta in the future.
| mode: { | ||
| symbol: true | ||
| } | ||
| }; |
Contributor
There was a problem hiding this comment.
Let's check indents on this file, they seem off.
|
|
||
|
|
||
| // More complex configuration example | ||
| config = { |
There was a problem hiding this comment.
It must already be defined somewhere else, in a global. Or it would be throwing an error. If you want this config to be confined to this closure then you can set it as a const.
| </div> | ||
| </fieldset> | ||
| </form> | ||
| </form> No newline at end of file |
Contributor
There was a problem hiding this comment.
Missing new line for consistency.
| multiple: true | ||
| accept: | ||
| @@ -0,0 +1,6 @@ | |||
| <header class="usa-header usa-header--extended"><div class="usa-navbar"> | |||
Contributor
There was a problem hiding this comment.
No newline at end. Might want to add some indents.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What’s new in USWDS 2.10
New components
We have four new components in this release. Learn more about each of them on our website:
Updated components
We have four updated components in this release. Learn more about each of them on our website:
New templates
We have three new templates in this release. Learn more about each of them on our website:
No more banner flash: The USWDS initializer script
USWDS 2.10.0 adds a small (under 1 KB minified) initialization script (
uswds-init.min.js) to the package. When included in the<head>— either by reference or inline — this script prevents the banner from flashing its content on page load and shifting content (#3092).Note: This only prevents flashing when you use CSS generated from USWDS 2.10.0 or later.
What it does
Simply:
.usa-js-loadingclass to the<html>element as the USWDS JS library is loading.In more detail:
.usa-js-loadingclass to the<html>element before thebodyrenders..usa-js-loadingclass..usa-js-loadingclass.Since USWDS components are meant to make their content available even if our JS does not load, their visibility of any toggle-able content defaults to visible and the JS is responsible for hiding it. This resulted in a flash of "hidden" content between when the page renders and the JS loads.
This initialization script allows us to visually hide "hidden" content at page render by hooking those styles to the
.usa-js-loadingclass. When the USWDS JS loads, the JavaScript is responsible for hiding/showing interactive content as usual and the class hook is removed. If the USWDS JS does not load,uswds-initremoves the.usa-ls-loadingclass and the content will revert to visible. If there is no JS present at all,uswds-initwill not load and the content will be visible at page render.Using the initializer
uswds-init-min.jsout of the USWDS package an into your project directory.<head>or include the entire script inline.Include by reference
Include inline
Other improvements and bug fixes
Improved non-autoprefixed state of colored icons. When you see a USWDS icon that appears as a rectangle instead of its proper shape, this is because some USWDS colored icons require Autoprefixer to display properly. Now the non-Autoprefixer icon will appear as a black icon instead of as a rectangle. All projects should still use Autoprefixer when compiling their stylesheets. Thanks @aduth! (#3860)
Improved the accessibility of decorative images in the Banner. We modified the Banner to properly mark up SVG files used as decorative images. Now all decorative images are hidden from screen readers, and all SVGs are more resilient to browser bugs. See the Banner page for the complete, correct markup, and see the pull request for more context on the changes. (#3892)
Created a Spanish version of the Search component. We recommend using "Buscar" in Spanish-language version of Search. See the Search guidance page for more information. Thanks @lggsa! (#3861)
Updated the Spanish USAGov link in the identifier. The Spanish-language USAGov link in the identifier should read
Visite USAGov en Español(#3863)Support custom bold font weight. Now
$theme-font-weight-boldwill change the theme bold font weight as expected. Thanks @sawyerh! (#3811)Allow proper drag/drop on File input component. Now drag and drop will accept or reject files as expected when using a File input set to accept multiple extensions. Thanks @ConnorDY! (#3851)
Enable proper hover styles on visited links. Now visited links have a visible hover state. Thanks @astiefvater! (#3868)
Enable and disable File Input programmatically. Now developers can set the status of the File Input component dynamically. Thanks @ConnorDY! (#3760)
Better support for buttons with multiple variants. We fixed a display bug with visited inverse unstyled buttons. Button styling is more reliable with different combinations of variants. Thanks @andycochran! (#3846)
Support buttons in side navigation. Now any anchor link button in a Side Navigation component hill have expected display. Thanks @ajware-uscis! (#3839)
Allow custom hex colors as File Input disabled color. We fixed a bug that prevented a custom hex value for
disabled-lightfrom working in the File Input component. Thanks @aduth! #3762Improved font display in the Identifier. We're now using normal weight text in the Identifier domain text instead of light text for more consistent appearance. (#3740)
Improved breadcrumb padding. Fixes a bug that could make some values of
$theme-focus-widthincompatible with the Breadcrumb. (#3737)Dependencies and security
0vulnerabilities in regular dependencies (dependencies for USWDS projects installed withnpm install uswds)5 low, 2 highvulnerabilities in devDependencies (development dependencies)Release ZIP SHA-256 hash:
1c3c31de6fdb62bd327b54e46c1513a252ffc4a54b9152db1e2fcafb7dbc4c4e