Skip to content

Conversation

@shameondev
Copy link

Summary

  • Add NoCodesTheme enum to allow SDK users to override the theme mode
  • Support three modes: Auto (default), Light, Dark
  • Inject window.noCodesTheme JavaScript variable into HTML for web content to use

Usage

val config = NoCodesConfig.Builder(context, "your-key")
    .setTheme(NoCodesTheme.Dark)  // or Light, Auto (default)
    .build()

Changes

  • New NoCodesTheme.kt enum with Auto/Light/Dark values
  • New ThemeConfigProvider.kt interface
  • Updated NoCodesConfig.kt with setTheme() builder method
  • Updated InternalConfig.kt to implement ThemeConfigProvider
  • Updated MiscAssembly and MiscAssemblyImpl to expose theme provider
  • Updated ScreenFragment.kt to inject theme into HTML

Related to DEV-460

Add NoCodesTheme enum to allow SDK users to override the theme mode:
- Auto (default): follows device settings via prefers-color-scheme
- Light: forces light theme
- Dark: forces dark theme

The theme is injected into HTML via window.noCodesTheme JavaScript variable
which the web content uses to apply the correct theme.
@SpertsyanKM
Copy link
Contributor

Supported it in #761 along with a couple of fixes

@SpertsyanKM SpertsyanKM deleted the feat/theme-override-support branch January 29, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants