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
26 changes: 22 additions & 4 deletions .github/workflows/check_export.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: check-export
env:
REFLEX_DEP: "git+https://github.com/reflex-dev/reflex.git@main"
# Git ref of the reflex monorepo to test templates against. reflex is a uv
# workspace, so reflex and its split-out packages (reflex-base,
# reflex-components-*) have to be installed together from the same tree —
# a dev reflex paired with released sub-packages from PyPI does not work.
REFLEX_REF: "main"
REFLEX_TELEMETRY_ENABLED: false
on:
push:
Expand All @@ -9,8 +13,9 @@ on:
branches: [main]
workflow_dispatch:
inputs:
reflex_dep:
description: "Reflex dep (raw pip spec)"
reflex_ref:
description: "reflex monorepo git ref to test against"
default: "main"

jobs:
list-templates:
Expand All @@ -27,6 +32,12 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: reflex-dev/reflex
ref: ${{ github.event.inputs.reflex_ref || env.REFLEX_REF }}
path: .reflex-src
fetch-depth: 0 # full history so uv-dynamic-versioning derives a real version
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: 3.10.16
Expand All @@ -53,7 +64,14 @@ jobs:
python -m venv venv
source venv/bin/activate

pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt
# Install the whole reflex workspace from the checked-out monorepo, so
# reflex and every split-out package (reflex-base, reflex-components-*)
# are the same dev version. uv resolves the sibling workspace packages
# from the source tree; plain `pip install reflex@git` would instead
# pull released sub-packages from PyPI and break whenever main moves a
# module between packages (e.g. reflex_base.components.memo).
pip install uv
uv pip install "$GITHUB_WORKSPACE/.reflex-src" -r requirements.txt

export OPENAI_API_KEY="dummy"
reflex init
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,5 @@ def index() -> rx.Component:
)


app = rx.App(
theme=rx.theme(
appearance="light",
has_background=False,
radius="medium",
accent_color="indigo",
)
)
app = rx.App()
app.add_page(index, title="Accounts Dashboard")
13 changes: 12 additions & 1 deletion account_management_dashboard/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@

config = rx.Config(
app_name="account_management_dashboard",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(
theme=rx.theme(
appearance="light",
has_background=False,
radius="medium",
accent_color="indigo",
)
),
],
)
2 changes: 1 addition & 1 deletion admin_dashboard/admin_dashboard/admin_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def customer_success_hub_page() -> rx.Component:
return mock_page("Customer Success Hub")


app = rx.App(theme=rx.theme(appearance="light"), stylesheets=[])
app = rx.App(stylesheets=[])
app.add_page(index, route="/")
app.add_page(sales_pipeline_page, route="/sales-pipeline")
app.add_page(hr_portal_page, route="/hr-portal")
Expand Down
6 changes: 5 additions & 1 deletion admin_dashboard/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

config = rx.Config(
app_name="admin_dashboard",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(theme=rx.theme(appearance="light")),
],
)
1 change: 0 additions & 1 deletion admin_panel/admin_panel/admin_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def index() -> rx.Component:


app = rx.App(
theme=rx.theme(appearance="light"),
head_components=[
rx.el.link(
rel="preconnect",
Expand Down
6 changes: 5 additions & 1 deletion admin_panel/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

config = rx.Config(
app_name="admin_panel",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(theme=rx.theme(appearance="light")),
],
)
7 changes: 0 additions & 7 deletions ai_image_gen/ai_image_gen/ai_image_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,4 @@
stylesheets=styles.base_stylesheets,
html_lang="en",
html_custom_attrs={"className": "!scroll-smooth"},
theme=rx.theme(
appearance="inherit",
has_background=True,
scaling="100%",
radius="none",
accent_color="violet",
),
)
13 changes: 12 additions & 1 deletion ai_image_gen/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,16 @@

config = rx.Config(
app_name="ai_image_gen",
plugins=[rx.plugins.SitemapPlugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.RadixThemesPlugin(
theme=rx.theme(
appearance="inherit",
has_background=True,
scaling="100%",
radius="none",
accent_color="violet",
)
),
],
)
5 changes: 4 additions & 1 deletion api_admin_panel/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@

config = rx.Config(
app_name="api_admin_panel",
plugins=[rx.plugins.SitemapPlugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.RadixThemesPlugin(),
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ def index() -> rx.Component:
)


app = rx.App(theme=rx.theme(appearance="light"))
app = rx.App()
app.add_page(index)
6 changes: 5 additions & 1 deletion business_analytics_dashboard/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

config = rx.Config(
app_name="business_analytics_dashboard",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(theme=rx.theme(appearance="light")),
],
)
2 changes: 1 addition & 1 deletion chat_app/chat_app/chat_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ def index() -> rx.Component:
return chat_interface()


app = rx.App(theme=rx.theme(appearance="light"))
app = rx.App()
app.add_page(index)
6 changes: 5 additions & 1 deletion chat_app/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

config = rx.Config(
app_name="chat_app",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(theme=rx.theme(appearance="light")),
],
)
5 changes: 4 additions & 1 deletion ci_template/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@

config = rx.Config(
app_name="cijob",
plugins=[rx.plugins.SitemapPlugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.RadixThemesPlugin(),
],
)
1 change: 0 additions & 1 deletion company_dashboard/company_dashboard/company_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def index() -> rx.Component:


app = rx.App(
theme=rx.theme(appearance="light"),
stylesheets=["https://cdn.tailwindcss.com"],
style={
rx.el.label: {"font_family": "JetBrains Mono,ui-monospace,monospace"},
Expand Down
6 changes: 5 additions & 1 deletion company_dashboard/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

config = rx.Config(
app_name="company_dashboard",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(theme=rx.theme(appearance="light")),
],
)
10 changes: 6 additions & 4 deletions customer_data_app/customer_data/backend/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import Union

import reflex as rx
from sqlmodel import String, asc, cast, desc, func, or_, select
from sqlmodel import Field, SQLModel, String, asc, cast, desc, func, or_, select


def _get_percentage_change(
Expand All @@ -19,9 +19,10 @@ def _get_percentage_change(
return percentage_change


class Customer(rx.Model, table=True):
class Customer(SQLModel, table=True):
"""The customer model."""

id: int | None = Field(default=None, primary_key=True)
name: str
email: str
phone: str
Expand Down Expand Up @@ -62,7 +63,7 @@ def load_entries(self) -> list[Customer]:
or_(
*[
getattr(Customer, field).ilike(search_value)
for field in Customer.get_fields()
for field in Customer.model_fields
if field not in ["id", "payments"]
],
# ensures that payments is cast to a string before applying the ilike operator
Expand Down Expand Up @@ -176,7 +177,8 @@ def update_customer_to_db(self, form_data: dict):
select(Customer).where(Customer.id == self.current_user.id)
).first()
form_data.pop("id", None)
customer.set(**form_data)
for field, value in form_data.items():
setattr(customer, field, value)
session.add(customer)
session.commit()
self.load_entries()
Expand Down
6 changes: 1 addition & 5 deletions customer_data_app/customer_data/customer_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ def index() -> rx.Component:
)


app = rx.App(
theme=rx.theme(
appearance="dark", has_background=True, radius="large", accent_color="grass"
),
)
app = rx.App()

app.add_page(
index,
Expand Down
12 changes: 11 additions & 1 deletion customer_data_app/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,15 @@
config = rx.Config(
app_name="customer_data",
db_url=database_url,
plugins=[rx.plugins.SitemapPlugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.RadixThemesPlugin(
theme=rx.theme(
appearance="dark",
has_background=True,
radius="large",
accent_color="grass",
)
),
],
)
6 changes: 1 addition & 5 deletions dalle/dalle/dalle.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,5 @@ def index():


# Add state and page to the app.
app = rx.App(
theme=rx.theme(
appearance="light", has_background=True, radius="medium", accent_color="mint"
),
)
app = rx.App()
app.add_page(index, title="Reflex:DALL-E")
12 changes: 11 additions & 1 deletion dalle/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,15 @@

config = rx.Config(
app_name="dalle",
plugins=[rx.plugins.SitemapPlugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.RadixThemesPlugin(
theme=rx.theme(
appearance="light",
has_background=True,
radius="medium",
accent_color="mint",
)
),
],
)
5 changes: 4 additions & 1 deletion dashboard/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@

config = rx.Config(
app_name="dashboard",
plugins=[rx.plugins.SitemapPlugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.RadixThemesPlugin(),
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def index() -> rx.Component:


app = rx.App(
theme=rx.theme(appearance="light"),
stylesheets=[
"https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.29.0/feather.min.js"
],
Expand Down
6 changes: 5 additions & 1 deletion futuristic_dashboard/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

config = rx.Config(
app_name="futuristic_dashboard",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(theme=rx.theme(appearance="light")),
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def index() -> rx.Component:


app = rx.App(
theme=rx.theme(appearance="light"),
style={
"font_family": "'Inter', sans-serif",
"height": "100%",
Expand Down
6 changes: 5 additions & 1 deletion manufacturing_dashboard/rxconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@

config = rx.Config(
app_name="manufacturing_dashboard",
plugins=[rx.plugins.SitemapPlugin(), rx.plugins.TailwindV3Plugin()],
plugins=[
rx.plugins.SitemapPlugin(),
rx.plugins.TailwindV3Plugin(),
rx.plugins.RadixThemesPlugin(theme=rx.theme(appearance="light")),
],
)
Loading
Loading