Commit Graph

1184 Commits

Author SHA1 Message Date
Lendemor
dbd074c33d add docs from reflex-web 2024-02-26 17:18:28 +01:00
Lendemor
334db18bfa move readme trads to free docs folder 2024-02-26 17:14:24 +01:00
wassaf shahzad
4d3d9aa717
added accent option in color (#2713) 2024-02-25 19:47:56 -08:00
benedikt-bartscher
24541aa91c
fix inherited backend var deps (#2715)
* fix inherited backend var deps

* fixing the real issue with @masenf

* Revert "fix inherited backend var deps"

This reverts commit 894e3e14ac.

* python 3.8
2024-02-24 14:05:49 -08:00
Tom Gotsman
d0e62b5020
small update to color scheme high level select (#2712)
Co-authored-by: Tom Gotsman <tomgotsman@Toms-MacBook-Pro.local>
2024-02-24 14:05:36 -08:00
benedikt-bartscher
95287e7a98
fix type of value2 (#2708) 2024-02-24 13:56:48 -08:00
benedikt-bartscher
cace611aec
do not store new_backend_vars in State class (#2707) 2024-02-24 13:56:22 -08:00
benedikt-bartscher
93f402c773
Initial values for computed vars (#2670)
* initial values for computed vars draft

* add tests, add computed_var overloads

* fix darglint

* pass initial to substates when calling dict

* add tests for for child states

* format black

* allow None as initial value

* rename runtime_only to raises_at_runtime

* cleanup unused arguments of ComputedVars

* refactor cached_var to be partial of computed_var
2024-02-24 13:45:07 -08:00
Masen Furer
82e3be76cf
benchmarks.yml: skip benchmarking if the DATABASE_URL is not set (#2701)
* benchmarks.yml: skip benchmarking if the DATABASE_URL is not set

* try to expand the value

* workaround secrets not available in the `if:` condition

* only skip database / pytest step if missing creds
2024-02-23 11:23:28 -08:00
Timothy Pidashev
d698e4dcd7
Bump axios version to 1.6.0 (#2699) 2024-02-22 14:45:47 -08:00
Thomas Brandého
05044ed912
use direction props from radix.Flex (#2696)
* use direction props from radix.Flex

* override direction props

* test no var

* confirm no var

* add comment for reflex-web
2024-02-22 13:33:10 -08:00
Elijah Ahianyo
b849c8d9d8
Debounce input_ref Truthiness check for vars (#2692)
* Debounce `input_ref` Truthiness check for vars

* fix integration test
2024-02-22 11:21:15 -08:00
Masen Furer
421bfa034a
Apply app theme color_mode/appearance as next-themes default (#2654)
* Apply app theme color_mode/appearance as next-themes default

* compiler: blacken
2024-02-22 10:14:38 -08:00
Masen Furer
953495775d
[REF-2045] Implement __reduce_ex__ for MutableProxy (#2688)
* test_state: augment modify_state test for writing MutableProxy

If the object contains a MutableProxy inside of it, then we get a pickling
error.

* Implement __reduce_ex__ for MutableProxy

Pass through `__reduce_ex__` onto the wrapped instance to strip it off when
cloudpickling to redis.

* base: get_value actually works with a str key

Unless the key isn't a field on the model, then it falls back to the previous
behavior of just returning the given key as is... why does it do this? I don't
know.
2024-02-22 10:14:14 -08:00
Elijah Ahianyo
f4666c4c96
Make rx.Upload a memoization leaf (#2695) 2024-02-22 08:15:47 -08:00
Krys
278183b526
fix image serializing - REF-1889 (#2550)
* fix image serializing

* If get_format_mimetype does not work, look up format in Image.MIME

Throw a warning if the image format does not have an associated MIME type and
ultimately fallback to image/png and let the browser figure it out.

* test_media: end to end serialization of PIL images

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-02-22 08:13:19 -08:00
Masen Furer
789d50e0e4
test_input: replace sleep with _poll_for (#2677)
Reduce test flakiness and improve runtime in optimal case
2024-02-21 20:12:31 -08:00
Martin Xu
24ccb2a2aa
bump github action versions (#2680)
* bump gh action versions

* left out files
2024-02-21 15:01:59 -08:00
Elijah Ahianyo
a6fb25e139
Progress component to support color_scheme on component level (#2684)
* Progress component to support `color_scheme` on component level

* pyi fix
2024-02-21 14:38:27 -08:00
Martin Xu
a3be76fb75
use sync redis client to sanity check (#2679) 2024-02-21 07:01:44 -08:00
Masen Furer
4601cca997
Revert "Added descriptor for backend vars (#2618)" (#2682)
This reverts commit f9d219407f.
2024-02-21 05:41:27 -08:00
Masen Furer
756bf9b0f4
[REF-1885] Shard Substates when serializing to Redis (#2574)
* Move sharding internal to StateManager

Avoid leaking sharding implementation details all over the State class and
breaking the API

* WiP StateManager based sharding

* Copy the state __dict__ when serializing to avoid breaking the instance

* State tests need to pass the correct substate token for redis

* state: when getting parent_state, set top_level=False

ensure that we don't end up with a broken tree

* test_app: get tests passing with redis by passing the correct token

refactor upload tests to suck less

* test_client_storage: look up substate key

* state.py: pass static checks

* test_dynamic_routes: working with redis state shard

* Update the remaining AppHarness tests to pass {token}_{state.get_full_name()}

* test_app: pass all tokens with state suffix

* StateManagerRedis: clean up commentary
2024-02-21 01:50:25 -08:00
wassaf shahzad
f9d219407f
Added descriptor for backend vars (#2618)
* Added descriptor for backend vars

* Fixed darglint issue
2024-02-20 15:51:48 -08:00
Thomas Brandého
9d051d383e
ThemePanel is toggleable with bool in Theme (#2675)
* ThemePanel is toggleable with bool in Theme

* change prop name to theme_panel
2024-02-20 15:51:24 -08:00
abulvenz
980834605b
feat: Synchronizing localStorage between tabs using browser events (#2533)
* feat: Synchronizing localStorage between tabs using browser events

* test_client_storage: Test sync'd local storage vars

* update_vars_internal: generic handler to apply var changes to state tree

Apply fully qualified var names to each substate they are associated with. This
allows consistent updates to arbitrary state vars without having to know their
"setter" arguments, in case the user has overwritted the `set_x` name.

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-02-20 15:14:55 -08:00
benedikt-bartscher
6c49b96d9d
Fix SQLAlchemy list types (#2668)
* fix sqlalchemy relationship list type hints

* py3.8 and py3.9 compatibility

Co-authored-by: Masen Furer <m_github@0x26.net>

* add missing import

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-02-20 15:14:33 -08:00
wassaf shahzad
0b771db10a
fixed bug in var type for iterable types (#2617)
* fixed bug in var type for iterable types

* added test cases

* formatting issue

* fixed black formatting  issues
2024-02-20 15:02:20 -08:00
Elijah Ahianyo
37f66207fc
Use classes for allowed components (#2662) 2024-02-20 14:40:48 -08:00
Elijah Ahianyo
ec31f00185
Accordion Items unique Value (#2663)
* Accordion Items unique Value

use crypto.randomUUID to generate accordion item value at runtime instead of compile time

* use generateUUID in state.js instead of crypto.randomUUID()
2024-02-20 11:50:50 -08:00
Elijah Ahianyo
eeff4142ab
Accordion Root Exclude color_scheme and variant props in tag (#2664)
* Accordion Root Exclude `color_scheme` and `variant` props in tag

* colorScheme -> color for radix primitives

* remove _rename_props based on pr comments

* lint

* pyi fix

* pop instead of del
2024-02-20 09:57:01 -08:00
Nikhil Rao
6384c62e51
Bump to 0.4.1 (#2672) 2024-02-19 18:37:43 -08:00
Masen Furer
279e9bfa28
[REF-1993] link: respect is_external prop and other attributes on A tag (#2651)
* link: respect `is_external` prop and other attributes on A tag

Instead of passing all props to NextLink by default, only pass props that
NextLink understands, placing the remaining props on the Radix link

Add a test case to avoid regression of `is_external` behavior.

* Link is a MemoizationLeaf

Because Link is often rendered with NextLink as_child, and NextLink breaks if
the href is stateful outside of a Link, ensure that any stateful child of Link
gets memoized together.
2024-02-19 15:43:27 -08:00
Elijah Ahianyo
99a566f43e
Downgrade uvicorn version (#2669)
This should fix the hot reload issue on windows
2024-02-19 15:08:28 -08:00
abulvenz
052f82cd06
fix: File upload error after using rx.clear_selected_files (#2666) 2024-02-19 10:42:11 -08:00
Nikhil Rao
899e35edba
Deprecate get_asset_path (#2644) 2024-02-16 11:53:51 -08:00
Masen Furer
192bddb5d4
workflows: remove references to now-defunct reflex-0.4.0 branch (#2643) 2024-02-16 11:32:24 -08:00
Nikhil Rao
4ad238c42c
Update deprecation version to 0.5.0 (#2642) 2024-02-16 11:23:15 -08:00
Masen Furer
1683444d00
Merge pull request #2641 from reflex-dev/reflex-0.4.0
Reflex 0.4.0 🚀
2024-02-16 11:20:34 -08:00
Masen Furer
58f200231d
Bump package version to 0.4.0 2024-02-16 09:42:07 -08:00
Elijah Ahianyo
3f24b42260
Drawer component styles should only be in css dict (#2640) 2024-02-16 09:41:02 -08:00
Masen Furer
10984ef869
Quick fixes for regressions in 0.4.0 (#2639)
* rx.el.img accepts Any type for src prop

This retains compatibility with the previous chakra image src prop.

* Re-add `moment` back to top-level namespace
2024-02-15 22:48:52 -08:00
Masen Furer
1698e3e5e3
Fix more information link to v0.4.0 blog post (#2638) 2024-02-15 20:51:06 -08:00
Masen Furer
3350fa0388
Component: translate underscore suffix for props supported by chakra (#2636)
* Component: translate underscore suffix for props supported by chakra

type_ becomes type
min_ becomes min
max_ becomes max
id_ becomes id

The deprecation warning is only displayed when the underscore suffix prop is
passed and the non-underscore suffix prop is defined on the given component.

* Rename type_ to type in accordion and scroll_area

All of the new radix components avoid the underscore suffix names where
possible.

* Update deprecation warning wording

* Refactor for readability

* Do not raise deprecation warning for `id_`

id is kind of a special prop because it exists on all components

* Add test case for deprecating underscore suffix props
2024-02-15 20:46:06 -08:00
Nikhil Rao
0beec0b2a6
Default high level radio to horizontal (#2637) 2024-02-15 20:34:52 -08:00
Alek Petuskey
f46be1d9b8
Update new readme to match radix api (#2631) 2024-02-15 19:58:34 -08:00
Masen Furer
b03fa5709f
rx.theme: Recognize color_mode in addition to appearance (#2635) 2024-02-15 18:15:44 -08:00
Nikhil Rao
7240f8ee6f
Handle component namespaces in global styles (#2630) 2024-02-15 16:03:10 -08:00
Thomas Brandého
0cb66fb561
set default align stack (#2626) 2024-02-15 13:57:27 -08:00
Thomas Brandého
411a3a1f13
accordion default classname (#2628) 2024-02-15 13:57:12 -08:00
Nikhil Rao
6ded702d03
Simplify app template (#2627) 2024-02-15 12:51:52 -08:00