* fix inherited backend var deps
* fixing the real issue with @masenf
* Revert "fix inherited backend var deps"
This reverts commit 894e3e14ac.
* python 3.8
* 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
* 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
* 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.
* 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>
* 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
* 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>
* 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()
* 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
* 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.
* 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
* 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