* adjust setter to include type annotation
* apparently this discovered some bugs
* remove some pyright ignores
* add str to int/float conversion
* dang it darglint
* add a config variable to add extra overlay components
* add integration test
* Apply suggestions from code review
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* remove base_state from event types
* pyi that guy
* unpack is new
* woops
* use type alias type to remove ambiguity of where types go
* use same thing with LAMBDA_OR_STATE
* do it for event type
* WiP
* Save the var from get_var_name
* flatten StateManagerRedis.get_state algorithm
simplify fetching of states and avoid repeatedly fetching the same state
* Get all the states in a single redis round-trip
* update docstrings in StateManagerRedis
* Move computed var dep tracking to separate module
* Fix pre-commit issues
* ComputedVar.add_dependency: explicitly dependency declaration
Allow var dependencies to be added at runtime, for example, when defining a
ComponentState that depends on vars that cannot be known statically.
Fix more pyright issues.
* Fix/ignore more pyright issues from recent merge
* handle cleaning out _potentially_dirty_states on reload
* ignore accessed attributes missing on state class
these might be added dynamically later in which case we recompute the
dependency tracking dicts... if not, they'll blow up anyway at runtime.
* fix playwright tests, which insist on running an asyncio loop
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* add backend disabled dialog
* pyi that guy
* pyi the other guy
* extend test_connection_banner to also test the cloud banner
* oops, need asyncio _inside_ the app
* Update reflex/components/core/banner.py
Co-authored-by: Masen Furer <m_github@0x26.net>
* use universal cookies
* fix pre-commit
* revert universal cookie 🍪
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
* Handle python `range` passed to rx.Var.create
Fix the range function to use Math.ceil to handle jagged steps.
Update test cases.
* Set ToVarOperation.__qualname__ for better repr
* rename private fields with leading underscore in App
* fix constants API
* fix public API for some attributes of App()
* fix conflicts properly 🙈
* remove extra private
---------
Co-authored-by: Masen Furer <m_github@0x26.net>
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* Fix setting default color mode in dev mode
Without this, the last_compiled_timestamp local storage never gets set because
it's always `null` until it gets set.
* test_client_storage: also pop `theme` key from next-themes
* remove deprecated features and support for py3.9
* remove other deprecated stuff
* update lock file
* fix units tests
* relock poetry
* fix _replace for computed_var
* fix some merge typo
* fix typing of deploy args
* fix benchmarks.yml versions
* console.error instead of raising Exception
* fix tests
* ignore lambdas when resolving annotations
* simplify redirect logic in event.py
* more fixes
* fix unit tests again
* give back default annotations for lambdas
* fix signature check for on_submit
* remove useless stuff
* update pyi
* readd the getattr
* raise if log_level is wrong type
* silly goose, loglevel is a subclass of str
* i don't believe this code
* add guard
---------
Co-authored-by: Khaleel Al-Adhami <khaleel.aladhami@gmail.com>
* unbreak link _hover
* add a test to catch the error
* change tmp path for harness
* add () to fixture
* add spacer to avoid initial hover
* only install chromium browser for faster ci
---------
Co-authored-by: Lendemor <thomas.brandeho@gmail.com>
* [ENG-2157] [Refix] Allow `rx.download` to resolve `rx.get_upload_url`
Update the special case in a way that works with the new Var system and its
unstoppable determination to concatenate strings instead of using template
string
This has been broken since 0.6.0, so a regression test was added to avoid
future inadvertant breakage.
Fix#2812 (again)
* use safer indirect eval
* Proxy backend requests on '/' to the frontend
If the optional extra `proxy` is installed, then the backend can handle all
requests by proxy unrecognized routes to the frontend nextjs server.
* Update lock file
* pre-commit fu
* AppHarness: set config frontend_port and backend_port
* integration: frontend port and backend port should return the same content
with proxying enabled by default in dev mode, both frontend and backend ports
on / should return the same content.
* Retry up to 100 times when proxying to frontend
* Reduce retry attempts to 25
Fix log level passing to subprocess
* scripts/wait_for_listening_port: primarily check HTTP responses
if the port is up or not, we don't really care... the HTTP request needs to
work and not return errors
* aiohttp is an optional dep
* adapt integration.sh for --backend-only (counter integration test)
* woops
* windows WTF?
* scratching my head 🎄
* double WTF windows
* Fix remaining integration tests
* add datetime var operations
* add future annotations
* add LiteralDatetimeVar
* remove methods that don't apply
* fix serialization
* add unit and integrations test
* oops, forgot to commit that important change
* add eradicate rules for commented out code
* remove output change
* fix pyi messed up indent
* fix pyi again
* fix layout docstring
* fix pyi_generator to remove commented out props from docs
* fix pyi_generator and regenerate some pyi
* fix double strip
* update all pyi
* try to fix stuff in pyi_gen
* whatever
* remove that maybe? i don't know
* fix that shit?
* fix more shit, idk
* better not see you ever again, extra line
* add test for color mode (initial and toggle)
* add css check
* add page reload in the tests
* update test to catch the appearance regression
* don't render the appearance prop of rx.theme
* rx.upload must include _var_data from props
str-casting the dropzone arguments removed any VarData they depended on, like
the state context.
update test_upload to include passing a prop from a state var
* Handle large payload delta from upload event handler
Fix update chunk chaining logic; try/catch wasn't catching errors from the
async inner function.
* Unit test updates
* test_client_storage: simulate backend state expiry
* [HOS-333] Send a "reload" message to the frontend after state expiry
1. a state instance expires on the backing store
2. frontend attempts to process an event against the expired token and gets a
fresh instance of the state without router_data set
3. backend sends a "reload" message on the websocket containing the event and
immediately stops processing
4. in response to the "reload" message, frontend sends
[hydrate, update client storage, on_load, <previous_event>]
This allows the frontend and backend to re-syncronize on the state of the app
before continuing to process regular events.
If the event in (2) is a special hydrate event, then it is processed normally
by the middleware and the "reload" logic is skipped since this indicates an
initial load or a browser refresh.
* unit tests working with redis
* fix and test bug in config env loading
* streamline env var interpretation with @adhami3310
* improve error messages, fix invalid value for TELEMETRY_ENABLED
* just a small hint
* ruffing
* fix typo from review
* refactor - ruff broke the imports..
* cleanup imports
* more
* add internal and enum env var support
* ruff cleanup
* more global imports
* revert telemetry, it lives in rx.Config
* minor fixes/cleanup
* i missed some refs
* fix darglint
* reload config is internal
* fix EnvVar name
* add test for EnvVar + minor typing improvement
* bool tests
* was this broken?
* retain old behavior
* migrate APP_HARNESS_HEADLESS to new env var system
* migrate more APP_HARNESS env vars to new config system
* migrate SCREENSHOT_DIR to new env var system
* refactor EnvVar.get to be a method
* readd deleted functions and deprecate them
* improve EnvVar api, cleanup RELOAD_CONFIG question
* move is_prod_mode back to where it was
* component as literal vars
* fix pyi
* use render
* fix pyi
* only render once
* add type ignore
* fix upload default value
* remove testcases if you don't pass them
* improve behavior
* fix render
* that's not how icon buttons work
* upgrade to next js 15 and remove babel and enable turbo
* upload is a silly guy
* woops
* how did this work before
* set env variable
* lower it even more
* lower it even more
* lower it even more
* only do literals as component vars
* test for stateless apps
* add playwright to dev dependencies
* fix docstring
* fix install of playwright in CI
* fix install again
* add allowed license
* add retry on running integrations step
* another attempt to fix licensing issue
* update timeout duration for retry
* fix timeout workflows
* remove dep changes
* remove outdated diff
* fix scope in new test and workflow for appharness
* run playwright tests last