8000 [DT-2854] add an integration test to make sure dark mode toggling works through localstorage by andrewzamojc · Pull Request #2752 · temporalio/ui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[DT-2854] add an integration test to make sure dark mode toggling works through localstorage #2752

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 re 8000 lated emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2025

Conversation

andrewzamojc
Copy link
Contributor
@andrewzamojc andrewzamojc commented May 29, 2025

Description & motivation 💭

A previous PR introduced the "System Default" dark mode setting. This didn't write correctly to local storage, and needed a fix, which is already merged. This PR tests that the fix is working.

Thanks team for already having a way to separate desktop and mobile test!

Thanks AI for the boilerplate and thanks @rossnelson for helping make it actually work. Humans rule!

Screenshots (if applicable) 📸

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

8000
Copy link
vercel bot commented May 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
holocene ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2025 2:55pm

@@ -35,5 +35,6 @@
label={buttonText}
icon={buttonIcon}
on:click={cycleDarkModePreference}
data-testid="dark-mode-icon-button"
Copy link
Contributor Author
@andrewzamojc andrewzamojc May 29, 2025

Choose a reason for hiding this comment

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

Annotation: Since the aria-label changes when you press the button, getByRole doesn't work well without re-selecting over and over. By using testid, I can get the element once and use it throughout the test.

@andrewzamojc andrewzamojc changed the title add an integration test to make sure dark mode toggling works through localstorage [DT-2854] add an integration test to make sure dark mode toggling works through localstorage May 29, 2025
@@ -25,6 +25,7 @@
<div
class="flex h-6 w-6 items-center after:absolute after:left-[calc(100%_+_1.5rem)] after:top-0 after:hidden after:h-8 after:items-center after:bg-slate-800 after:p-1 after:px-2 after:text-xs after:text-white after:content-[attr(data-tooltip)] group-data-[nav=closed]:hover:after:flex"
data-tooltip={tooltip}
aria-hidden="true"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Annotation: This icon is pure decoration / redundant information to a non-visual user. By aria-hiding it, the navigation button now has a clean accessible name.

@andrewzamojc andrewzamojc marked this pull request as ready for review May 30, 2025 15:01
@andrewzamojc andrewzamojc requested review from rossedfort and a team as code owners May 30, 2025 15:01
@andrewzamojc andrewzamojc merged commit 286832e into main May 30, 2025
20 checks passed
@andrewzamojc andrewzamojc deleted the DT-2854-4-test-dark-mode-toggle branch May 30, 2025 15:10
Copy link
Collaborator
@rossnelson rossnelson left a comment

Choose a reason for hiding this comment

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

Very nice 🤘

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
0