Skip to content

Conversation

@noisysocks
Copy link
Contributor

@noisysocks noisysocks commented Dec 4, 2025

Asana Task/Github Issue: https://app.asana.com/1/137249556945/project/1209121419454298/task/1211842297547581

  • Updates the error special page (errorpage) to accept $THEME_VARIANT$ as an interpolated string and expose window.onChangeTheme({ themeVariant }) as a method native can use to adjust the variant in realtime.

  • Adjusts the default background colour according to the set variant so that something observable happens when setting a theme.

Intention here is to do the minimal amount needed to unblock the native apps. In follow up PRs I’ll import theme variables from the design-tokens repo and update more than just the background colour.

Testing Steps

  1. Browse to https://deploy-preview-2077--content-scope-scripts.netlify.app/build/pages/errorpage/.
  2. Check that background colour is light grey (as before).
  3. Switch theme to dark using System Settings.
  4. Check that background colour is dark grey (as before).
  5. Manually modify data-theme-variant to ”rose” (or any valid variant).
  6. Check that background colour is pink (or whatever).
  7. Switch theme to dark using System Settings.
  8. Check that background colour is purple (or whatever).
  9. Run window.onChangeTheme({ themeVariant: ‘desert’ }) (or any valid variant) in DevTools.
  10. Check that background colour is pink (or whatever).
  11. Switch theme to dark using System Settings.
  12. Check that background colour is purple (or whatever).

Checklist

<!—
These questions are a friendly reminder to shipping code, if you're uncertain ask the AoR owners.
It's also totally appropriate to not check some of these boxes, if they don't apply to your change.
—>
Please tick all that apply:

  • I have tested this change locally
  • I have tested this change locally in all supported browsers
  • This change will be visible to users
  • I have added automated tests that cover this change
  • I have ensured the change is gated by config
  • This change was covered by a ship review
  • This change was covered by a tech design
  • Any dependent config has been merged

Note

Adds theme variant support to the error page via data-theme-variant, a window.onChangeTheme runtime hook, and variant-specific backgrounds for light/dark modes.

  • Theming support for pages/errorpage
    • HTML (public/index.html): Initialize body with data-theme-variant="$THEME_VARIANT$"; add window.onChangeTheme(payload) to update document.body.dataset.themeVariant at runtime.
    • CSS (public/style.css): Define background colors for theme variants (coolGray, slateBlue, green, violet, rose, orange, desert) in light and dark modes via [data-theme-variant="..."] selectors.
    • Docs (readme.md): Document theming mechanisms, supported variants, payload format, and example usage.

Written by Cursor Bugbot for commit 956e168. This will update automatically on new commits. Configure here.

@noisysocks noisysocks added the enhancement New feature or request label Dec 4, 2025
@netlify
Copy link

netlify bot commented Dec 4, 2025

Deploy Preview for content-scope-scripts ready!

Name Link
🔨 Latest commit 956e168
🔍 Latest deploy log https://app.netlify.com/projects/content-scope-scripts/deploys/69314d97e9887b0008e49bcd
😎 Deploy Preview https://deploy-preview-2077--content-scope-scripts.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 project configuration.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Temporary Branch Update

The temporary branch has been updated with the latest changes. Below are the details:

Please use the above install command to update to the latest version.

@github-actions
Copy link

github-actions bot commented Dec 4, 2025

[Beta] Generated file diff

Time updated: Thu, 04 Dec 2025 09:01:30 GMT

Apple
    - apple/pages/errorpage/index.html
  • apple/pages/errorpage/style.css

File has changed

Integration
    - integration/pages/errorpage/index.html
  • integration/pages/errorpage/style.css

File has changed

@noisysocks noisysocks marked this pull request as ready for review December 4, 2025 01:00
@noisysocks noisysocks requested review from a team, mgurgel and shakyShane as code owners December 4, 2025 01:00
@noisysocks noisysocks force-pushed the randerson/errorpage-theming-support branch from 3f21cde to 956e168 Compare December 4, 2025 09:00
@noisysocks noisysocks added this pull request to the merge queue Dec 4, 2025
Merged via the queue into main with commit e745ace Dec 4, 2025
18 checks passed
@noisysocks noisysocks deleted the randerson/errorpage-theming-support branch December 4, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants