Visitar URL original
USWDS -Site - Layout Grid: Guidance refactor by mahoneycm · Pull Request #2276 · uswds/uswds-site · GitHub
Skip to content

USWDS -Site - Layout Grid: Guidance refactor - #2276

Merged
thisisdano merged 46 commits into
mainfrom
cm-refactor-grid-guidance
Nov 6, 2024
Merged

thisisdano merged 46 commits into
mainfrom
cm-refactor-grid-guidance

Conversation

@mahoneycm

@mahoneycm mahoneycm commented Sep 13, 2023 •

Copy link
Copy Markdown
Contributor

Summary

Refactored layout grid guidance to visually match other utility pages. The markdown now uses settings tables, includes mixin guidance, and now features the copy code button on code blocks.

Related issue

Closes #2210
Closes #2611

Preview link

Layout Grid guidance →

Problem statement

The layout grid guidance doesn’t match other utility guidance pages. Rather than using our site includes, it uses highlight code blocks to display spacing settings and mixin examples.

Solution

Utilize template includes to insert formatted tables and improve reader experience.

Warning

This PR removes the example at the bottom of the page which displayed how to use the mxins to create a two-column layout with a gap.
We should discuss if we would like to keep this example, refactor it, or keep it removed.

Testing and review

  1. Inspect the Layout Grid guidance page.
  2. Compare it to other utility guidance pages such as flex and confirm it matches the presentation style.
  3. Compare it to Layout Grid on develop and confirm no information is lost.
  4. On the develop build, review the example usage section that was removed from this PR. Consider if we want to keep this section, refactor it, or change it.

Testing checklist

  • Guidance matches presentation styles of other utility guidance pages.
  • No information is lost from change.
  • Method of presentation is up to par with USWDS-Site standards.
  • Confirm there are no responsive settings to include in Responsive variants settings table.
  • Approve of moving default responsive variant values to Responsive guidance at the bottom of the page.
  • Confirm all Utility mixins are accounted for in table and examples are suitable.
  • Consider if we need to add state variants and output control
    • I omitted because I did not see settings for display-grid in USWDS
  • Confirm “Example usage” section is not needed in it’s current state or consider refactor instead.

Comment thread _utilities/layout-grid.md
Comment on lines -86 to -93
<h2 id="responsive-variants">Responsive variants</h2>

<div>
<table class="usa-table--borderless site-table-responsive site-table-simple">
<caption>Default responsive sizes</caption>
<thead>
<tr>
<th scope="col" class="flex-2">Width</th>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Moved under the Responsive Variants guidance on line 517

@amyleadem amyleadem self-assigned this Dec 14, 2023
@amyleadem amyleadem changed the title USWDS - Layout Grid: Guidance refactor USWDS -Site - Layout Grid: Guidance refactor Mar 26, 2024

@amyleadem amyleadem left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mahoneycm Thanks for taking this on! I added some comments and suggestions below. Also, can you add a changelog to the page?

Let me know if you want to talk through the comments!

Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
@cathybaptista

cathybaptista commented Jul 15, 2024 via email

Copy link
Copy Markdown
Contributor

@mejiaj mejiaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mahoneycm thanks for these updates.

Two minor issues

  1. SCSS example mixins are missing semicolons.
  2. Values in mixin table don't match up.

Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md
@mejiaj
mejiaj self-requested a review July 23, 2024 13:27

@mejiaj mejiaj left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the updates.


Build error is coming from HTMLProofer.

Details

#!/bin/bash -eo pipefail
npm run proof

> proof
> bundle exec htmlproofer --enforce-https=false --allow-missing-href=true --ignore-status-codes 0,403,429,503,302 --swap-urls 'https\://designsystem.digital.gov/:/' --ignore-urls '/github.com/uswds/uswds/issues/' --ignore-files '/whats-new/updates/2017/,/whats-new/updates/2018/,/documentation/code-guidelines/' ./_site

Running 3 checks (Scripts, Links, Images) in ["./_site"] on *.html files...


Checking 1219 external links
Checking 917 internal links
Checking internal link hashes in 225 files
Ran on 356 files!


For the Links > External check, the following failures were found:

* At ./_site/documentation/showcase/index.html:2714:

  External link https://commerce.gov/ failed: got a time out (response code 301) (status code 301)

@mahoneycm

mahoneycm commented Jul 23, 2024 •

Copy link
Copy Markdown
Contributor Author

@mejiaj I pulled in the latest from main and it looks like it resolved the HTML-Proofer error you mentioned, and introduced another.

For the Links > External check, the following failures were found:

* At ./_site/design-tokens/color/overview/index.html:3107:

  External link https://w3c.github.io/wcag/coga/gap-analysis.html failed (status code 404)


HTML-Proofer found 1 failure!

Exited with code exit status 1

Created #2753 to address

@amyleadem amyleadem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mahoneycm Thanks for your patience with this review. I added a number of small suggestions and tweaks. I am hoping these are all that remains to fix.

Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
Comment thread _utilities/layout-grid.md Outdated
@mahoneycm
mahoneycm requested a review from amyleadem July 25, 2024 16:21
Comment thread _utilities/layout-grid.md Outdated

@amyleadem amyleadem left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me! Thanks @mahoneycm

@amyleadem
amyleadem requested a review from thisisdano September 5, 2024 18:52
Comment thread _data/changelogs/utilities-layout-grid.yml Outdated
@thisisdano
thisisdano merged commit 9a9e62f into main Nov 6, 2024
@thisisdano
thisisdano deleted the cm-refactor-grid-guidance branch November 6, 2024 23:14
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.

USWDS-Site - Documentation: Improve clarity in sample layout settings USWDS-Site - Layout grid: Mixin guidance doesn't match other utilities

5 participants