* feat: Adding an event to go back just as the user would.
* fix: Simplification suggested by masenf.
* fix: And now apply the fix to the right function.
* [REF-3067] Do not purge .web/pages in dev mode
Avoid race condition in hot reload that occurs when pages are removed before
they are recreated.
Fix#3416
* use constants instead of hardcoded string
* add immutable var class
* add missing docs
* override _replace
* fix type imports
* override create as well
* remove deprecated properties and arguments
* remove unused code in ImmutableVar
* fix namespace issue
* no Self in 3.8
Ensure that reflex.utils.compat is loaded whenever `reflex` itself is imported
to try and avoid the sqlmodel metaclass conflict error that arises when
sqlmodel is imported first with pydantic v2, but reflex Model inherits from
rx.Base which is based on pydantic v1.
Fix#3515
The formatting of the upload ID had extra single quotes that were not needed.
Now that `_var_name_unwrapped` is used, any `str`-like Vars will automatically
be formatted with backticks
* split lifespan and middleware logic in separate mixin files
* fix for 3.8
* fix for unit tests
* add missing sys import
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* pyi_generator: avoid fully qualified names for reflex. types
The previous method added quite a large line diff to the pyi files, so for now,
lets just add the `Breakpoints` import to the default set along with Var,
EventHandler, Style and others.
* pyi_generator: fix generated files using ruff
also generate updated pyi files in reflex/experimental namespace
* remove black from dev dependencies
* poetry.lock: relock deps
* Update all pyi files with new formatting
* pre-commit fixes
* pyi_generator: fix __init__.pyi files again
* implement basic behavior to handle both radix and css
* add all components in theme, AND change pyi to include path of reflex types
* order type annotations in pyi_generator (#3585)
* order type annotations in pyi_generator
* run pyi_generator
* classvars should not be backend vars (#3578)
* classvars should not be backend vars
* cleanup RESERVED_BACKEND_VAR_NAMES
* order type annotations in pyi_generator (#3585)
* order type annotations in pyi_generator
* run pyi_generator
* do not validate non-cached var deps (#3576)
* do not validate non-cached var deps
* further improve Exceptions for misconfigured var deps
* order type annotations in pyi_generator (#3585)
* order type annotations in pyi_generator
* run pyi_generator
* fix git merge remains
* define function globally
* use more modern annotations
* only trigger when direct value and not state
* simplify unions
* accidentally removed avatar oop
---------
Co-authored-by: benedikt-bartscher <31854409+benedikt-bartscher@users.noreply.github.com>
* add computed backend vars
* finish computed backend vars, add tests
* fix token for AppHarness with redis state manager
* fix timing issues
* add unit tests for computed backend vars
* automagically mark cvs with _ prefix as backend var
* fully migrate backend computed vars
* rename is_backend_variable to is_backend_base_variable
* add integration test for implicit backend cv, adjust comments
* replace expensive backend var check at runtime
* keep stuff together
* simplify backend var check method, consistent naming, improve test typing
* fix: do not convert properties to cvs
* add test for property
* fix cached_properties with _ prefix in state cls
* Clear color mode local storage
* use the last compiled time logic to determine when to clear local storage
* precommit fix
* app harness fix
* run prettier on reflex/.templates/web/utils/helpers/color_mode.js
* make sure last_compiled_time is updated for stateless apps as well.
* set the chkara-ui-color-mode cookie instead of clearing it, so it is integrated in the app's useEffect cycle
* fix CI
* fix import formatting
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* Automatic authentication for backend on Github Codespaces
When running reflex on Github codespaces, the port forwarding mechanism
requires authentication, which happens automatically when first accessing the
port via HTTPS; however since the backend connects over the WSS protocol
instead, it gets an access error with no way to redirect to Github's
authentication servers to get the port open.
This PR adds an automatic redirection mechanism to a backend route when there
is a connection error accessing the frontend. After the backend route loads, it
redirects back to the frontend, but now it can connect to the backend via
websocket because the port forward is authenticated.
* manually update .pyi file 🫨
* Dont escape backticks in JS string interpolation
* add unit tests
* Fix darglint
* add a note to re-visit after new Var API is implemented
* tests should have a good meaning
* add bare sqlalchemy session, Closes#3512
* expose sqla_session at module level, add tests, improve typing
* fix table name
* add model_registry fixture, improve typing
* did not meant to push this
* add docstring to model_registry
* do not expose sqla_session in reflex namespace