Commit Graph

100 Commits

Author SHA1 Message Date
Masen Furer
527437cf23
[REF-144] Add context in each component to prevent rerenders (#2198) 2023-11-27 16:05:59 -08:00
Thomas Brandého
ed5b3818cb
update removal version of deprecated features (#2224) 2023-11-27 14:04:55 -08:00
Masen Furer
1603144c7d
[REF-889] useContext per substate (#2149) 2023-11-21 11:52:06 -08:00
Nikhil Rao
e9437ad941
Use singleton app provider to speed up compiles (#2172) 2023-11-20 18:11:24 -08:00
Masen Furer
7eccc6d988
[REF-723+] Upload with progress and cancellation (#1899) 2023-11-16 15:46:13 -08:00
Thomas Brandého
edf9c32142
fix onload method not working in prod mode (#2049) 2023-10-27 08:43:02 -07:00
Nikhil Rao
e7f0cd8e4c
Stop double compiles in dev mode (#1990) 2023-10-19 15:26:14 -07:00
Elijah Ahianyo
b652d40ee5
Remove Default state (#1978) 2023-10-18 09:57:27 -07: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
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
433ccda3a6
No state No Websocket (#1950) 2023-10-13 14:54:59 -07:00
Alek Petuskey
06103a4d8d
Namespace Recharts + Victory Back With Depreciation Warning (#1928) 2023-10-08 19:09:09 -07:00
Elijah Ahianyo
513835cf74
Update Deprecations (#1927) 2023-10-05 12:12:42 -07:00
Thomas Brandého
dcb17103bb
code cleanup (split constants into a folder) (#1866) 2023-09-28 17:27:20 -07:00
Nikhil Rao
89404e0b4a
Add head components to app (#1868) 2023-09-25 16:53:15 -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
15ced6b795
allow for non-installable imports (#1843) 2023-09-20 16:47:27 -07:00
Elijah Ahianyo
74d227d2fd
Move custom styles to root App file(_app.js) (#1764) 2023-09-15 13:18:35 -07:00
wassaf shahzad
1c598b8428
added check to remove local import starting from . (#1807) 2023-09-12 15:54:57 -07:00
Elijah Ahianyo
891e6a4736
Allow underscores in routes (#1713) 2023-09-08 12:18:33 -07:00
Thomas Brandého
043648da07
improve pyi files generation (#1765) 2023-09-07 00:23:17 -07:00
Masen Furer
dd03a277cf
Fixup warning when frontend_packages are specified and tailwind is not (#1761) 2023-09-06 10:26:14 -07:00
Masen Furer
2e014422f5
App: only render default overlay_component when DefaultState is not used (#1744) 2023-09-05 16:22:25 -07:00
Masen Furer
38c5503f94
Client-side Routing (404 redirect) (#1695) 2023-09-05 16:22:00 -07:00
Thomas Brandého
03a92bc60e
remove frontend_package option (#1700) 2023-09-05 13:45:18 -07:00
Nikhil Rao
1d9f25be6d
Fix project hash and modernize type annotations (#1704) 2023-08-31 17:04:39 -07:00
Alek Petuskey
fed75ea7f8
Incrementally Add New Packages (#1607) 2023-08-31 14:20:44 -07:00
Masen Furer
6b481ecfc3
ConnectionModal and ConnectionBanner cleanup (#1379) 2023-08-28 18:04:52 -07:00
Masen Furer
3916668461
Avoid compile step when running production backend (#1665) 2023-08-25 14:50:03 -07:00
Nikhil Rao
0beb7a409f
Clean up config parameters (#1591) 2023-08-18 14:22:20 -07:00
Martin Xu
510b71e644
Check the yield/return from user defined event handlers are valid (#1614) 2023-08-18 01:36:30 -07:00
Masen Furer
afcbe7e5a6
Move initial state to separate file (#1599) 2023-08-17 09:54:07 -07:00
Nikhil Rao
6830ab40cc
Update urls to reflex.dev (#1572) 2023-08-11 17:55:03 -07:00
Thomas Brandého
cebc5982f3
fix missing on_load parameter in custom_404 (#1541) 2023-08-10 11:21:45 -07:00
Thomas Brandého
6bc622e67d
update behaviour for wrong state passed as argument (#1447) 2023-07-28 11:18:36 -07:00
Thomas Brandého
3faad315ca
rename rx.route decorator (#1442) 2023-07-27 14:11:08 -07:00
jackie-pc
7a09554cfa
dev-mode compile: purge .web dir at last min to reduce downtime window (#1430) 2023-07-26 16:04:48 -07:00
Nikhil Rao
d3deade107
Bump version to 0.2.2 (#1400) 2023-07-21 12:00:55 -07:00
Thomas Brandého
06f6e1e7bd
improve 404 logic (#1398) 2023-07-21 11:51:04 -07:00
Elijah Ahianyo
549ab4e708
rx.App state arg should not be required (#1361) 2023-07-21 11:47:38 -07:00
Kabir Goel
278b9ab7e2
Allow custom Tailwind content (#1399) 2023-07-21 11:47:06 -07:00
Elijah Ahianyo
4505279d5d
Synchronize Event Namespace (#1370) 2023-07-19 18:05:42 -07:00
Elijah Ahianyo
ca11b82432
Yield with uploads (#1339) 2023-07-18 14:06:57 -07:00
Masen Furer
4a661a5395
reflex db migrate CLI and associated config (#1336) 2023-07-17 18:06:50 -07:00
Nikhil Rao
7397cd795a
Optimize dev mode compile (#1348) 2023-07-17 11:42:07 -07:00
Masen Furer
5505d10989
rx.Model: automigrate using alembic (#1321) 2023-07-12 15:47:19 -07:00
Thomas Brandého
903c81dd21
fix silent compilation error (#1281) 2023-06-30 09:46:17 -07:00
Siddhant Goel
c6c4410db5
Allow view overrides for registering models with admin (#1249) 2023-06-27 14:08:09 -07:00
Nikhil Rao
139ce38df1
Rename pynecone to reflex (#1236) 2023-06-25 16:56:55 -07:00