Commit Graph

244 Commits

Author SHA1 Message Date
Nikhil Rao
e703d87450
Set unique index vars in rx.foreach () 2023-11-03 16:20:42 -07:00
Martin Xu
4c97b4c4c0
Hosting CLI: use http endpoint to return deploy milestones () 2023-11-03 12:13:46 -07:00
Martin Xu
4a526620ac
[REF-1042] Hosting CLI: check the user selected app name () 2023-11-02 14:34:10 -07:00
SandeshPyakurel
5e2ce46ddb
Typos fixed in multiple files () 2023-10-31 13:43:25 -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
Martin Xu
e9cf822460
CLI will not set auto/stop setting for deployment ()
* do not set autostart/autostop as default on CLI

* cli feedback

* fix test

* clean up last few messages

* catch general exception for export and exit
2023-10-26 17:47:22 -07:00
Alek Petuskey
70a6b5f2d3
Autogenerating Dependencies During Deployment () 2023-10-26 17:32:58 -07:00
Martin Xu
fe01f0cf11
add region check upfront when user deploys interactively () 2023-10-26 10:07:49 -07:00
Masen Furer
92dd68c51f
Improve Var type handling for better rx.Model attribute access () 2023-10-25 11:55:50 -07:00
Masen Furer
1734ba0b6d
Generate state delta from processed state instance () 2023-10-24 10:44:12 -07:00
Martin Xu
81053618c9
CLI switch to prod server () 2023-10-24 09:43:20 -07:00
Martin Xu
07ca8fcb3b
[REF-99] Add first version of CLI for hosting service () 2023-10-21 13:09:56 -07:00
Masen Furer
cbf5b61a23
Drop python3.7 support ()
* Drop python3.7 support

* poetry.lock: relock without py3.7

* Update README/CONTRIBUTING to say 3.8+
2023-10-19 22:21:29 +02:00
Elijah Ahianyo
06bdf9ed8a
Remove 0.3.0 deprecated features () 2023-10-19 09:44:32 -07:00
Elijah Ahianyo
b652d40ee5
Remove Default state () 2023-10-18 09:57:27 -07:00
Masen Furer
e15710de17
test_app: cleanup state_name logic and fixup get_sid() call () 2023-10-18 12:29:24 +02: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
Thomas Brandého
df09c716c6
fix serialization as a whole for list/dict/Base containing custom items to serialize () 2023-10-17 10:44:54 -07:00
Masen Furer
d1d5812602
format: event arg values use backticks () 2023-10-17 10:42:35 -07:00
Thomas Brandého
b1bab1206d
deprecate get_ methods for router_data, use BaseVars instead () 2023-10-17 09:59:44 -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
Elijah Ahianyo
c6abeb31a5
Props as Literals () 2023-10-15 20:16:39 -07:00
Elijah Ahianyo
433ccda3a6
No state No Websocket () 2023-10-13 14:54:59 -07:00
Masen Furer
024cb5fa9b
Var field cleanup () 2023-10-13 14:53:55 -07:00
Masen Furer
684912e33b
[REF-843] Automatically update api_url and deploy_url () 2023-10-13 12:59:19 -07:00
Alek Petuskey
67eb661704
Core Graphing -> Recharts () 2023-10-04 15:05:08 -07:00
Thomas Brandého
58933278ad
fix rx.image src not working with state () 2023-10-04 14:15:18 -07:00
Masen Furer
43cc8d4f6c
test_state: assert popped value is the actual value () 2023-10-02 17:43:05 -07:00
Nikhil Rao
53d205ad9f
Improve default rx.markdown styling () 2023-10-02 11:52:16 -07:00
Masen Furer
4b84c2a471
state: subclass of MutableState must return _mark_dirty return value () 2023-10-02 11:17:45 -07:00
Thomas Brandého
7df3f2f621
allow external link for redirect () 2023-10-02 09:37:46 -07:00
Masen Furer
418f9ad569
state: get_value unwraps MutableProxy first () 2023-10-01 10:13:27 -07:00
Masen Furer
4f6b3c049b
State.reset uses deepcopy on defaults () 2023-09-29 16:33:16 -07:00
Masen Furer
5ca7f29853
MutableProxy wraps values yielded by __iter__ () 2023-09-28 17:34:46 -07:00
Thomas Brandého
dcb17103bb
code cleanup (split constants into a folder) () 2023-09-28 17:27:20 -07:00
Elijah Ahianyo
26885d98cf
rx.table __bool__ regression fix () 2023-09-28 09:31:01 -07:00
Nikhil Rao
89404e0b4a
Add head components to app () 2023-09-25 16:53:15 -07:00
Nikhil Rao
8231993e5a
Improvements to custom styles in rx.markdown () 2023-09-25 15:59:48 -07:00
Masen Furer
83d7a044fe
StateProxy rebinds functools.partial and methods that are bound to the proxied State () 2023-09-21 17:59:18 -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
Thomas Brandého
211dc15995
New API to define triggers () 2023-09-21 09:47:22 -07:00
Nikhil Rao
ac8dfc5f91
Format component as React string () 2023-09-20 19:30:38 -07:00
Elijah Ahianyo
d81d544b97
add option to disable Tailwind () 2023-09-20 16:47:58 -07:00
Masen Furer
1bfb579b20
state: implement __copy__ and __deepcopy__ for MutableProxy () 2023-09-20 16:46:49 -07:00
Elijah Ahianyo
2750228dbb
Prevent Substate class shadowing () 2023-09-19 15:56:39 -07:00
Masen Furer
1430075bdc
Reassign state Var when fields on a Base instance change () 2023-09-18 13:52:10 -07:00
Nikhil Rao
264c44e630
Disable metrics in CI () 2023-09-15 18:15:25 -07:00
Nikhil Rao
1938a6cc58
Add serializers for different var types () 2023-09-15 17:19:26 -07:00
Elijah Ahianyo
74d227d2fd
Move custom styles to root App file(_app.js) () 2023-09-15 13:18:35 -07:00
Elijah Ahianyo
f2b0915aff
Type Validation for Var Operations and Enhanced Compatibility () 2023-09-12 15:57:40 -07:00