You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3286b99
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10-7Lines changed: 10 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,8 @@ Don't forget to remove deprecated code on each major release!
19
19
- Added type hints to `reactpy.html` attributes.
20
20
- Added support for nested components in web modules
21
21
- Added support for inline JavaScript as event handlers or other attributes that expect a callable via `reactpy.types.InlineJavaScript`
22
-
- Event functions can now call `event.preventDefault()`and `event.stopPropagation()` methods directly on the event data object, rather than using the `@event` decorator.
23
-
- Event data now supports accessing properties via dot notation (ex. `event.target.value`).
22
+
- Event functions can now call `event.preventDefault()`, `event.stopPropagation()`, and `event.stopImmediatePropagation()` methods directly on the event data object, rather than using the `@event` decorator.
23
+
- Event data now supports accessing properties via dot notation (ex. `await event.target.value`).
24
24
- Added support for partial functions in EventHandler
25
25
- Added `reactpy.types.Event` to provide type hints for the standard `data` function argument (for example `async def on_click(event: Event): ...`).
26
26
- Added `asgi` and `jinja` installation extras (for example `pip install reactpy[asgi, jinja]`).
@@ -40,10 +40,10 @@ Don't forget to remove deprecated code on each major release!
40
40
- Events now support `debounce` and `throttle`, configurable per event via `event.debounce = <milliseconds>` and `EventHandler(fn, throttle=<milliseconds>)` respectively.
41
41
-`debounce` waits until activity stops, then fires once. Default is 200 ms on `input`/`select`/`textarea`, 0 ms elsewhere.
42
42
-`throttle` caps the rate how often an event is allowed to execute. No default; opt in per event.
43
-
- Added a live event proxy which lets event handlers read properties from, and call methods on, the browser objects which triggered them rather than being limited to the snapshot sent along with the event.
44
-
-A handler awaits what it needs (`await event.target.value`, `await event.target.focus()`).
45
-
-The initial event is a snapshot of serializable event data; whatever the handler reaches past is an `EventProxy` describing where in the browser to look for it.
46
-
-Live access is on unless a handler turns it off by assigning `event.eventProxy = False` inside its own body.
43
+
- Added a live event proxy which lets event handlers read properties from, and call methods on, the browser objects which triggered them (ex. `await event.target.value`, `await event.target.focus()`) rather than being limited to whatever was serializable at the moment the event was dispatched.
44
+
-Only an id and the event's `type` travel with the event. Whatever a handler reaches past is fetched from the browser on demand, one round trip at a time, and resolved against the object itself.
45
+
-Properties which are in flight at the same moment go out as a single message, and `await event.read("target.value", "key")` reads several at once.
46
+
-A read belongs to the moment it is awaited: it reports the current state of the browser object, not the state it held when the event was dispatched.
47
47
- Unanswered requests are bounded by `reactpy.config.REACTPY_EVENT_PROXY_TIMEOUT`, `reactpy.config.REACTPY_EVENT_PROXY_MAX_TIMEOUTS`, and `reactpy.config.REACTPY_EVENT_PROXY_MAX_DEPTH`.
48
48
49
49
### Changed
@@ -88,7 +88,7 @@ Don't forget to remove deprecated code on each major release!
88
88
- Removed deprecated function `module_from_template`.
89
89
- Removed deprecated exception type `reactpy.core.serve.Stop`.
- Removed the `event-to-object` package. The serializable snapshot it produced is now produced by the client's own serializer, and is what a handler is handed unless it has asked for the live object behind the event (see the live event proxy above).
91
+
- Removed the `event-to-object` package. The client no longer serializes an event when it dispatches one, so nothing was producing that snapshot any more (see the live event proxy above).
92
92
- Removed `reactpy.sample` module.
93
93
- Removed `reactpy.svg` module. Contents previously within `reactpy.svg.*` can now be accessed via `reactpy.html.svg.*`.
94
94
- Removed `reactpy.html._` function. Use `reactpy.html(...)` or `reactpy.html.fragment(...)` instead.
@@ -113,6 +113,9 @@ Don't forget to remove deprecated code on each major release!
113
113
- Fixed a bug where the `key` property provided within server-side ReactPy code was failing to propagate to the front-end JavaScript components.
114
114
- Fixed a bug where `RuntimeError("Hook stack is in an invalid state")` errors could be generated when using a webserver that reuses threads.
115
115
- Fixed a bug where events on controlled inputs (e.g. `html.input({"onChange": ...})`) could be lost during rapid actions.
116
+
- Fixed a bug where a render which happened while an event handler was still running could write a stale value back over a controlled input, because the event which prompted it had been acknowledged before the handler was out of the way.
117
+
- Fixed a bug where `event-proxy-response` messages were dropped by `reactpy.executors.asgi.ReactPyMiddleware` rather than being routed to the layout which asked for them, leaving every live event read to hang until it timed out.
118
+
- Fixed a bug where a component could stop re-rendering for the rest of its life after a scheduled render was cancelled, since the internal 'a render is already scheduled' latch was never released.
116
119
- Allow for ReactPy and ReactJS components to be arbitrarily inserted onto the page with any possible hierarchy.
0 commit comments