Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def rxconfig_template(app_name: str):
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV4Plugin(),
rx.plugins.RadixThemesPlugin(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve legacy App theme in scaffolded apps

Adding a default explicit RadixThemesPlugin() to every generated rxconfig.py changes how freshly scaffolded apps handle rx.App(theme=...): _resolve_radix_themes_plugin treats this as an explicit plugin, and RadixThemesPlugin.apply_app_theme() returns without applying the app theme when _explicit is true. So a new app that follows the current theming examples and sets app = rx.App(theme=rx.theme(accent_color="teal")) will now compile with the plugin’s default blue theme instead of the requested theme; before this template change, the implicit plugin preserved the legacy app theme while warning.

Useful? React with 👍 / 👎.

]
)"""

Expand Down
6 changes: 6 additions & 0 deletions tests/units/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from reflex_base.vars.base import Var

from reflex.environment import environment
from reflex.plugins import RadixThemesPlugin
from reflex.state import BaseState
from reflex.utils import exec as utils_exec
from reflex.utils import frontend_skeleton, js_runtimes, prerequisites, templates, types
Expand Down Expand Up @@ -361,6 +362,11 @@ def test_create_config_e2e(tmp_working_dir):
exec((tmp_working_dir / constants.Config.FILE).read_text(), eval_globals)
config = eval_globals["config"]
assert config.app_name == app_name
# The default template must declare RadixThemesPlugin explicitly. The blank
# app renders Radix Themes components, so without an explicit plugin the
# compiler falls back to implicit enablement and emits a deprecation warning
# on the first `reflex run` of a freshly scaffolded app (issue #6483).
assert any(isinstance(plugin, RadixThemesPlugin) for plugin in config.plugins)


class DataFrame:
Expand Down