Commit Graph

83 Commits

Author SHA1 Message Date
Masen Furer
b313aaf3ef
rx.call_script callback needs to await promises (#2121) 2023-11-02 14:37:02 -07:00
Masen Furer
bf20a530df
Do not stop prop is there is no prop to stop (#2116)
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
Thomas Brandého
96c09b0f6b
make download work for state vars (#2092) 2023-10-31 17:08:10 -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
Masen Furer
f66c6c3361
Support callback for rx.call_script (#2045) 2023-10-26 17:54:48 -07:00
Elijah Ahianyo
7b8b64668d
Rehydrate client storage after rx.remove_local_storage and rx.remove_cookies (#1998) 2023-10-19 15:43:43 -07:00
Elijah Ahianyo
06bdf9ed8a
Remove 0.3.0 deprecated features (#1947) 2023-10-19 09:44:32 -07:00
Masen Furer
c3f5f345bb
convert initialEvents to a function (#1982) 2023-10-17 10:39:56 -07:00
Elijah Ahianyo
433ccda3a6
No state No Websocket (#1950) 2023-10-13 14:54:59 -07:00
Masen Furer
684912e33b
[REF-843] Automatically update api_url and deploy_url (#1954) 2023-10-13 12:59:19 -07:00
Thomas Brandého
7df3f2f621
allow external link for redirect (#1902) 2023-10-02 09:37:46 -07:00
Masen Furer
991c7202a7
rx.call_script: a real EventHandler to execute arbitrary javascript (#1860) 2023-09-27 18:27:48 -07:00
Thomas Brandého
211dc15995
New API to define triggers (#1820) 2023-09-21 09:47:22 -07:00
Thomas Brandého
b378827b83
add download event (#1797) 2023-09-13 09:56:00 -07:00
Elijah Ahianyo
f2b0915aff
Type Validation for Var Operations and Enhanced Compatibility (#1674) 2023-09-12 15:57:40 -07:00
Masen Furer
6fa9bfea09
Fix rx.Cookie with custom name (#1767) 2023-09-06 14:02:24 -07:00
Masen Furer
38c5503f94
Client-side Routing (404 redirect) (#1695) 2023-09-05 16:22:00 -07:00
Nikhil Rao
1d9f25be6d
Fix project hash and modernize type annotations (#1704) 2023-08-31 17:04:39 -07:00
Masen Furer
9fbc75d84a
Client-side storage / State integration (#1629) 2023-08-30 12:43:29 -07:00
Masen Furer
2392c52928
Implement on_mount and on_unmount for all components. (#1636) 2023-08-30 09:50:39 -07:00
Masen Furer
6b481ecfc3
ConnectionModal and ConnectionBanner cleanup (#1379) 2023-08-28 18:04:52 -07:00
Masen Furer
042710ca91
Handle file uploads with component-local state (#1616) 2023-08-18 13:12:17 -07:00
Masen Furer
efefa757a0
state.js: fix prod mode! applyDelta must operate on new_state (#1613) 2023-08-17 13:35:11 -07:00
Masen Furer
2ff823e89a
Event Loop Refactor (#1590) 2023-08-15 15:17:08 -07:00
Thomas Brandého
cd47815a4d
form support more inputs (#1554) 2023-08-10 09:54:04 -07:00
Elijah Ahianyo
5eeb560238
Bugfix for hidden refs (#1418) 2023-07-25 09:56:37 -07:00
Thomas Brandého
06f6e1e7bd
improve 404 logic (#1398) 2023-07-21 11:51:04 -07:00
Masen Furer
915685c073
state.js: do not shadow outer state var (#1375) 2023-07-19 18:09:55 -07:00
Elijah Ahianyo
ca11b82432
Yield with uploads (#1339) 2023-07-18 14:06:57 -07:00
Masen Furer
5cbf7da952
state.js: accumulate incoming events (#1313)
If the backend yields multiple events from a single event handler, ensure that
each event gets appended to the pending result before being transferred to the
state. Previously each incoming event would overwrite any other pending
event(s) leading to racy and unpredictable behavior when yielding events from
the backend in quick succession.

Fixes #1309

Bonus Fix: when setting `processing: false` after client-side events (like
_console), spread from `result`, not `state` to avoid accumulating duplicate
queued events. I think this was originally an undiscovered bug that was exposed
by the main fix.
2023-07-07 12:58:13 -07:00
Elijah Ahianyo
3b3fc4f965
Local storage clear and remove (#1222) 2023-06-28 11:59:27 -07:00
Elijah Ahianyo
be48e13c71
Remove cookies (#1223) 2023-06-27 18:04:29 -07:00
Nikhil Rao
139ce38df1
Rename pynecone to reflex (#1236) 2023-06-25 16:56:55 -07:00