-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: enable ListSignal in generator-plugin-signals #2810
Conversation
This changes the way updates are sent to the clients after the acceptance/rejection of an event on the server. With this applied, the REJECT event is removed and SNAPSHOT event containing the current state of the server-side signal only when (re)subscribing to a signal and not after each update. The events received by the server regarding each update to a signal is propagated to the clients with a boolean value that indicates the acceptance/rejection of the operation so clients decide to discard/apply/confirm the operation on their local value. This unifies the way with how List signals are going to work: to get snapshot events with the current state on the server only when subscribing signals (which can be a long list of values), and then getting updates of individual operations for subsequent updates, one at a time.
This extract the Signal abstraction out of ValueSignal so that the ListSignal implementation can inherit the common functionalities. Part of #2654
…ctor/extract-signal-abstraction
Also add some tests for ListSignal.ts
… taefi/feat/add-list-signal
This enables the generator-plugin-signals to correctly generate TS services for the endpoints with methods returning instances of ListSignal.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2810 +/- ##
==========================================
+ Coverage 92.56% 92.57% +0.01%
==========================================
Files 83 83
Lines 2798 2802 +4
Branches 720 721 +1
==========================================
+ Hits 2590 2594 +4
Misses 156 156
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
This ticket/PR has been released with Hilla 24.6.0.alpha2 and is also targeting the upcoming stable 24.6.0 version. |
Description
This enables the generator-plugin-signals to correctly generate TS services for the endpoints with methods returning instances of ListSignal.
Follow-up for #2775
Type of change
Checklist