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

docs: layout css rewrite, and adding uxdot-components and more... #1465

Merged
merged 311 commits into from
Jun 10, 2024

Conversation

zeroedin
Copy link
Collaborator

@zeroedin zeroedin commented Jan 31, 2024

What I did

  1. Improved layout using modern techniques, container queries, cascade layers, and grid techniques.
  2. Dog food rh-* components where prudent.
  3. Removed old and crufty css and sass, as well as sass plugin from 11ty build
  4. Created new style directory and sub files: docs/styles/styles.css, docs/styles/typography.css, docs/styles/reset.css
  5. Created several new uxdot-* components uxdot-masthead, uxdot-sidenav, uxdot-feedback, uxdot-hero, uxdot-best-practices. uxdot-header
  6. Separated page specific vs site/global css utilizing inline style tags on page templates (to be included later via block see todo).
  7. Created more horizontal content space in layout. "Content region" now has a maximum of 1300px wide of usable area and is container query responsive (can debate what the size should be, this was an arbitrary decision while reworking the overall layout).
  8. uxdot-sidenav is now generated from data (sorta) see eleventy.config.cjs, not thrilled with this, but it works for now, needs improved. Intent was to reduce overhead of html in that template. Ideally the data would be normalized prior to hitting the interface of the component. [feat] <rh-sidenav> element #1329
  9. Reorganized the _includes directory to make it more grokkable. Specifically the child folder layouts to split global from page layouts and snippets (aka partials which might be a better name for it).
  10. Revised/Improved site and page layouts [docs] Switch NJK to WEBC for layout #1428
  11. Deleted several unused files (see list in TODO below)
  12. Improved styles on tokens pages, now uses rh-table [docs] Element Props and Attrs sections should be tables #1448
  13. Enabled table of contents TOC area is now more responsive and is flipped to "top" of the content when in a smaller viewport on 'basic' page layouts. This area is unused but can demo on that on how we can utilize that space given a jumplinks/toc addition. [feat] Discovery on Jump Links #1434
  14. Removes usersnap javascript. Closes [docs] Remove Usersnap feedback code from header.njk #1509

TODO:

  • Have generalized discussions on what I've done so far Need feedback on the following
    • discuss split file css approach ie reset.css, typography.css, styles.css and using @import pros/cons.
    • discuss usage of css layers, is this more grokkable to you?
    • discuss approach taken with uxdot-example. what are some improvements we can make there?
  • Reference [epic][docs] Docs Overhaul #1425 This PR hits on a bunch of the issues listed in the epic, partially, or completely. I need to now figure out which ones I might have completed here and make sure to reference/cross link those when completed.
  • Inspect and rebuild to take advantage of the new layout, drop their style cruft and normalize html/css.
    • /
    • about/*
    • get-started/*
    • foundations/*
      • overview
      • typography
      • spacing
      • personalization patterns
      • grid
      • color/*
        • overview
        • usage
        • accessibility
    • tokens/*
      • overview
      • global color
      • box shadow
      • typography
      • border
      • space
      • opacity
      • length
      • breakpoints
      • icon
      • mediaqueries
    • `elements/
      • all elements
      • rh-accordion/docs/*
      • rh-alert/docs/*
      • rh-audio-player/docs/*
      • rh-avatar/docs/*
      • rh-badge/docs/*
      • rh-blockquote/docs/*
      • rh-breadcrumb/docs/*
      • rh-button/docs/*
      • rh-card/docs/*
      • rh-code-block/docs/*
      • rh-cta/docs/*
      • rh-dialog/docs/*
      • rh-footer/docs/*
      • rh-footnote/docs/*
      • rh-jumplinks/docs/*
      • rh-menu/docs/*
      • rh-navigation/docs/*
      • rh-navigation-secondary/docs/*
      • rh-pagination/docs/*
      • rh-popover/docs/*
      • rh-progress-steps/docs/*
      • rh-spinner/docs/*
      • rh-stat/docs/*
      • rh-subnav/docs/*
      • rh-surface/docs/*
      • rh-table/docs/*
      • rh-tabs/docs/*
      • rh-tag/docs/*
      • rh-tile/docs/*
      • rh-timestamp/docs/*
      • rh-tooltip/docs/*
    • patterns/*
      • all-patterns
      • announcement
      • card
      • disclosure
      • filter
      • form
      • link w/icon
      • link
      • search bar
      • skip nav
      • sticky banner
      • sticky card
      • video thumbnail
    • Design/code status
    • Release notes
  • Link up uxdot-sidenav to the trigger button and make it function.
  • Fix the page ordering in uxdot-sidenav
  • Improve overall CLS of site components (lightdom CSS + DSD in the future will help) but there is a bit of jank on page loads we can clean up with some simple lightdom css.
  • Find assets that are no longer in use and delete them.
    • Remove example files (example file #2) or stop 11ty from generating them in production
    • 🗑️ assets/color/old
    • 🗑️ assets/get-started/dialog
    • 🗑️ assets/get-started/icon-libraries
    • 🗑️ assets/get-started/product-logo-library
    • 🗑️ assets/grid/grid-responsive-large, mobile-landscape, mobile-portrait, tablet
    • 🗑️ assets/home/workflow-icon.svg
    • 🗑️ assets/navigation-foundations/
    • 🗑️ assets/promo-banner/
    • 🗑️ assets/search-bar/
    • 🗑️ assets/spacing/4px.svg-> 80px.svg
    • 🗑️ assets/tokens/tokens.css
    • 🗑️ assets/typography/typography-quote.svg
    • 🗑️ assets/cem.css
    • 🗑️ assets/close-icon.svg
    • 🗑️ assets/demos.css
    • 🗑️ assets/info-icon.svg
    • 🗑️ assets/padlock-locked.svg
  • Consider using rh-tile in places where rh-card items are acting as navigation items. eg <nav class="grid"><rh-tile>...</nav>
  • Get correct values for foundations/typography table. Using old PFE values. I've removed them and added a TODO comment for now.
  • Make adjustments to overall site typography. Currently header styles do not match what we provide via the tokens.
  • Review .grid usage across pages, should this become a shared utility class or custom element (no shadowdom?)
  • Convert toc to a component uxdot-toc that can switch to details element on small viewports

Figma spacing spec: https://www.figma.com/proto/cU0GFIoCz6EU5v3B3byw0U/Docs-overhaul---template-spacing-and-typography?page-id=1%3A2&type=design&node-id=1-1454&viewport=102%2C129%2C1&t=NETho8DWjiwj1qpp-1&scaling=scale-down&mode=design

Move these task items to a fast follow PR:

Testing Instructions

  1. View Deploy Preview

Notes to Reviewers

Lots has changed yet little has changed. Content should be pretty close to 1:1 other then maybe some adjustments to layout where it makes the presentation a bit nicer, such as a 3 column grid, or items placed in rh-tile or rh-card where we can dogfood those components. Additionally tables have been converted all to use rh-table.

Tasks:

  • uxdot-sidenav needs accessibility review
  • check for typos or alt tags that might have been copied incorrectly as formatting changed.

@zeroedin zeroedin self-assigned this Jan 31, 2024
Copy link

changeset-bot bot commented Jan 31, 2024

⚠️ No Changeset found

Latest commit: 1fdd4c2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Jan 31, 2024

Deploy Preview for red-hat-design-system ready!

Name Link
🔨 Latest commit 1fdd4c2
🔍 Latest deploy log https://app.netlify.com/sites/red-hat-design-system/deploys/6663721f0c8ccd0008fcb6a1
😎 Deploy Preview https://deploy-preview-1465--red-hat-design-system.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.

@zeroedin zeroedin changed the title docs: layout css rewrite, and adding uxdot-components docs: layout css rewrite, and adding uxdot-components and more... Jan 31, 2024
Copy link
Contributor

github-actions bot commented Jan 31, 2024

Size Change: +9 B (0%)

Total Size: 251 kB

Filename Size Change
./elements/rh-navigation-secondary/rh-navigation-secondary.js 5.37 kB +7 B (+0.13%)
./rhds.min.js 90.6 kB +2 B (0%)
ℹ️ View Unchanged
Filename Size
./elements/rh-accordion/context.js 162 B
./elements/rh-accordion/rh-accordion-header.js 3.74 kB
./elements/rh-accordion/rh-accordion-panel.js 1.47 kB
./elements/rh-accordion/rh-accordion.js 3.7 kB
./elements/rh-alert/rh-alert.js 4.49 kB
./elements/rh-audio-player/rh-audio-player-about.js 1.68 kB
./elements/rh-audio-player/rh-audio-player-button.css.js 437 B
./elements/rh-audio-player/rh-audio-player-panel.css.js 554 B
./elements/rh-audio-player/rh-audio-player-scrolling-text-overflow.js 1.51 kB
./elements/rh-audio-player/rh-audio-player-subscribe.js 1.01 kB
./elements/rh-audio-player/rh-audio-player.js 14.4 kB
./elements/rh-audio-player/rh-cue.js 2.01 kB
./elements/rh-audio-player/rh-transcript.js 2.29 kB
./elements/rh-avatar/random-pattern-controller.js 2.72 kB
./elements/rh-avatar/rh-avatar.js 2.93 kB
./elements/rh-back-to-top/rh-back-to-top.js 2.1 kB
./elements/rh-badge/rh-badge.js 1.04 kB
./elements/rh-blockquote/rh-blockquote.js 1.96 kB
./elements/rh-button/rh-button.js 4.45 kB
./elements/rh-card/rh-card.js 1.96 kB
./elements/rh-code-block/rh-code-block.js 5.62 kB
./elements/rh-cta/rh-cta.js 4.59 kB
./elements/rh-dialog/rh-dialog.js 4.79 kB
./elements/rh-dialog/yt-api.js 617 B
./elements/rh-footer/rh-footer-block.js 770 B
./elements/rh-footer/rh-footer-copyright.js 362 B
./elements/rh-footer/rh-footer-links.js 1.17 kB
./elements/rh-footer/rh-footer-social-link.js 1.35 kB
./elements/rh-footer/rh-footer-universal.js 2.05 kB
./elements/rh-footer/rh-footer.css.js 2.16 kB
./elements/rh-footer/rh-footer.js 3.04 kB
./elements/rh-footer/rh-global-footer.js 250 B
./elements/rh-menu/rh-menu.js 1.18 kB
./elements/rh-navigation-secondary/rh-navigation-secondary-dropdown.js 2.58 kB
./elements/rh-navigation-secondary/rh-navigation-secondary-menu-section.js 1.46 kB
./elements/rh-navigation-secondary/rh-navigation-secondary-menu.js 1.9 kB
./elements/rh-navigation-secondary/rh-navigation-secondary-overlay.js 571 B
./elements/rh-navigation-secondary/test/fixtures.js 846 B
./elements/rh-pagination/rh-pagination.js 4.47 kB
./elements/rh-site-status/rh-site-status.js 3.18 kB
./elements/rh-skip-link/rh-skip-link.js 1.13 kB
./elements/rh-spinner/rh-spinner.js 1.61 kB
./elements/rh-stat/rh-stat.js 2.24 kB
./elements/rh-subnav/rh-subnav.js 2.83 kB
./elements/rh-surface/rh-surface.js 868 B
./elements/rh-table/rh-sort-button.js 1.49 kB
./elements/rh-table/rh-table.js 3.02 kB
./elements/rh-tabs/context.js 160 B
./elements/rh-tabs/rh-tab-panel.js 1.15 kB
./elements/rh-tabs/rh-tab.js 3.08 kB
./elements/rh-tabs/rh-tabs.js 4 kB
./elements/rh-tag/rh-tag.js 2.06 kB
./elements/rh-tile/rh-tile-group.js 1.76 kB
./elements/rh-tile/rh-tile.js 4.85 kB
./elements/rh-timestamp/rh-timestamp.js 983 B
./elements/rh-tooltip/rh-tooltip.js 2.24 kB
./lib/context/color/consumer.js 1.16 kB
./lib/context/color/context-color.css.js 268 B
./lib/context/color/controller.js 885 B
./lib/context/color/provider.js 2.04 kB
./lib/context/event.js 583 B
./lib/context/headings/consumer.js 722 B
./lib/context/headings/controller.js 1.12 kB
./lib/context/headings/provider.js 1.24 kB
./lib/DirController.js 565 B
./lib/elements/rh-context-demo/rh-context-demo.js 1.15 kB
./lib/elements/rh-context-picker/rh-context-picker.js 2.43 kB
./lib/functions.js 175 B
./lib/I18nController.js 1.38 kB
./lib/ScreenSizeController.js 849 B
./react/elements/rh-accordion/rh-accordion-header.js 217 B
./react/elements/rh-accordion/rh-accordion-panel.js 187 B
./react/elements/rh-accordion/rh-accordion.js 218 B
./react/elements/rh-alert/rh-alert.js 187 B
./react/elements/rh-audio-player/rh-audio-player-about.js 193 B
./react/elements/rh-audio-player/rh-audio-player-scrolling-text-overflow.js 217 B
./react/elements/rh-audio-player/rh-audio-player-subscribe.js 197 B
./react/elements/rh-audio-player/rh-audio-player.js 185 B
./react/elements/rh-audio-player/rh-cue.js 196 B
./react/elements/rh-audio-player/rh-transcript.js 208 B
./react/elements/rh-avatar/rh-avatar.js 176 B
./react/elements/rh-back-to-top/rh-back-to-top.js 186 B
./react/elements/rh-badge/rh-badge.js 177 B
./react/elements/rh-blockquote/rh-blockquote.js 181 B
./react/elements/rh-button/rh-button.js 177 B
./react/elements/rh-card/rh-card.js 175 B
./react/elements/rh-code-block/rh-code-block.js 183 B
./react/elements/rh-cta/rh-cta.js 174 B
./react/elements/rh-dialog/rh-dialog.js 206 B
./react/elements/rh-footer/rh-footer-block.js 186 B
./react/elements/rh-footer/rh-footer-copyright.js 189 B
./react/elements/rh-footer/rh-footer-links.js 187 B
./react/elements/rh-footer/rh-footer-social-link.js 195 B
./react/elements/rh-footer/rh-footer-universal.js 190 B
./react/elements/rh-footer/rh-footer.js 177 B
./react/elements/rh-footer/rh-global-footer.js 188 B
./react/elements/rh-menu/rh-menu.js 176 B
./react/elements/rh-navigation-secondary/rh-navigation-secondary-dropdown.js 245 B
./react/elements/rh-navigation-secondary/rh-navigation-secondary-menu-section.js 235 B
./react/elements/rh-navigation-secondary/rh-navigation-secondary-menu.js 224 B
./react/elements/rh-navigation-secondary/rh-navigation-secondary-overlay.js 202 B
./react/elements/rh-navigation-secondary/rh-navigation-secondary.js 241 B
./react/elements/rh-pagination/rh-pagination.js 180 B
./react/elements/rh-site-status/rh-site-status.js 183 B
./react/elements/rh-skip-link/rh-skip-link.js 185 B
./react/elements/rh-spinner/rh-spinner.js 178 B
./react/elements/rh-stat/rh-stat.js 175 B
./react/elements/rh-subnav/rh-subnav.js 178 B
./react/elements/rh-surface/rh-surface.js 178 B
./react/elements/rh-table/rh-sort-button.js 216 B
./react/elements/rh-table/rh-table.js 176 B
./react/elements/rh-tabs/rh-tab-panel.js 181 B
./react/elements/rh-tabs/rh-tab.js 188 B
./react/elements/rh-tabs/rh-tabs.js 176 B
./react/elements/rh-tag/rh-tag.js 186 B
./react/elements/rh-tile/rh-tile-group.js 185 B
./react/elements/rh-tile/rh-tile.js 197 B
./react/elements/rh-timestamp/rh-timestamp.js 179 B
./react/elements/rh-tooltip/rh-tooltip.js 178 B

compressed-size-action

@bennypowers
Copy link
Member

How bad would the conflicts be if you tried to merge or rebase off #1420?

@zeroedin
Copy link
Collaborator Author

zeroedin commented Feb 7, 2024

How bad would the conflicts be if you tried to merge or rebase off #1420?

I wouldn't think too terrible. I haven't touched that much in rhds.cjs

@bennypowers bennypowers dismissed nikkimk’s stale review June 9, 2024 13:07

wishing Nikki well in her new position, we shouldn't require her review on this PR

Copy link
Collaborator

@marionnegp marionnegp left a comment

Choose a reason for hiding this comment

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

Found some small design adjustments we'd want to make. They're not blockers, and I'll create new issues or add notes to an existing one.

@zeroedin zeroedin merged commit 4fc8f7b into main Jun 10, 2024
8 checks passed
@zeroedin zeroedin deleted the docs/uxdot-masthead-component branch June 10, 2024 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
Status: Done ☑️
Development

Successfully merging this pull request may close these issues.

[docs] Remove Usersnap feedback code from header.njk [docs] Add GitHub repo link in Nav/Header
8 participants