Skip to content

Signals polyfill + pat-bind two-way databinding pattern - #1288

Merged
thet merged 3 commits into
masterfrom
thet/signals
Sep 26, 2026
Merged

thet merged 3 commits into
masterfrom
thet/signals

Conversation

@thet

@thet thet commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

This adds the new pat-bind pattern for two-way data binding using the not-yet-ready-specified TC39 signals specification in a custom polyfill.

pat-bind allows for declarative two-way data binding:

<select class="pat-bind" data-pat-bind="key: color">
  <option value="red">Red</option>
  <option value="green">Green</option>
</select>

<span class="pat-bind" data-pat-bind="key: color; value: ::text"></span>

The full documentation is at: https://github.com/Patternslib/Patterns/blob/thet/signals/src/pat/bind/documentation.md

NOTE: event TC39 signals is not ready yet, it is used in preact, lit. The specification is meant as a foundation for any reactive framework out there.

https://github.com/tc39/proposal-signals
https://github.com/proposal-signals/signal-polyfill
https://github.com/maverick-js/signals
https://github.com/preactjs/signals
https://lit.dev/docs/data/signals/

@thet
thet requested review from MrTango and petschki June 3, 2026 21:47
@MrTango

MrTango commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

That sound interesting. Signals are used by many JS frameworks already, Svelte 5 introduced them under the name runes.
They do a bit moire though, besides simple binding ($state) we have there also ($derived), to declare dependencies between states.

thet added a commit to plone/plone.app.z3cform that referenced this pull request Jun 12, 2026
thet added a commit to plone/plone.app.z3cform that referenced this pull request Jun 16, 2026
@thet
thet requested a review from cornae August 28, 2026 00:01
thet added a commit to plone/plone.app.z3cform that referenced this pull request Sep 15, 2026
@thet
thet force-pushed the thet/signals branch 2 times, most recently from f044813 to c6656ca Compare September 23, 2026 23:32
@thet
thet force-pushed the thet/signals branch 2 times, most recently from d9a69e1 to 7ecc178 Compare September 26, 2026 14:04
@thet
thet merged commit bdb2475 into master Sep 26, 2026
1 check passed
@thet
thet deleted the thet/signals branch September 26, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants