reflex/tests/components
Elijah Ahianyo 69e4bbc301
[REF-2830] server side events and stateless components should not require not require a backend (#3475)
* `rx.color_mode.icon`, `rx.color_mode.button` and `rx.color_mode.switch` should not require a backend`

* remove print statement

* unit tests and precommit fix

* add unit tests

* change logic to check if event handlers actually contain state. Also delay websocket object check in state.js so server side events can get executed for stateless apps

* make sure events are not queued for server side events particularly ones that call queueEvents(clear_local_storage, clear_cookies, remove_local_storage, remove_cookies) when the app is stateless(no ws)

* fix unit tests

* fix broken unit tests in test_app

* modify socket check in processEvent to only return if socket exists and theres any event in the queue that requires state

* Apply suggestions from code review

make queueEvent call async

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

* await queueEventIfSocketExists

* Revert "await queueEventIfSocketExists"

This reverts commit 9ef8070b87.

---------

Co-authored-by: Masen Furer <m_github@0x26.net>
2024-06-14 09:48:53 -07:00
..
base generate pyi files when building/publishing 3rd party component (#2945) 2024-03-29 09:54:21 -07:00
core Make better/less use of dict.keys() calls (#3455) 2024-06-07 14:28:44 -07:00
datadisplay Make better/less use of dict.keys() calls (#3455) 2024-06-07 14:28:44 -07:00
el Lendemor/improve coverage (#2988) 2024-04-04 14:31:43 +02:00
forms [REF-3016] Allow special characters in upload ID (#3449) 2024-06-12 09:21:21 -07:00
graphing Layout property not pushed through on rx.plotly (#3394) 2024-05-31 11:48:43 -07:00
layout generate pyi files when building/publishing 3rd party component (#2945) 2024-03-29 09:54:21 -07:00
lucide add_style api (#3202) 2024-05-06 16:59:11 -07:00
media Use rx.el.img as rx.image (#2558) 2024-02-08 14:44:53 -08:00
radix add_style api (#3202) 2024-05-06 16:59:11 -07:00
typography Remove deprecations for 0.5.0 (#3222) 2024-05-07 08:55:42 -07:00
__init__.py Add basic unit tests (#7) 2022-11-20 14:34:25 -08:00
test_component_future_annotations.py [REF-2272] Support declaring EventHandlers directly in component (#2952) 2024-03-29 06:26:07 -07:00
test_component_state.py [REF-2265] ComponentState: scaffold for copying State per Component instance (#2923) 2024-03-29 09:22:25 -07:00
test_component.py [REF-2830] server side events and stateless components should not require not require a backend (#3475) 2024-06-14 09:48:53 -07:00
test_tag.py fixed issue with hypens (#2450) 2024-01-26 14:14:46 -08:00