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

Make default theme use platform-specific alias tokens #2492

Open
5 tasks done
lyzhan7 opened this issue Jan 6, 2023 · 0 comments
Open
5 tasks done

Make default theme use platform-specific alias tokens #2492

lyzhan7 opened this issue Jan 6, 2023 · 0 comments

Comments

@lyzhan7
Copy link
Contributor

lyzhan7 commented Jan 6, 2023

Platform

  • iOS
  • macOS
  • win32
  • windows
  • android

Describe the feature that you would like added

Current state of the default theme:

  • The defaultTheme was set up before all of the other platforms were fully supported, and was based on the web palette as a fallback (which currently windows in FURN also uses). It works like a web theme, which means that it has light/dark/hc as its modes.
  • Up until this PR, the default theme has been using web/windows tokens. After that change, on Android only, the default theme is actually using Android tokens.
  • iOS will likely also be following Android and will also be in a mixed state (default theme is getting created with iOS tokens)
  • One of the issues with how iOS/Android currently work, is that the default theme creation code assumes there is a light, dark, and high contrast mode version. iOS and android currently do not support light or dark mode, so as a workaround both currently return use light mode tokens to populate the default theme
  • So currently, how each platform's default-theme works is different

Whether the default theme should be using web/windows tokens or should be using platform specific tokens was brought up with the recent iOS color tokens work. We are thinking of changing the existing behavior so that the default theme is more specific to each platform. An engineering plan will need to be drawn up for this work, and we should ensure that the changes do not impact package size.

Some open questions to consider

  • Is it possible to not pull in the defaultTheme if a client provides a ThemeProvider

What component or utility would this be added to

No response

Have you discussed this feature with our team, and if so, who

No response

Additional context/screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant