Releases: reflex-dev/reflex
v0.4.6
Known Issues
- Unhandled runtime error when navigating between pages in a stateless app.
- Fix: c78884b
This Release was Airdropped from 30000' over Nevada πͺ
Breaking Changes
Use dill
instead of cloudpickle
In reflex-0.4.6, existing states persisted in redis are not compatible. Redis should be cleared and existing states/sessions discarded after upgrading.
New Features
reflex component share
CLI
Simplify sharing of custom 3rd party components to the Reflex Component Gallery.
- [REF-2168] Add share options to custom component commands by @martinxu9 in #2883
rx.ComponentState
An easy way to define per-component State.
import reflex as rx
class CounterButton(rx.ComponentState):
count: int
def increment(self):
self.count += 1
def decrement(self):
self.count -= 1
@classmethod
def get_component(cls, *children, **props):
return rx.button(
f"Counter {cls.count}",
on_click=cls.increment,
on_context_menu=cls.decrement.prevent_default,
)
counter_button = CounterButton.create
@rx.page()
def index():
return rx.vstack(
*[counter_button() for _ in range(10)]
)
app = rx.App()
Automatically Select Next Available Port
When the configured port is not available, automatically select the next sequential port until one is available
- added feature to automatically change port by @wassafshahzad in #2867
Expanding Textarea
New props on rx.el.textarea
and rx.text_area
allow the field to expand to match content and submit the form when Enter is pressed (shift+enter to create a new line)
rx.scroll_to
event
Scroll the viewpoint to show a given element by ID.
- Scroll to feature by @Yummy-Yums in #2948
Improvements
Simplify Component Wrapping API
[REF-2272] Support declaring EventHandlers directly in component by @martinxu9 in #2952
Props typed as rx.EventHandler
can be used to define event triggers without overriding get_event_triggers
method. The argument of the type specifies the JS to Python mapping: on_click: rx.EventTrigger[lambda e: [e]]
.
generate pyi files when building/publishing 3rd party component by @Lendemor in #2945
Third-party components will now have .pyi
files generated for them to improve IDE completion, similar to the built in Reflex components.
Updated Lucide Icons
The latest icons available on https://lucide.dev are now usable in Reflex. Some icon names have changed, these will print a deprecation warning pointing to the new name. The old names will be removed in 0.5.0.
- Update LUCIDE_ICON_LIST with newest Icon names by @luccavp12 in #2891
Loosen Requirement Pins
Reflex is now compatible with a wider range of dependencies. Notably, it can be used with packages that depend on Pydantic v2 (although the framework itself is still using v1).
Note: due to a regression in recent uvicorn
versions, that dep will remain pinned as it was in 0.4.5.
Avoid content flicker when using State.is_hydrated
is_hydrated
is set to False immediately when a navigation event starts, and is set back to True after all on_load events have executed. This avoids content flickering into view before a loading spinner is displayed when the spinner is conditional on the value of State.is_hydrated
.
Additionally, the WiFi off connection error pulser is only displayed when connection errors are detected (before it was displayed whenever the page was not hydrated).
Miscellaneous
- [REF-1982] state: Warn if redis state is "too big" by @masenf in #2868
- use radix box instead of chakra one for responsive elements by @Lendemor in #2921
- [REF-2229]Dedupe deprecation warnings by @ElijahAhianyo in #2871
- fix hook order to use ref inside user hooks by @Lendemor in #2906
- Ensure user-defined hooks can always access refs
- [REF-2302] When a Var points to a model, prefer access to model fields. by @masenf in #2893
Bug Fixes
- [REF-2117]:
rx.color_mode_cond
to work in f-strings by @ElijahAhianyo in #2775 - Default to None if bun/fnm version is Invalid by @ElijahAhianyo in #2940
- remove inheritance from Flex for list components by @Lendemor in #2936
- Fix markdown rendering of lists
- parse_args_spec: resolve annotations with typing.get_type_hints by @masenf in #2849
- [REF-2219] Avoid refetching states that are already cached by @masenf in #2953
- Fix issue affecting Cookie/LocalStorage values when substates contained computed vars
- [REF-2306] Include twine in dependencies on pyproject.toml by @martinxu9 in #2895
Other Changes
- Fix #2877, PR title not available for push/PR merge by @martinxu9 in #2889
- [REF-2284]Benchmark add extra info on publishing data by @ElijahAhianyo in #2864
- Revert "add precommit check added large files and git lfs rules (#2866)" by @picklelo in #2905
- [REF-1682][REF-1683][REF-1684][REF-2283]Benchmark reflex package size and .web folder by @ElijahAhianyo in #2880
- fix AppHarness reloading by @benedikt-bartscher in #2916
- Remove page.pyi: it's out of date, and not necessary by @masenf in #2924
- [REF-2416] Pass shell=True when starting AppHarness on Windows by @masenf in #2944
- updated watchdog dep by @Yummy-Yums in #2946
- Update README.md by @ChicIceCream in #2963
New Contributors
- @luccavp12 made their first contribution in #2891
- @mahrz24 made their first contribution in #2796
- @ChicIceCream made their first contribution in #2963
Full Changelog: v0.4.5...v0.4.6
v0.4.5
New Features
Support SQLAlchemy Models Directly
- Bare sqlalchemy metadata by @benedikt-bartscher in #2355
Experimental Multi-process Compilation
Pass REFLEX_COMPILE_PROCESSES=0
to opt-in to multiprocess compile, which significantly improves compilation speed of large apps (Mac and Linux only).
Improvements
- improve event handler state references by @benedikt-bartscher in #2818
- Allow access to position from HighLevelSelect by @hjpr in #2829
- [REF-2157] Allow
rx.download
to resolverx.get_upload_url
links by @masenf in #2813 - better default title for seo (also remove default description) by @Lendemor in #2844
- Make @rx.memo work with state vars passed as props by @masenf in #2810
- added name of Var to error message by @emmakodes in #2827
Bug Fixes
- [REF-2172] Add DECORATED_PAGES before compiling in thread by @masenf in #2841
- Fix known regression with py3.8 and py3.9
- Remove width prop from rx.select by @picklelo in #2835
- Get
client_ip
fromasgi.scope
by @masenf in #2808router.session.client_ip
more likely to be correct now
- convert text inside list_item to span and set icon display to inline by @Lendemor in #2860
Other Changes
- [REF-2086] Avoid "Warning: The path to the Node binary could not be found. by @masenf in #2803
- telemetry refactor + unit tests by @Lendemor in #2786
- Custom Component Request Template by @Alek99 in #2853
- Benchmark with app harness by @ElijahAhianyo in #2774
- Fix py3.8 integration test_var_operations.py by @masenf in #2858
- Account for imports of @rx.memo components for frontend package installation by @masenf in #2863
- [REF-2216] Warn if windows is used with py312 by @masenf in #2856
- Separate
get_hooks
andget_hooks_internal
for stable output by @masenf in #2710 - [REF-2219] vars: set
_was_touched
when updating cached vars by @masenf in #2886
New Contributors
- @hjpr made their first contribution in #2829
- @emmakodes made their first contribution in #2827
Full Changelog: v0.4.4...v0.4.5
v0.4.4
Known Issues
py3.8 and py3.9 using @rx.page
with REDIS_URL
set:
RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.
Breaking Changes
Component._get_vars
signature change
Unlikely to affect most users; however the signature of Component._get_vars
has changed to accept a new include_children
parameter which should either be handled internally or passed to super()._get_vars
if this function has been overridden in a custom component.
New signature
def _get_vars(self, include_children: bool = False) -> Iterator[Var]:
New Features
Expose lang
and other attributes on <html>
tag
- pass lang and custom_attrs from app to html root by @macmoritz in #2697
rx.upload
exposes on_drop
event trigger
Trigger upload immediately after files are selected by passing an rx.upload_files
-wrapped handler directly to on_drop
trigger.
rx.el.form
supports on_submit
event trigger
Improvements
Dependency Changes
- remove pipdeptree as reflex dep by @martinxu9 in #2763
- bump up httpx to >= 0.25.1 by @martinxu9 in #2782
Enable /_upload
when get_upload_url
is used
Previously, the rx.upload
component was the only thing that resulted in the endpoint being enabled.
Update docker-example
for more realistic deployments
-
a simple dual port
Dockerfile
-
compose.yaml
providing a separate backend container and static frontend served with automatic TLS- Support volumes for data and uploaded files
-
compose.prod.yaml
including postgres database and redis containers -
app.Dockerfile
for single container, single port deployment on a platform service like Render, Railway, and Google Cloud Run -
Include app.Dockerfile for deploying to container hosting platform by @masenf in #2784
Improve "Stateless" app detection
Apps which import State, but do not actually use it are considered stateless.
Apps that use rx.State.router
automatically work without defining a dummy substate.
Apps dynamically create state at runtime (#1877) correctly include used dynamic substates.
- Track state usage by @benedikt-bartscher in #2441
Better support for plain SQLAlchemy
- add support for sqlalchemy AssociationProxys by @benedikt-bartscher in #2809
reflex component
CLI improvements
-
Build and publish in a single step
-
Improved custom component template
-
More comprehensive
.gitignore
-
[REF-2141] Custom component command improvements by @martinxu9 in #2807
EventChain
list syntax is undeprecated
It is now acceptable to pass a list of multiple EventHandler
to an event trigger, such as on_click
.
Bug Fixes
- Fix Padding in Accordion component
- Update accordion.py by @FrankBold in #2759
- Skip node install if version requirements are met
- Fix infinite recursion when a substate named "state" has a computed var by @masenf in #2778
- Fix
/_upload
404 and missingon_load
handlers in production deployment - [REF-2087] Better rx.progress styling integration with radix themes by @masenf in #2762
- Updating initialize_gitignore() to avoid modifying the encoding of the .gitignore file by @cllatser in #2797
- Fix tab freezing and crash when
appearance="dark"
andtheme_panel=True
- [REF-2098] Allow overlay Close components to have on_click handlers by @masenf in #2793
Other Changes
- Perf improvements (part 1) by @masenf in #2779
- Unwrap images in rx.markdown by @picklelo in #2789
- [AppHarness] add webdriver option arguments via env by @benedikt-bartscher in #2783
New Contributors
- @FrankBold made their first contribution in #2759
- @ansuzgs made their first contribution in #2767
Full Changelog: v0.4.3...v0.4.4
v0.4.3
New Features
Set initial_value
for rx.var
and rx.cached_var
Provide a placeholder to avoid evaluating computed vars during compile time, for example, if they would perform database queries or other expensive operations.
class MyState(rx.State):
@rx.var(initial_value=42)
def answer(self):
with rx.session() as session:
session.exec(...)
- Initial values for computed vars by @benedikt-bartscher in #2670
State.get_state
allows access to arbitrary substates from within an event handler
class MyState(rx.State):
answer: int = 42
class OtherState(rx.State):
async def get_answer(self):
my_state = await self.get_state(MyState)
print(f"The answer is {my_state}.answer")
Note that get_state
is an async function and must be await
'ed
CLI for Creating and Publishing 3rd Party Components
- Add support for custom components starter by @martinxu9 in #2314
Improvements
Allow accent
as a valid choice in rx.color
- added accent option in color by @wassafshahzad in #2713
Chakra no longer used when rendering Markdown
Sidebar template uses all Radix components
Disallow invalid /api
prefix for frontend page routes
These routes conflict with what NextJS considers special "API routes" and thus do not work for reflex pages.
rx.plotly
now accepts arbitrary config
prop
- Add config to rx.plotly component by @amirmolavi in #2745
Computed Backend-only Vars
- DRAFT PR - Added code for computed backend vars by @wassafshahzad in #2540
Connection Pulser While Websocket is Disconnected
Only show the "Connection Error" banner after a few failed reconnection attempts.
Reconnect Websocket in Stale Tabs
When a browser tab regains focus, automatically reconnect the websocket if it is disconnected.
- Reconnection Logic by @Yummy-Yums in #2743
Bug Fixes
- small update to color scheme high level select by @tgberkeley in #2712
- fix inherited backend var deps by @benedikt-bartscher in #2715
- Avoid frontend errors with getRefValue by @masenf in #2691
- Add missing header variable in el components in init.py file. by @cllatser in #2732
- [REF-2101] Support default_value and default_checked on rx.el.input by @masenf in #2739
- fix initial value for color_mode by @Lendemor in #2741
- fix drawer on_open_change event by @Lendemor in #2755
- call default_factorys on State.reset by @benedikt-bartscher in #2749
Other Changes
- benchmarks.yml: skip benchmarking if the DATABASE_URL is not set by @masenf in #2701
- do not store new_backend_vars in State class by @benedikt-bartscher in #2707
- fix type of value2 in test_state by @benedikt-bartscher in #2708
- pyproject.toml: bump to 0.4.2 by @masenf in #2724
- Update sidebar template README.md by @thedatadavis in #2735
- fix telemetry for init event by @Lendemor in #2736
- Only alert users of reflex upgrade once per project by @ElijahAhianyo in #2731
- fix black+ruff by @benedikt-bartscher in #2750
- add some backend var state inheritance tests by @benedikt-bartscher in #2685
- initial attempt at writing test for urls by @tgberkeley in #2689
New Contributors
- @thedatadavis made their first contribution in #2735
- @amirmolavi made their first contribution in #2745
Full Changelog: v0.4.2...v0.4.3
v0.4.2
New Features
Syncronize LocalStorage between tabs
Pass the new sync=True
argument to rx.LocalStorage
to enable changes on one tab to automatically update in other tabs.
Improvements
Tuple type annotations are now respected index-wise
- fixed bug in var type for iterable types by @wassafshahzad in #2617
Substates are serialized individually
This allows apps with large state to only serialize and deserialize the parts of the state needed to handle a given event.
Better Image Serialization
Improves mime type detection for more types of PIL Image objects.
- fix image serializing - REF-1889 by @mentally-gamez-soft in #2550
Other Improvements
- Progress component to support
color_scheme
on component level by @ElijahAhianyo in #2684 - ThemePanel is toggleable with bool in Theme by @Lendemor in #2675
Bug Fixes
- Fix SQLAlchemy list types by @benedikt-bartscher in #2668
- [REF-2045] Implement reduce_ex for MutableProxy by @masenf in #2688
- Fix for setting
rx.theme(appearance="dark")
(Note: dark mode does not work withrx.theme_panel
) rx.Upload
can now contain children components that use State.- Make
rx.Upload
a memoization leaf by @ElijahAhianyo in #2695
- Make
Accordion Issues
- Fix Browser Warnings
- Accordion Root Exclude
color_scheme
andvariant
props in tag by @ElijahAhianyo in #2664
- Accordion Root Exclude
- Fix accordion not working with
rx.foreach
- Accordion Items unique Value by @ElijahAhianyo in #2663
Other Changes
- Use classes for allowed components by @ElijahAhianyo in #2662
- Use sync redis client to determine prod mode worker number and add sanity check by @martinxu9 in #2679
- bump github action versions by @martinxu9 in #2680
- test_input: replace sleep with
_poll_for
by @masenf in #2677 - Debounce
input_ref
Truthiness check for vars by @ElijahAhianyo in #2692 - use direction props from radix.Flex by @Lendemor in #2696
- Bump axios version to 1.6.0 by @timmypidashev in #2699
New Contributors
- @mentally-gamez-soft made their first contribution in #2550
v0.4.1
Fix Windows Hot-reload
- Downgrade uvicorn version by @ElijahAhianyo in #2669
Improvements
Avoid Browser Error When Uploading
Bug Fixes
New Contributors
Full Changelog: v0.4.0...v0.4.1
v0.4.0
See our blog post for more details on this release: https://reflex.dev/blog/2024-02-16-reflex-v0.4.0
Known Issues
Hot reload on windows does not seem to work (Under investigation)
Breaking Changes
Top-level Namespace is now Radix Components
See the latest Reflex documentation for complete information about the new components API.
Run reflex script keep-chakra
to retain compatibility with 0.3.x apps.
This script will automatically update your app code to reference previous top-level namespace via rx.chakra.<x>
Some components are no longer available in the core library and must now be accessed via rx.chakra
such as:
circular_progress
stat
andstat_group
list
(Userx.unordered_list(list_style_type="none")
instead)pin_input
circle
button_group
Component Prop Changes
rx.progress
no longer supportsis_indeterminate
rx.slider
:value
is expected to be a list of numbers, one for each slider thumb.on_change
will be called with a list of numbers, one for each slider thumb.rx.vstack
andrx.hstack
no longer center content by default.rx.icon
uses Lucide tags (rx.chakra.icon
for the previous tags)spacing
andsize
props accept radix scale, generally string integers, from "0" to "9".- To apply CSS units, use CSS props like
gap
,height
,width
,padding
, etc.
- To apply CSS units, use CSS props like
type_
,max_
, andmin_
props should be specified without the trailing underscore.
Radix Themes
Apply themes to the root rx.App
component via the theme=rx.theme(...)
prop. This will apply the theme to all radix components.
New Features
Upload Workflow Refactor
- Set upload dir via environment variable
REFLEX_UPLOADED_FILES_DIR
, which defaults to./uploaded_files
. - Use
rx.get_upload_dir()
to access the upload directory from the backend. - Use
rx.get_upload_url(filename)
to get a link to the uploaded file in the frontend.
rx.download
now accepts str
or bytes
for data
argument
Allow users to download data directly from the backend without writing to an intermediate file.
All Changes
- Clean up Radix Form component by @martinxu9 in #2423
- auto enable /_upload endpoint only if Upload component is used by @benedikt-bartscher in #2430
- extend state inheritance tests with non-computed vars by @benedikt-bartscher in #2425
- parse return type annotations of sqlalchemy hybrid properties by @benedikt-bartscher in #2422
- Input high level api by @picklelo in #2410
- radix link renders as next link by default use by @martinxu9 in #2440
- test_telemetry fails for Python Version 3.11.0rc1 by @Yummy-Yums in #2431
- Docstrings for radix components by @masenf in #2407
- [REF-1692] re-enable partial reflex web windows by @masenf in #2436
- Vardata for rx.Match by @ElijahAhianyo in #2439
- fix SmartDisplay visible parameter by @benedikt-bartscher in #2451
- Individually Import Chakra Packages by @Alek99 in #2405
- small changes to texfield and separator by @tgberkeley in #2448
- use multiprocessing to speed up pyi generation by @benedikt-bartscher in #2453
- Chakra IconButton comes from "@chakra-ui/[email protected]" package by @masenf in #2465
- Accordion style merge issue fix by @ElijahAhianyo in #2446
- fixed issue with hypens by @wassafshahzad in #2450
- pyi generator git diff by @benedikt-bartscher in #2460
- [REF-1746] Define
value
prop on base rx.el.textarea by @masenf in #2467 - minor update to callout by @tgberkeley in #2466
- [WIP] rx.color by @Alek99 in #2443
- Revert "Individually Import Chakra Packages (#2405)" by @picklelo in #2472
- add separator default width to fill the container by @tgberkeley in #2459
- Remove modal prop from Dialog by @martinxu9 in #2470
- [REF-1763] Rename
color
tocolor_scheme
in all radix themes components by @masenf in #2468 - Set correct type when indexing into Var[str] by @picklelo in #2469
- add lucide icons as a candidate for core icon library by @Lendemor in #2444
- Pass down themes for
rx.cond
andrx.match
by @ElijahAhianyo in #2432 - Use form_root as form high level API by @martinxu9 in #2479
- Update meta parameter to accept a list of any type by @kumaraguru1735 in #2477
- [REF-1632] Apply
rx.App
styles to Radix Themes rootdiv
by @masenf in #2481 - Radix primitive based Drawer component by @martinxu9 in #2445
- Add git precommit hook that generates pyi files by @martinxu9 in #2447
- Tabs validate parent is proper tab container by @tankztz in #2463
- [REF-1815] Radix themes: replace
color_scheme
withcolor
in get_fields by @masenf in #2486 - fix kebab case for lucide icon by @Lendemor in #2487
- fix color of icon to match theme by @Lendemor in #2488
- Fix pyi_generator relative path determination by @masenf in #2485
- add center / spacer / hstack / vstack in radix/themes/layout by @Lendemor in #2331
- simple pytest benchmark for measuring event <=> state update round trip time by @jackie-pc in #2489
- improve sqlalchemy type parsing by @benedikt-bartscher in #2474
- Fix accordion pyi by @picklelo in #2491
- [REF-1738] Remove radix-specific layout/margin props by @masenf in #2442
- [REF-1742] Radio group prop types fix by @ElijahAhianyo in #2452
- Added Environmental variable REFLEX_DIR by @wassafshahzad in #2457
- Minor fix on pyi generator to make it work in Windows by @tankztz in #2494
- Revert "Revert "use process pool to compile faster (#2377)" (#2434)" by @jackie-pc in #2497
- [0.4.0] Namespace the Drawer primitive subcomponents by @masenf in #2492
- Rework telemetry to support installation_id by @jackie-pc in #2480
- Support component create methods as keys in global styles by @picklelo in #2498
- Add props from Radix tooltip primitives to tooltip component by @martinxu9 in #2499
- [REF-1631] Clean up the rx.radix namespace by @masenf in #2501
- enable CI on reflex-0.4.0 branch by @masenf in #2502
- radix Theme panel_background prop: transparent -> translucent by @martinxu9 in #2504
- Update hosting CLI version in the poetry lock: 0.1.3 -> 0.1.7 by @martinxu9 in #2503
- All event handlers inherit from event triggers by @tgberkeley in #2507
- Move
is_used
to Upload component rather than UploadFilesProvider by @masenf in #2514 - fix appharness regex for functions with return type by @benedikt-bartscher in #2512
- Add comment for theme panel needed for docs by @Alek99 in #2508
- [REF-1839] Reserve top-level call for a future high level API by @masenf in #2518
- fix icon_button to size children lucide icon correctly. by @Lendemor in #2515
- Move core components to radix namespace by @picklelo in #2506
- Refactor rx.color by @Alek99 in #2522
- Add dropdown props inherited from their primitive counterparts by @martinxu9 in #2521
- Top-level namespace tweaks by @masenf in #2523
- inline memoize components in compiled page files, to prevent hot reload errors by @jackie-pc in #2527
- bump to 0.3.10 by @masenf in #2530
- Radix Components Valid children/parents by @ElijahAhianyo in #2495
- Remove focus-visible package by @picklelo in #2535
...
v0.3.10
New Features
Lucide Icons (rx.lucide.icon
)
View all iconds available via rx.lucide.icon
at https://lucide.dev/icons/.
In 0.4.0, these icons will become the default icon set exposed at rx.icon
.
- add lucide icons as a candidate for core icon library by @Lendemor in #2444
- fix kebab case for lucide icon by @Lendemor in #2487
- fix color of icon to match theme by @Lendemor in #2488
- fix icon_button to size children lucide icon correctly. by @Lendemor in #2515
Customize Reflex Directory location
Set REFLEX_DIR
environment variable to control where reflex will download and install supporting
tools like bun
, fnm
, and node
.
- Added Environmental variable REFLEX_DIR by @wassafshahzad in #2457
Improvements
Only expose /_upload
when using Upload component
- auto enable /_upload endpoint only if Upload component is used by @benedikt-bartscher in #2430
- Move
is_used
to Upload component rather than UploadFilesProvider by @masenf in #2514
Better SQLAlchemy Interoperability
- parse return type annotations of sqlalchemy hybrid properties by @benedikt-bartscher in #2422
- improve sqlalchemy type parsing by @benedikt-bartscher in #2474
Faster .pyi Generation (internal)
- use multiprocessing to speed up pyi generation by @benedikt-bartscher in #2453
- pyi generator git diff by @benedikt-bartscher in #2460
- Add git precommit hook that generates pyi files by @martinxu9 in #2447
- Fix pyi_generator relative path determination by @masenf in #2485
- Minor fix on pyi generator to make it work in Windows by @tankztz in #2494
Fast Compilation
Use multiprocessing
to compile CPU-bound pages faster.
- use process pool to compile faster by @jackie-pc in #2497
Bug Fixes
- Vardata for rx.Match by @ElijahAhianyo in #2439
- fix SmartDisplay visible parameter by @benedikt-bartscher in #2451
- fixed issue with hypens by @wassafshahzad in #2450
- Set correct type when indexing into Var[str] by @picklelo in #2469
- Update meta parameter to accept a list of any type by @kumaraguru1735 in #2477
Radix
The team is currently stabilizing the new radix-ui integration in preparation for our forthcoming 0.4.0
release.
- Clean up Radix Form component by @martinxu9 in #2423
- Input high level api by @picklelo in #2410
- radix link renders as next link by default use by @martinxu9 in #2440
- Docstrings for radix components by @masenf in #2407
- Chakra IconButton comes from "@chakra-ui/[email protected]" package by @masenf in #2465
- small changes to texfield and separator by @tgberkeley in #2448
- Accordion style merge issue fix by @ElijahAhianyo in #2446
- [REF-1746] Define
value
prop on base rx.el.textarea by @masenf in #2467 - minor update to callout by @tgberkeley in #2466
- add separator default width to fill the container by @tgberkeley in #2459
- Remove modal prop from Dialog by @martinxu9 in #2470
- [REF-1763] Rename
color
tocolor_scheme
in all radix themes components by @masenf in #2468 - Pass down themes for
rx.cond
andrx.match
by @ElijahAhianyo in #2432 - Use form_root as form high level API by @martinxu9 in #2479
- [REF-1632] Apply
rx.App
styles to Radix Themes rootdiv
by @masenf in #2481 - Radix primitive based Drawer component by @martinxu9 in #2445
- [REF-1815] Radix themes: replace
color_scheme
withcolor
in get_fields by @masenf in #2486 - [WIP] rx.color by @Alek99 in #2443
- add center / spacer / hstack / vstack in radix/themes/layout by @Lendemor in #2331
- Fix accordion pyi by @picklelo in #2491
- [REF-1738] Remove radix-specific layout/margin props by @masenf in #2442
- [REF-1742] Radio group prop types fix by @ElijahAhianyo in #2452
- Support component create methods as keys in global styles by @picklelo in #2498
- Add props from Radix tooltip primitives to tooltip component by @martinxu9 in #2499
- radix Theme panel_background prop: transparent -> translucent by @martinxu9 in #2504
- All event handlers inherit from event triggers by @tgberkeley in #2507
- Add comment for theme panel needed for docs by @Alek99 in #2508
- Refactor rx.color by @Alek99 in #2522
- Add dropdown props inherited from their primitive counterparts by @martinxu9 in #2521
Other Changes
- extend state inheritance tests with non-computed vars by @benedikt-bartscher in #2425
- test_telemetry fails for Python Version 3.11.0rc1 by @Yummy-Yums in #2431
- [REF-1692] re-enable partial reflex web windows by @masenf in #2436
- simple pytest benchmark for measuring event <=> state update round trip time by @jackie-pc in #2489
- Rework telemetry to support installation_id by @jackie-pc in #2480
- Update hosting CLI version in the poetry lock: 0.1.3 -> 0.1.7 by @martinxu9 in #2503
- fix appharness regex for functions with return type by @benedikt-bartscher in #2512
New Contributors
- @Yummy-Yums made their first contribution in #2431
- @kumaraguru1735 made their first contribution in #2477
- @tankztz made their first contribution in #2463
Full Changelog: v0.3.9...v0.3.10
v0.3.9
New Features
Mixin Classes can now be used to augment State subclasses
- inherit computed vars from state mixins by @benedikt-bartscher in #2351
Improvements
- Import radix as rx.radix by @picklelo in #2374
- Pin version for data editor deps by @ElijahAhianyo in #2383
- Skip frontend packages install if previously done by @jackie-pc in #2400
Bug fixes
- Resolve correct python path on windows by @ElijahAhianyo in #2373
- fix is_backend_variable for dunder prefixed variables by @benedikt-bartscher in #2391
- [REF-1705] Do not overwrite Var attributes during format by @masenf in #2421
Radix UI Preview
- update radix components by @tgberkeley in #2380
- Clean up Radix Avatar components props by @martinxu9 in #2375
- aspectratio: fix docstring and extra literal def by @masenf in #2379
- Fix docstrings and comments for Box and Card components by @masenf in #2385
- Correct Radix Themes Slider props by @masenf in #2386
- Inset: fix comment by @masenf in #2389
- Overlay Components Improvements by @Alek99 in #2395
- Accordion by @Alek99 in #2310
- Remove default radix theme by @picklelo in #2403
- high level api for checkbox by @tgberkeley in #2406
- create high level api for select component by @tgberkeley in #2402
- radiogroup high level api by @tgberkeley in #2401
- update to allow items to be autogenerated for docs by @tgberkeley in #2419
- Radix callout high level api by @picklelo in #2409
Other Changes
- Update comments in template apps by @masenf in #2370
- Get rid of compile in readme by @Alek99 in #2371
- integration tests: disable windows builds for reflex-web by @masenf in #2417
- Allow app harness tests to import State subclasses by @masenf in #2408
Full Changelog: v0.3.8...v0.3.9
v0.3.8
Deprecations
app.compile()
boilerplate is no longer required
- apps should no longer call "app.compile()" by @jackie-pc in #2291
- Remove
app.compile()
from templates by @masenf in #2327
New Features
rx.match
construct
rx.match
acts as a switch
statement, mapping multiple values to components or props.
rx.button(
State.mood,
background_color=rx.match(
State.mood,
("happy", "yellow"),
("sad", "blue"),
("angry", "red"),
("tickled", "pink"),
"", # last value provided is the default
)
)
- rx.match component by @ElijahAhianyo in #2318
Add rx.time_picker
component
- add time_picker component by @macmoritz in #2343
Improvements
- add size prop to the number input by @dodeca-6-tope in #2311
- Add darkMode for Tailwind config by @romain-bury in #2312
- Add reflex init app name validator, prevent import failure during reflex run by @Jishnu-Nandhiath in #2336
- Support Bare SQLAlchemy DeclarativeBase models access via State
- support parsing type args of DeclarativeBase subclasses by @benedikt-bartscher in #2348
Bug Fixes
- REF-1476/Create .web only after template selection by @ElijahAhianyo in #2288
- Chakra input component type_ prop literal by @ElijahAhianyo in #2292
- Bug fix: Export should only excludes assets folder if it's in the top level by @martinxu9 in #2308
- fix tailwind for stateful components imported from utils by @Lendemor in #2328
- Fix browser warning when rendering lists via
rx.markdown
- fix editable property of columns being ignored in data_editor by @Lendemor in #2338
- Allow tailwind to be completely disabled
- Handle VarData roundtrip when encoded value contains newline by @masenf in #2350
Radix UI Preview
- Add high-level API for accordion by @picklelo in #2285
- color_scheme props added and updated pyi files by @Lendemor in #2279
- Fixing bugs in radix by @tgberkeley in #2316
- Apply default theme to apps by @picklelo in #2320
- Lendemor/radix form primitive by @Lendemor in #2306
- adding cancel and action sub components for alert dialog and rename alert dialog root by @tgberkeley in #2352
Other
- Update outdated
docs/tr/README.md
with some fixes. by @hasansezertasan in #2303 #2341 - Refactor chakra components into separate folder by @picklelo in #2315
- Update README.md by @kalyani2003 in #2330
- update inline so all props have comments by @tgberkeley in #2353
- Enable real app AppHarness tests to not specify
state=
by @masenf in #2358
New Contributors
- @hasansezertasan made their first contribution in #2303
- @romain-bury made their first contribution in #2312
- @kalyani2003 made their first contribution in #2330
- @Jishnu-Nandhiath made their first contribution in #2336
- @macmoritz made their first contribution in #2343
Full Changelog: v0.3.7...v0.3.8