Commit Graph

55 Commits

Author SHA1 Message Date
Masen Furer
accaf6dc52
[REF-1365] Radix + Tailwind Compatibility (and allow tailwind to be completely disabled) () 2023-12-28 00:14:04 -08:00
jackie-pc
7388617b72
apps should no longer call "app.compile()" () 2023-12-18 16:06:21 -08:00
Masen Furer
e52267477c
[REF-1417] Convert underscore-prefixed style props to pseudo selector () 2023-12-11 13:37:57 -08:00
Alek Petuskey
7164b91d7b
Implement Radix Themes () 2023-12-06 16:47:03 -08:00
Masen Furer
0bbae2d3d5
[REF-1404] router_data not updated when processing events () 2023-12-04 16:45:22 -08:00
Masen Furer
a2d5bbc133
[reflex-web tweaks] Do not memoize children of InputGroup () 2023-11-30 09:48:28 -08:00
Elijah Ahianyo
e3ee98098a
RED-1052/rx.State as Base State () 2023-11-29 09:43:33 -08:00
Masen Furer
527437cf23
[REF-144] Add context in each component to prevent rerenders () 2023-11-27 16:05:59 -08:00
Masen Furer
1603144c7d
[REF-889] useContext per substate () 2023-11-21 11:52:06 -08:00
Masen Furer
7eccc6d988
[REF-723+] Upload with progress and cancellation () 2023-11-16 15:46:13 -08:00
Masen Furer
9480f76a27
reflex_init_in_docker_test: export both frontend and backend () 2023-11-16 14:21:54 -08:00
Masen Furer
5e6520cb5d
Support Form controls via name attribute (no ID or ref) () 2023-11-10 12:58:59 -08:00
Alek Petuskey
dd982c5ace
Add benchmarking tests () 2023-11-08 17:41:08 -08:00
Nikhil Rao
6e1bce3412
Prompt for template on reflex init () 2023-11-03 13:37:01 -07:00
Masen Furer
b313aaf3ef
rx.call_script callback needs to await promises () 2023-11-02 14:37:02 -07:00
Masen Furer
bf20a530df
Do not stop prop is there is no prop to stop ()
Check that desired event actions are defined on the object passed as the DOM
event before calling them to avoid frontend errors.
2023-11-02 10:21:41 -07:00
Masen Furer
56476d0a86
Expose DOM event actions on EventHandler, EventSpec, and EventChain (stopPropagation) ()
* Expose preventDefault and stopPropagation for DOM events

All EventHandler, EventSpec, and EventChain can now carry these extra
"event_actions" that will be applied inside the frontend code when an event is
triggered from the DOM.

Fix 
Fix REF-675

* Test cases (and fixes) for "event_actions"

* form: from __future__ import annotations

for py38, py39 compat

* Revert overzealous merge conflict resolution
2023-10-31 11:42:42 -07:00
Masen Furer
f66c6c3361
Support callback for rx.call_script () 2023-10-26 17:54:48 -07:00
Masen Furer
21dbdc0103
Replace renamed Var.type_ with _var_type () 2023-10-26 12:34:00 -07:00
Masen Furer
93d19d6dc3
[REF-938] Fix up radix themes issues () 2023-10-24 14:29:54 -07:00
Masen Furer
f6a7eed359
Fix AppHarness tests ()
* test_client_storage: remove race conditions for cookie assignment

Poll for default timeout for cookies to appear in the controlled browser.

* Remove use of deprecated get_token and get_sid in core

Both reflex.app and reflex.state were still using deprecated methods, which
were throwing unsolvable warnings for end users.

* Remove deprecated router functions from integration tests

Mostly removing custom "token" var and replacing with
router.session.client_token.

Also replacing `get_query_params` and `get_current_page` usage as well.

* fix upload tests

Cannot pass substate as main app state, since it blocks us from accessing
"inherited vars"

* state: do NOT reset `router` to default

When calling `.reset` to reset state vars, do NOT reset the router data, as
that could mess up internal event processing.
2023-10-18 01:46:13 +02:00
Masen Furer
c3f5f345bb
convert initialEvents to a function () 2023-10-17 10:39:56 -07:00
Masen Furer
67606561d3
[REF-668] Wrap MyApp with radix Theme component ()
* partly add some radix-ui/themes based components

* add @radix-ui/themes integration to top-level app

* WiP: compile _app_wrap based on which component library is used

TODO: working color mode

* WiP get color mode working with agnostic provider

still not perfect, as the RadixColorModeProvider seems to trip hydration errors
when using color_mode_cond component, but for now, this provides a nice balance
between the two libraries and allows them to interoperate.

* WiP template _app.js instead of making a separate wrap file

* WiP: use next-themes for consistent darkmode switching

* strict pin chakra deps

* Move ChakraColorModeProvider to separate js file

* move nasty radix themes js code into js files

* remove chakra from default imports

* chakra fixup import to use .js extension

* Add radix theme typography and layout components

* do NOT special case the radix theme...

avoid templating json and applying it, avoid non-customizable logic

just add the radix Theme component as an app wrap if the user specifies it to
rx.App, and any other app-wrap theme-like component could _also_ be used
without having to change the code.

this also allows different themes for different sections of the app by simply
placing elements inside a different rdxt.theme wrapper.

* Theme uses "radius" not "borderRadius"

* move next-themes to main packages.json

this is always used, regardless of the component library

* test_app: test cases for app_wrap interface

* Finish wrapping Button, Switch, and TextField components

* docstring, comments, static fixups

* debounce: use alias or tag when passing child Element

Fix REF-830

* test_app: ruin my beautiful indentation

* py38 compatibility

* Add event triggers for switch and TextField

* Add type hints for radix theme components

* radix themes fixups from writing the tests

* Add integration test for radix themes components

* test_app: mock out package installation

we only need the compile result, we're not actually trying to install packages

* avoid incompatible version of @emotion/react

* test_radix_themes: include theme_panel component

* next-themes default scheme: "light"

until all of our components look good in dark mode, need to keep the default as
light mode regardless of the system setting.
2023-10-16 15:31:50 -07:00
Masen Furer
024cb5fa9b
Var field cleanup () 2023-10-13 14:53:55 -07:00
Elijah Ahianyo
26885d98cf
rx.table __bool__ regression fix () 2023-09-28 09:31:01 -07:00
Nikhil Rao
8231993e5a
Improvements to custom styles in rx.markdown () 2023-09-25 15:59:48 -07:00
Masen Furer
351611ca25
rx.background and StateManager.modify_state provides safe exclusive access to state () 2023-09-21 11:42:11 -07:00
Nikhil Rao
264c44e630
Disable metrics in CI () 2023-09-15 18:15:25 -07:00
Elijah Ahianyo
f2b0915aff
Type Validation for Var Operations and Enhanced Compatibility () 2023-09-12 15:57:40 -07:00
Elijah Ahianyo
891e6a4736
Allow underscores in routes () 2023-09-08 12:18:33 -07:00
Masen Furer
6fa9bfea09
Fix rx.Cookie with custom name () 2023-09-06 14:02:24 -07:00
Masen Furer
2e014422f5
App: only render default overlay_component when DefaultState is not used () 2023-09-05 16:22:25 -07:00
Masen Furer
38c5503f94
Client-side Routing (404 redirect) () 2023-09-05 16:22:00 -07:00
Thomas Brandého
63b5fbd7b0
add pyi_generator script () 2023-08-31 14:25:56 -07:00
Nikhil Rao
7d7b7901a9
Fix setting substate client storage () 2023-08-31 09:54:27 -07:00
Masen Furer
cc89f2b6e7
Proper serialization for chained Event payloads () 2023-08-31 09:50:15 -07:00
Masen Furer
99843d98af
debounce_input should respect child ref () 2023-08-30 12:46:55 -07:00
Masen Furer
9fbc75d84a
Client-side storage / State integration () 2023-08-30 12:43:29 -07:00
Masen Furer
2392c52928
Implement on_mount and on_unmount for all components. () 2023-08-30 09:50:39 -07:00
Martin Xu
51f0339fa4
Add special var for upload: clear_selected_files () 2023-08-28 17:15:31 -07:00
Masen Furer
042710ca91
Handle file uploads with component-local state () 2023-08-18 13:12:17 -07:00
Masen Furer
2613b865f2
test_form_submit: poll for backend_state to be updated () 2023-08-18 12:56:47 -07:00
Masen Furer
afcbe7e5a6
Move initial state to separate file () 2023-08-17 09:54:07 -07:00
Masen Furer
8c4183f500
integration tests: don't shadow real error when screenshot fails () 2023-08-16 13:05:36 -07:00
Nikhil Rao
00714c60ac
Fix rx.link href prop and Var.to_string type ()
* Fix rx.link href prop

* Update bool var types
2023-08-16 11:41:19 -07:00
Masen Furer
8ce3ee19cc
fix flakyness in test_dynamic_routes () 2023-08-16 00:53:09 -07:00
Masen Furer
2ff823e89a
Event Loop Refactor () 2023-08-15 15:17:08 -07:00
Thomas Brandého
59132e533b
Add AppHarness for form submit () 2023-08-14 23:20:36 -07:00
Masen Furer
544d352e55
Run AppHarness selenium integration tests in CI () 2023-08-07 14:46:09 -07:00
Masen Furer
4a658ef9be
Wrap Input and TextArea with DebounceInput for full control () 2023-08-07 14:27:42 -07:00