* add more tests
* add tests to raise coverage
* more tests, bump coverage to 73
* fix up icon_button test
* fix darglint for app.py
* fix utcnow usage warning
* set threshold to 72
* fix timestamp
* fix unit tests for linux-redis
* removed commented code and put a TODO
* adjust share command prompt
* use lower case "y" for console.ask, keep order consistent as "y" then "n"
* share command update: do not suggest demo URL is mandatory, also move to the last question; when checking if user has permission to upsert package, do POST to record this package (if first time sharing)
* clean up prompt for preview image
* build pyi files when building/publishing 3rd party
* fix typo in workflow
* add future annotation
* add tests to pass coverage check
* add more unit tests
* omit pyi_generator from test coverage
* change black from dev deps to direct deps
* remake all pyi
* format pyi if black is present, return as if otherwise
* fix requested changes
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* Add test_get_state_from_sibling_not_cached
A better unit test to catch issues with refetching parent states
and calculating the wrong parent state names to fetch.
* _determine_missing_parent_states: correctly generate state names
Prepend only the previous state name to the current relative_parent_state_name
instead of joining all of the previous state names together.
* [REF-2219] Avoid refetching states that are already cached
The already cached states may have unsaved changes which can be wiped out if
they are refetched from redis in the middle of handling an event.
If the root state already knows about one of the potentially missing states,
then use the instance that is already cached.
Fix#2851
* Connection pulser only depends on has_connection_errors
Avoid showing the WiFi error icon when the state is hydrating / navigating
because not being hydrated is not indicative of a connection error in itself.
* Set is_hydrated=False at route onChangeStart
When navigation event starts, set is_hydrated=False on the client side before
any on_load event is dispatched. This avoids a flickering problem where the
client browser navigates and briefly shows content on the page before
processing on_load events associated with the page.
Fix#2885
* Update pyi
* Remove upper bounds of most dependencies.
Also adds a import try except block for pydantic.v1 and relocks.
Keep black and ruff to not mess to much with current formatting
Make pyright see the right import as long as constraint still lock pydantiv v1
Down pin pytest-asyncio again due to known issue
Fix upload handler with latest versions of fastapi
Change comment
* Add changed lockfile
* Set max versions for deps
* Revert app.pyi
---------
Co-authored-by: Malte Klemm <malte.klemm@blueyonder.com>
Co-authored-by: Nikhil Rao <nikhil@reflex.dev>
* [REF-2265] ComponentState: scaffold for copying State per Component instance
Define a base ComponentState which can be used to easily create copies of the
given State definition (Vars and EventHandlers) that are tied to a particular
instance of a Component (returned by get_component)
* Define `State` field on `Component` for typing compatibility.
This is an Optional field of Type[State] and is populated by ComponentState.
* Add integration/test_component_state.py
Create two independent counters and increment them separately
* Add unit test for ComponentState