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

[Draft] Enables respec darkmode #2138

Merged
merged 3 commits into from
Oct 28, 2024
Merged

[Draft] Enables respec darkmode #2138

merged 3 commits into from
Oct 28, 2024

Conversation

daniel-montalvo
Copy link
Contributor

@daniel-montalvo daniel-montalvo commented Mar 6, 2024

Closes #2133

Enables darkmode compatibilty through respecConfig.darkMode


Preview | Diff

@daniel-montalvo daniel-montalvo self-assigned this Mar 6, 2024
@daniel-montalvo daniel-montalvo added the editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo label Mar 6, 2024
@daniel-montalvo
Copy link
Contributor Author

This follows w3c/respec#3236

Much appreciated if anyone can please test this to see how it actually works in the ARIA context.

@adampage
Copy link
Member

adampage commented Mar 6, 2024

Hi @daniel-montalvo, I’m not sure this is a valid review, but the issue is still present in this PR’s auto-generated diff preview. respec’s diff engine found 4 changes to the ARIA spec in this PR that I presume are unrelated to your commit, but that did create a visual diff which still exhibits the color issue.

Is it possible for me to run respec locally and produce a diff preview after making a quick content change to the spec’s index.html file? I’m wondering if the issue might show up as resolved in that context.

@pkra
Copy link
Member

pkra commented Mar 6, 2024

@daniel-montalvo this doesn't seem to have any any visual effect when switching my browser's dark/light mode. I also tried manually adding ?darkMode=true to no avail.

@pkra
Copy link
Member

pkra commented Mar 6, 2024

Oh, as @adampage said, the diffs are (still) affected and still exhibiting the bug that Adam had reported.

@dontcallmedom
Copy link
Member

The dark mode feature has been merged in respec, but not yet deployed in a release, so it is expected this would not have an effect yet

@daniel-montalvo
Copy link
Contributor Author

The dark mode feature has been merged in respec, but not yet deployed in a release, so it is expected this would not have an effect yet

Thanks @dontcallmedom for clarifying this, wasn't sure about whether it was already deployed or not.

Thanks @pkra and @adampage for testing this.

@daniel-montalvo daniel-montalvo marked this pull request as draft March 6, 2024 16:26
@daniel-montalvo
Copy link
Contributor Author

Moving this to draft until this is actually deployed in a respec release

@daniel-montalvo daniel-montalvo changed the title Enables respec darkmode [Draft] Enables respec darkmode Mar 6, 2024
@sidvishnoi
Copy link
Member

It's released now.

@jnurthen jnurthen marked this pull request as ready for review March 12, 2024 22:16
@pkra
Copy link
Member

pkra commented Apr 29, 2024

@daniel-montalvo following today's call I checked again. I do not see any changes in the preview when forcing dark mode.

Doe the previews need to be refreshed in some way perhaps?

index.html Outdated
@@ -155,6 +155,7 @@
xref: ["dom", "accname-1.2", "core-aam-1.2", "infra", "HTML"],
definitionMap: []
};
darkMode: true;
Copy link
Member

@sidvishnoi sidvishnoi Apr 30, 2024

Choose a reason for hiding this comment

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

ReSpec removed this config option today (https://github.com/w3c/respec/pull/4700) in favor of the color-scheme meta tag.
https://lists.w3.org/Archives/Public/spec-prod/2024AprJun/0000.html

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @sidvishnoi !

@pkra pkra added the spec:aria label Jun 14, 2024
Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for wai-aria ready!

Name Link
🔨 Latest commit 284a549
🔍 Latest deploy log https://app.netlify.com/sites/wai-aria/deploys/669796434e54fa000822f7b5
😎 Deploy Preview https://deploy-preview-2138--wai-aria.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.

@pkra
Copy link
Member

pkra commented Jul 8, 2024

@daniel-montalvo in the latest netlify preview, I still don't see a visual change when forcing darkmode (in Chrome or Firefox). Sorry :(

@kfranqueiro
Copy link

I see the change in the preview. My OS is set to dark mode and I see this:

screenshot of preview with light text on dark background

If I force light mode in dev tools I see the opposite:

screenshot of preview with dark text on light background

Note that the suggestion about removing darkMode: true from the changes still seems to be unresolved.

@pkra
Copy link
Member

pkra commented Jul 17, 2024

@kfranqueiro thanks for making me take another look. I now noticed that when I switch to darkmode after loading, there's no effect. But if I reload the page, it's switched to dark mode. Maybe that's the expected behavior of respec right now. [Edit: once reloaded in dark mode, switching in and out of dark mode works as expected - I see this on both Chromium and Firefox so I suspect something is not quite right on the respec end.)

We need to fix our CSS, e.g., common.css sets table cells to a background of #eee which does not play well with dark mode's text color.

@pkra
Copy link
Member

pkra commented Jul 17, 2024

@daniel-montalvo let me know if you'd like CSS fixes as part of this PR or afterwards.

@daniel-montalvo
Copy link
Contributor Author

Thanks @kfranqueiro for taking a look at this.

@pkra Happy for the CSS changes to be included in this PR.

@pkra
Copy link
Member

pkra commented Oct 28, 2024

Merging as per editors' meeting today.

@pkra pkra merged commit 6b1ba84 into main Oct 28, 2024
7 checks passed
@pkra pkra deleted the enable-darkMode branch October 28, 2024 16:13
github-actions bot added a commit that referenced this pull request Oct 28, 2024
SHA: 6b1ba84
Reason: push, by pkra

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda-Editors editorial a change to an example, note, spelling, grammar, or is related to publishing or the repo spec:aria
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insertions and deletions in PR diff preview are unreadable in dark mode
6 participants