Review main Merged

88618[BUGFIX] Dispatch `multiRecordSelection:checkbox:state:changed` once

Andreas Kienast CR +2 V +2 Easy +2 −7 updated 03/18/25, 07:39

Commit message

The module `@typo3/backend/multi-record-selection` uses multiple events
to notify about state changes. Unfortunately, it happened that the event
`multiRecordSelection:checkbox:state:changed` was dispatched twice when
the checkboxes are toggled via the action dropdown:

* explicitly in `changeCheckboxState()`
* by the `change` event listener registered in
  `registerDispatchCheckboxStateChangedEvent()`

The explicit call in `changeCheckboxState()` is removed, as the `change`
event is triggered anyway and it's event handler is also called when
single rows get (un)checked.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Benjamin Franzke +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 911

  1. Andreas Kienast uploaded patch set 1 03/17/25, 15:23

  2. core-ci voted on patch set 1 V +1 03/17/25, 15:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75729

  3. Georg Ringer voted on patch set 1 CR +1 V +1 03/17/25, 18:58

  4. Garvin Hicking voted on patch set 1 CR +1 V +1 03/17/25, 19:07

  5. Benjamin Franzke commented on patch set 1 03/18/25, 07:08

    multi-record-selection.ts:84

    We should update this comment to reflect that this event might not only be used, but is actually used by ourselves to dispatch the `multiRecordSelection:checkbox:state:changed`. (I'm also fine with removing the comment altogether, I just want it to not state uncertainty ;) )
  6. Benjamin Franzke uploaded patch set 2 CR +1 V +1 03/18/25, 07:17

  7. Benjamin Franzke commented on patch set 2 03/18/25, 07:17

    multi-record-selection.ts:84 Reply

    Done
  8. core-ci voted on patch set 2 V +1 03/18/25, 07:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/75756

  9. Garvin Hicking voted on patch set 2 CR +1 V +1 03/18/25, 07:28

  10. Georg Ringer voted on patch set 2 CR +2 V +2 03/18/25, 07:39

  11. Georg Ringer merged patch set 3 03/18/25, 07:39