reflex/tests
Masen Furer 432fcd4a5b
Account for imports of @rx.memo components for frontend package installation (#2863)
* CustomComponent ignores the annotation type in favor of the passed value

Do not require rx.memo wrapped functions to have 100% correct annotations.

* test_custom_component_get_imports: test imports from wrapped custom components

* Account for imports of custom components for frontend installation

Create new ImportVar that only install the package to avoid rendering the
imports in the page that contains the custom component itself.

* Handle Imports that should never be installed

* Fix up double negative logic

* Perf Optimization: use the imports we already calculate during compile

Instead of augmenting _get_imports with a weird, slow, recursive crawl and
dictionary reconstruction, just use the imports that we compile into the
components.js file to install frontend packages needed by the custom
components.

Same effect, but adds essentially zero overhead to the compilation.
2024-03-15 09:59:59 -07:00
..
compiler pass lang and custom_attrs from app to html root (#2697) 2024-03-03 13:51:20 -08:00
components Account for imports of @rx.memo components for frontend package installation (#2863) 2024-03-15 09:59:59 -07:00
custom_components [REF-2141] Custom component command improvements (#2807) 2024-03-07 20:42:22 -08:00
middleware [REF-201] Separate on_load handler from initial hydration (#1847) 2023-11-30 12:21:15 -08:00
states RED-1052/rx.State as Base State (#2146) 2023-11-29 09:43:33 -08:00
utils [REF-2141] Custom component command improvements (#2807) 2024-03-07 20:42:22 -08:00
__init__.py RED-1052/rx.State as Base State (#2146) 2023-11-29 09:43:33 -08:00
conftest.py [REF-201] Separate on_load handler from initial hydration (#1847) 2023-11-30 12:21:15 -08:00
test_app.py [REF-2158] Enable state when on_load or event_triggers are set. (#2815) 2024-03-08 17:34:09 -08:00
test_base.py Rename pynecone to reflex (#1236) 2023-06-25 16:56:55 -07:00
test_config.py Added Environmental variable REFLEX_DIR (#2457) 2024-01-30 18:18:29 -08:00
test_db_config.py Rename pynecone to reflex (#1236) 2023-06-25 16:56:55 -07:00
test_event.py RED-1052/rx.State as Base State (#2146) 2023-11-29 09:43:33 -08:00
test_model.py supply default for sqlmodel PK for both DB and python to work (#1788) 2023-09-08 14:51:57 -07:00
test_prerequisites.py Skip frontend packages install if previously done (#2400) 2024-01-16 17:52:28 -08:00
test_route.py Allow underscores in routes (#1713) 2023-09-08 12:18:33 -07:00
test_state_tree.py [REF-1988] API to Get instance of Arbitrary State class (#2678) 2024-02-27 13:02:08 -08:00
test_state.py Fix infinite recursion when a substate named "state" has a computed var (#2778) 2024-03-04 13:13:08 -08:00
test_style.py Handle component namespaces in global styles (#2630) 2024-02-15 16:03:10 -08:00
test_telemetry.py telemetry refactor + unit tests (#2786) 2024-03-13 12:38:54 -07:00
test_testing.py Avoid passing props to lists and list items (#2326) 2023-12-21 15:58:45 -08:00
test_var.py Initial values for computed vars (#2670) 2024-02-24 13:45:07 -08:00