vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
904 stars 57 forks source link

feat: add automatic unsubscription from the signal instance #2656

Closed taefi closed 1 month ago

taefi commented 1 month ago

Description

This also postpones subscribing to a signal instance until the client-side signal is actually being subscribed to (rendered).

Fixes #2621

Type of change

Checklist

Additional for Feature type of change

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 91.89189% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.15%. Comparing base (0ebdc3e) to head (ba6e41c). Report is 4 commits behind head on main.

Files Patch % Lines
packages/ts/react-signals/src/EventChannel.ts 86.95% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2656 +/- ## ========================================== - Coverage 92.17% 92.15% -0.02% ========================================== Files 78 78 Lines 2454 2486 +32 Branches 634 639 +5 ========================================== + Hits 2262 2291 +29 - Misses 145 148 +3 Partials 47 47 ``` | [Flag](https://app.codecov.io/gh/vaadin/hilla/pull/2656/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vaadin) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/vaadin/hilla/pull/2656/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vaadin) | `92.15% <91.89%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=vaadin#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

taefi commented 1 month ago

Closed due to the refactoring done in #2657, and in favor of #2663