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

Add directory table pattern to base table template #8183

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Conversation

contolini
Copy link
Member

Adds our directory table pattern that's already in the DS to our cf.gov table organism template.

Also iterates on our card listing page by using a new directory table variant that sticks the top rows to the viewport when scrolling.

See https://cfpb.github.io/design-system/components/tables#responsive-stacked-table-with-header-directory-table
See https://github.local/Design-Development/Design-Thinking-and-User-Research/issues/232

Changes

  • Replaces the table pattern used on the TCCP all cards page

How to test this PR

  1. ./frontend.sh
  2. Visit the all cards page on a small screen and scroll to see a sticky header.

Screenshots

scroll

Checklist

  • PR has an informative and human-readable title
    • PR titles are used to generate the change log in releases; good ones make that easier to scan.
    • Consider prefixing, e.g., "Mega Menu: fix layout bug", or "Docs: Update Docker installation instructions".
  • Changes are limited to a single goal (no scope creep)
  • Code follows the standards laid out in the CFPB development guidelines
  • Future todos are captured in comments and/or tickets
  • Project documentation has been updated, potentially one or more of:
    • This repo’s docs (edit the files in the /docs folder) – for basic, close-to-the-code docs on working with this repo
    • CFGOV/platform wiki on GHE – for internal CFPB developer guidance
    • CFPB/hubcap wiki on GHE – for internal CFPB design and content guidance

Front-end testing

Browser testing

Visually tested in the following supported browsers:

  • Firefox
  • Chrome
  • Safari
  • Edge 18 (the last Edge prior to it switching to Chromium)
  • Internet Explorer 11 and 8 (via emulation in 11's dev tools)
  • Safari on iOS
  • Chrome on Android

Accessibility

  • Keyboard friendly (navigable with tab, space, enter, arrow keys, etc.)
  • Screen reader friendly
  • Does not introduce new errors or warnings in WAVE

Other

  • Is useable without CSS
  • Is useable without JS
  • Does not introduce new lint warnings
  • Flexible from small to large screens

Adds our directory table pattern that's already in the DS to our cf.gov
table organism template.

Also adds a modified version of the pattern to TCCP that sticks the
top rows to the viewport when scrolling.

See https://cfpb.github.io/design-system/components/tables#responsive-stacked-table-with-header-directory-table
See https://github.local/Design-Development/Design-Thinking-and-User-Research/issues/232
@contolini contolini enabled auto-merge March 4, 2024 15:33
Copy link
Member

@chosak chosak left a comment

Choose a reason for hiding this comment

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

Beautiful.

Comment on lines +52 to +53
{%- set stack_on_mobile = 'stack_on_mobile' in (value.options or []) or 'directory_table' in (value.options or []) -%}
{%- set directory_table = 'directory_table' in (value.options or []) -%}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{%- set stack_on_mobile = 'stack_on_mobile' in (value.options or []) or 'directory_table' in (value.options or []) -%}
{%- set directory_table = 'directory_table' in (value.options or []) -%}
{%- set directory_table = 'directory_table' in (value.options or []) -%}
{%- set stack_on_mobile = directory_table or ('stack_on_mobile' in (value.options or [])) -%}

@contolini contolini added this pull request to the merge queue Mar 4, 2024
Merged via the queue into main with commit c95f831 Mar 4, 2024
17 checks passed
@contolini contolini deleted the tccp-table branch March 4, 2024 16:37
contolini added a commit that referenced this pull request Apr 2, 2024
User testing has us moving in another direction so these unused patterns
are being removed.

See #8183
See #8167
contolini added a commit that referenced this pull request Apr 2, 2024
User testing has us moving in another direction so these unused patterns
are being removed.

See #8183
See #8167
contolini added a commit that referenced this pull request Apr 2, 2024
User testing has us moving in another direction so these unused patterns
are being removed.

See #8183
See #8167
contolini added a commit that referenced this pull request Apr 2, 2024
User testing has us moving in another direction so these unused patterns
are being removed.

See #8183
See #8167
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.

2 participants