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

feat: Add Light / Dark mode toggle to the portal #766

Merged
merged 14 commits into from
Sep 14, 2022

Conversation

jcbcapps
Copy link
Contributor

@jcbcapps jcbcapps commented Sep 1, 2022

SC-968

Proposed changes

Adds ThemeToggle component for toggling light and dark mode


Reviewer notes

The ThemeToggle component is not being displayed anywhere in the portal yet, as we have yet to set up LaunchDarkly to hide it behind a feature flag. To review this, you'll need to view the component in Storybook or add it into the <Header /> component manually. See the instructions below.

Setup

Run yarn storybook in the portal client, navigate to localhost:6006 in your browser, and look at the ThemeToggle component

If you would like to see the component in the portal client, you'll need to manually add the ThemeToggle component into the <Header /> component after line 102. Then make sure to have both the CMS and the portal client running on your local machine. You can do this by

  • Running yarn services:up && yarn dev in the CMS repo and
  • Running yarn dev in the portal client with this branch checked out

Code review steps

As the original developer, I have

  • Met the acceptance criteria, or will meet them in subsequent PRs or stories
  • Created new stories in Storybook if applicable
    • Checked that all Storybook accessibility checks are passing
  • Created/modified automated unit tests in Jest
    • Including jest-axe checks when UI changes
  • Created/modified automated E2E tests in Cypress
    • Including cypress-axe checks when UI changes
    • Checked that the E2E test build is not failing
  • Performed a11y testing:
    • Checked responsiveness in mobile, tablet, and desktop
    • Checked keyboard navigability
    • Tested with VoiceOver in Safari
    • Checked VO's rotor menu for landmarks, page heading structure and links
    • Used a browser a11y tool to check for issues (WAVE, axe, ANDI or Accessibility addon tab for Storybook)
  • Requested a design review for user-facing changes
  • For any new migrations/schema changes:
    • Followed guidelines for zero-downtime deploys

As code reviewer(s), I have

  • Pulled this branch locally and tested it
  • Reviewed this code and left comments
  • Checked that all code is adequately covered by tests
    • Checked that the E2E test build is not failing
  • Made it clear which comments need to be addressed before this work is merged
  • Considered marking this as accepted even if there are small changes needed
  • Performed a11y testing:
    • Checked responsiveness in mobile, tablet, and desktop
    • Checked keyboard navigability
    • Tested with VoiceOver in Safari
    • Checked VO's rotor menu for landmarks, page heading structure and links
    • Used a browser a11y tool to check for issues (WAVE, axe, ANDI or Accessibility addon tab for Storybook)

As a designer reviewer, I have

  • Checked in the design translated visually
  • Checked behavior
  • Checked different states (empty, one, some, error)
  • Checked for landmarks, page heading structure, and links
  • Tried to break the intended flow
  • Performed a11y testing:
    • Checked responsiveness in mobile, tablet, and desktop
    • Checked keyboard navigability
    • Tested with VoiceOver in Safari
    • Checked VO's rotor menu for landmarks, page heading structure and links
    • Used a browser a11y tool to check for issues (WAVE, axe, ANDI or Accessibility addon tab for Storybook)

As a test user, I have

  • Run through the Test Script:
    • On commercial internet in IE11
    • On commercial internet in Firefox
    • On commercial internet in Chrome
    • On commercial internet in Safari
    • On NIPR in IE11
    • On NIPR in Firefox
    • On NIPR in Chrome
    • On NIPR in Safari
    • On a mobile device in Firefox
    • On a mobile device in Chrome
    • On a mobile device in Safari
  • Added any anomalous behavior to this PR

@shortcut-integration
Copy link

This pull request has been linked to Shortcut Story #968: Add Light / Dark mode toggle to the portal.

@jcbcapps jcbcapps changed the title [WIP]feat: Add Light / Dark mode toggle to the portal feat: Add Light / Dark mode toggle to the portal Sep 7, 2022
@jcbcapps jcbcapps marked this pull request as ready for review September 7, 2022 17:01
Copy link
Contributor

@gidjin gidjin left a comment

Choose a reason for hiding this comment

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

Now that I understand how it's supposed to work I can mark this approved :shipit:

@jcbcapps jcbcapps merged commit e37be05 into main Sep 14, 2022
@jcbcapps jcbcapps deleted the sc-968/add-theme-toggle branch September 14, 2022 16:49
@gidjin gidjin mentioned this pull request Sep 16, 2022
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.

3 participants