Commit Graph

243 Commits

Author SHA1 Message Date
Martin Xu
4c97b4c4c0
Hosting CLI: use http endpoint to return deploy milestones (#2085) 2023-11-03 12:13:46 -07:00
Martin Xu
4a526620ac
[REF-1042] Hosting CLI: check the user selected app name (#2102) 2023-11-02 14:34:10 -07:00
SandeshPyakurel
5e2ce46ddb
Typos fixed in multiple files (#2090) 2023-10-31 13:43:25 -07:00
Masen Furer
56476d0a86
Expose DOM event actions on EventHandler, EventSpec, and EventChain (stopPropagation) (#1891)
* 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 #1621
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 (#2040)
* 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 (#2033) 2023-10-26 17:32:58 -07:00
Martin Xu
fe01f0cf11
add region check upfront when user deploys interactively (#2030) 2023-10-26 10:07:49 -07:00
Masen Furer
92dd68c51f
Improve Var type handling for better rx.Model attribute access (#2010) 2023-10-25 11:55:50 -07:00
Masen Furer
1734ba0b6d
Generate state delta from processed state instance (#2023) 2023-10-24 10:44:12 -07:00
Martin Xu
81053618c9
CLI switch to prod server (#2016) 2023-10-24 09:43:20 -07:00
Martin Xu
07ca8fcb3b
[REF-99] Add first version of CLI for hosting service (#1810) 2023-10-21 13:09:56 -07:00
Masen Furer
cbf5b61a23
Drop python3.7 support (#2003)
* 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 (#1947) 2023-10-19 09:44:32 -07:00
Elijah Ahianyo
b652d40ee5
Remove Default state (#1978) 2023-10-18 09:57:27 -07:00
Masen Furer
e15710de17
test_app: cleanup state_name logic and fixup get_sid() call (#1993) 2023-10-18 12:29:24 +02:00
Masen Furer
f6a7eed359
Fix AppHarness tests (#1987)
* 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 (#1984) 2023-10-17 10:44:54 -07:00
Masen Furer
d1d5812602
format: event arg values use backticks (#1926) 2023-10-17 10:42:35 -07:00
Thomas Brandého
b1bab1206d
deprecate get_ methods for router_data, use BaseVars instead (#1967) 2023-10-17 09:59:44 -07:00
Masen Furer
67606561d3
[REF-668] Wrap MyApp with radix Theme component (#1867)
* 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 (#1921) 2023-10-15 20:16:39 -07:00
Elijah Ahianyo
433ccda3a6
No state No Websocket (#1950) 2023-10-13 14:54:59 -07:00
Masen Furer
024cb5fa9b
Var field cleanup (#1943) 2023-10-13 14:53:55 -07:00
Masen Furer
684912e33b
[REF-843] Automatically update api_url and deploy_url (#1954) 2023-10-13 12:59:19 -07:00
Alek Petuskey
67eb661704
Core Graphing -> Recharts (#1878) 2023-10-04 15:05:08 -07:00
Thomas Brandého
58933278ad
fix rx.image src not working with state (#1915) 2023-10-04 14:15:18 -07:00
Masen Furer
43cc8d4f6c
test_state: assert popped value is the actual value (#1906) 2023-10-02 17:43:05 -07:00
Nikhil Rao
53d205ad9f
Improve default rx.markdown styling (#1904) 2023-10-02 11:52:16 -07:00
Masen Furer
4b84c2a471
state: subclass of MutableState must return _mark_dirty return value (#1898) 2023-10-02 11:17:45 -07:00
Thomas Brandého
7df3f2f621
allow external link for redirect (#1902) 2023-10-02 09:37:46 -07:00
Masen Furer
418f9ad569
state: get_value unwraps MutableProxy first (#1887) 2023-10-01 10:13:27 -07:00
Masen Furer
4f6b3c049b
State.reset uses deepcopy on defaults (#1889) 2023-09-29 16:33:16 -07:00
Masen Furer
5ca7f29853
MutableProxy wraps values yielded by __iter__ (#1876) 2023-09-28 17:34:46 -07:00
Thomas Brandého
dcb17103bb
code cleanup (split constants into a folder) (#1866) 2023-09-28 17:27:20 -07:00
Elijah Ahianyo
26885d98cf
rx.table __bool__ regression fix (#1828) 2023-09-28 09:31:01 -07:00
Nikhil Rao
89404e0b4a
Add head components to app (#1868) 2023-09-25 16:53:15 -07:00
Nikhil Rao
8231993e5a
Improvements to custom styles in rx.markdown (#1852) 2023-09-25 15:59:48 -07:00
Masen Furer
83d7a044fe
StateProxy rebinds functools.partial and methods that are bound to the proxied State (#1853) 2023-09-21 17:59:18 -07:00
Masen Furer
351611ca25
rx.background and StateManager.modify_state provides safe exclusive access to state (#1676) 2023-09-21 11:42:11 -07:00
Thomas Brandého
211dc15995
New API to define triggers (#1820) 2023-09-21 09:47:22 -07:00
Nikhil Rao
ac8dfc5f91
Format component as React string (#1848) 2023-09-20 19:30:38 -07:00
Elijah Ahianyo
d81d544b97
add option to disable Tailwind (#1842) 2023-09-20 16:47:58 -07:00
Masen Furer
1bfb579b20
state: implement __copy__ and __deepcopy__ for MutableProxy (#1845) 2023-09-20 16:46:49 -07:00
Elijah Ahianyo
2750228dbb
Prevent Substate class shadowing (#1827) 2023-09-19 15:56:39 -07:00
Masen Furer
1430075bdc
Reassign state Var when fields on a Base instance change (#1748) 2023-09-18 13:52:10 -07:00
Nikhil Rao
264c44e630
Disable metrics in CI (#1822) 2023-09-15 18:15:25 -07:00
Nikhil Rao
1938a6cc58
Add serializers for different var types (#1816) 2023-09-15 17:19:26 -07:00
Elijah Ahianyo
74d227d2fd
Move custom styles to root App file(_app.js) (#1764) 2023-09-15 13:18:35 -07:00
Elijah Ahianyo
f2b0915aff
Type Validation for Var Operations and Enhanced Compatibility (#1674) 2023-09-12 15:57:40 -07:00
Elijah Ahianyo
06a110a07d
Style props with Callable Values (#1751) 2023-09-12 11:26:53 -07:00