Skip to content

[stable8] fix(NcCheckboxRadioSwitch): use reactive state for group checkbox toggle#8355

Merged
pringelmann merged 3 commits intostable8from
backport/8324/stable8
Apr 10, 2026
Merged

[stable8] fix(NcCheckboxRadioSwitch): use reactive state for group checkbox toggle#8355
pringelmann merged 3 commits intostable8from
backport/8324/stable8

Conversation

@backportbot
Copy link
Copy Markdown

@backportbot backportbot Bot commented Mar 25, 2026

Backport of PR #8324

@backportbot backportbot Bot added bug Something isn't working 3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities feature: checkbox-radio-switch Related to the checkbox-radio-switch component labels Mar 25, 2026
@backportbot backportbot Bot added this to the 8.37.0 milestone Mar 25, 2026
@pringelmann pringelmann force-pushed the backport/8324/stable8 branch from 12ad3aa to 85b1f6d Compare March 25, 2026 12:55
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.99%. Comparing base (f57b50c) to head (23befe9).
⚠️ Report is 16 commits behind head on stable8.

Additional details and impacted files
@@             Coverage Diff             @@
##           stable8    #8355      +/-   ##
===========================================
+ Coverage    45.85%   45.99%   +0.14%     
===========================================
  Files          194      194              
  Lines         4892     4890       -2     
  Branches      1262     1200      -62     
===========================================
+ Hits          2243     2249       +6     
+ Misses        2561     2555       -6     
+ Partials        88       86       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pringelmann pringelmann force-pushed the backport/8324/stable8 branch from 845af29 to d8e77d2 Compare April 1, 2026 10:10
@pringelmann pringelmann requested a review from skjnldsv April 1, 2026 11:53
The array/group checkbox path in onToggle read input.checked from the
DOM via getInputsSet(). On keyboard spacebar, the browser toggles
input.checked before firing the change event, so the DOM-read logic
inverted the intended action and emitted the stale modelValue.

Replace DOM queries with reactive-state reads (this.isChecked and
this.internalModelValue) which correctly reflect the pre-toggle state
regardless of the event source.

Fixes #8321

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
stable8 uses Vue Test Utils v1 which requires propsData instead of props
and wrapper.destroy() instead of wrapper.unmount().

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann pringelmann force-pushed the backport/8324/stable8 branch from d8e77d2 to 23befe9 Compare April 10, 2026 09:03
@pringelmann
Copy link
Copy Markdown
Contributor

@susnux @skjnldsv could one of you re-review please? 🙏

@pringelmann pringelmann merged commit 215c098 into stable8 Apr 10, 2026
19 checks passed
@pringelmann pringelmann deleted the backport/8324/stable8 branch April 10, 2026 12:55
@Antreesy Antreesy modified the milestones: 8.37.0, 8.38.0 Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews accessibility Making sure we design for the widest range of people possible, including those who have disabilities bug Something isn't working feature: checkbox-radio-switch Related to the checkbox-radio-switch component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants