Review main Abandoned

67214[WIP][TASK] Deprecate record list event listeners in AjaxDataHandler

Andreas Kienast CR 0 V 0 Hard +254 −15 updated 08/30/21, 20:40

Commit message

In TYPO3 v7 the AjaxDataHandler has been introduced which sends
commands to the DataHandler via AJAX. In this module, some event
listeners to (un)hide a or to delete a record have been added that
interact with the record list by e.g. fading out a row being deleted.

However, adding such event listeners to a global command dispatcher was
not right in the place, thus they have been deprecated.

To declutter "global" event listeners, the affected actions are
re-implemented as lit-element based buttons.

TODO:
- Add deprecation ReST
- Check how to update Bootstrap tooltip labels with Bootstrap 5
- Check migration options:
  - Separated dispatcher module only responsible for that specific
    handling
  - Force extension authors to use RecordList API, if there's any
  - No migration available

Review

  • Code review CR 0
  • Verified V 0

Files 10

Review log 811

  1. Andreas Kienast uploaded patch set 1 12/20/20, 15:49

  2. Andreas Kienast updated the commit message in patch set 2 12/20/20, 15:50

  3. Andreas Kienast commented on patch set 2 12/20/20, 15:52

    AjaxDataHandler.ts:142 Unresolved

    Deleting
  4. TYPO3com voted on patch set 1 V +1 12/20/20, 16:00 Completed build in 10m 08s on Sun, 20 Dec, 04:00 PM Test Summary: 32528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8347

  5. TYPO3com voted on patch set 2 V +1 12/20/20, 16:03 Completed build in 12m 59s on Sun, 20 Dec, 04:03 PM Test Summary: 32528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8348

  6. Benjamin Franzke commented on patch set 2 12/20/20, 16:59

    Unresolved

    FYI, our bootstrap javascript is currently at alpha2, while css is beta1. I'm trying to tackle that in https://review.typo3.org/c/Packages/TYPO3.CMS/+/67215 So data-bs-* tags don't work yet, but still data-* – maybe that's what this todo is about?
  7. Andreas Kienast uploaded patch set 3 12/21/20, 09:37

  8. TYPO3com voted on patch set 3 V +1 12/21/20, 09:48 Completed build in 11m 04s on Mon, 21 Dec, 09:48 AM Test Summary: 32528 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-8365

  9. Benjamin Franzke commented on patch set 3 12/21/20, 09:53

    Some comments regarding the custom element for now. Don't had the time to look at the rest yet, sorry.

    DeleteRecordElement.ts:29

    Would prefer to drop "element-" here. That's like a bit like: class FooClass { :)

    DeleteRecordElement.ts:37

    This event should be added in connectedCallback and removed in disconnectCallback. See https://lit-element.polymer-project.org/guide/events#add-event-listners-in-connectedcallback

    DeleteRecordElement.ts:47

    Hm.. Is adding a button like html`<button class="btn.." @click="${...}">${icon('actions-delete')}</button>` an option here? That would allow the event handler to be applies inline and for classes to be integrated. Then we'd add two more properties, "size" and "style" which're reflected to the button classes.
  10. Andreas Kienast commented on patch set 3 12/21/20, 16:14

    DeleteRecordElement.ts:29 Reply

    Ack

    DeleteRecordElement.ts:37 Reply Unresolved

    I did it this way on purpose, the docs also say: "If your component adds an event listener to anything except itself [...] you should add the listener in connectedCallback and remove it in disconnectedCallback." Now I'm confused :)

    DeleteRecordElement.ts:47 Reply Unresolved

    I tried building the button markup in this element but that causes a visual glitch as it's primarily used in a `.btn-group`
  11. Andreas Kienast abandoned the change 08/30/21, 20:40