Review main Merged

64076[TASK] Respect disabled ElementBrowser also in TableList

Oli Bartsch CR +2 V +2 Easy +19 −6 updated 05/04/20, 07:37

Commit message

The ElementBrowser which is typically used for type=group,
can be disabled via the `fieldControl`.

This configuration is now also respected by the TableList
buttons, which are also links for the ElementBrowser.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Oli Bartsch +1
  • Verified V +2 Done
    • Benni Mack +2
    • Josef Glatz +1
    • Oli Bartsch +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1621

  1. Oli Bartsch uploaded patch set 1 04/04/20, 17:20

  2. Oli Bartsch updated the commit message in patch set 2 04/04/20, 17:22

  3. TYPO3com voted on patch set 1 V +1 04/04/20, 17:32 Completed build in 12m 07s on Sat, 4 Apr, 05:32 PM Test Summary: 73336 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2173

  4. TYPO3com voted on patch set 2 V +1 04/04/20, 17:38 Completed build in 14m 47s on Sat, 4 Apr, 05:38 PM Test Summary: 73336 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2174

  5. Guido Schmechel voted on patch set 2 CR +1 04/04/20, 18:01

  6. Josef Glatz commented on patch set 2 CR -1 04/06/20, 05:34

    The code works as expected. - ✅It makes sense to disable the link functionality of a table list button, if you disable the elementBrowser with the following example TCA 'pages' => [ 'exclude' => true, 'label' => 'aLabel', 'config' => [ 'type' => 'group', 'internal_type' => 'db', 'allowed' => 'pages', 'size' => 3, 'maxitems' => 50, 'minitems' => 0, 'fieldControl' => [ 'elementBrowser' => [ 'disabled' => false, ], ], ] ], - ❓But the table list under the field gives the editor the info, which types of allowed tables can be added. **Is this really what we want?** - ℹ️The actual approach is somehow breaking the UI from a editor's perspective. - ❔What about removing the link of table list items instead of hiding them completely?
  7. Oli Bartsch uploaded patch set 3 04/06/20, 06:38

  8. Oli Bartsch commented on patch set 3 04/06/20, 06:41

    > Patch Set 2: Code-Review-1 > > The code works as expected. > > - ✅It makes sense to disable the link functionality of a table list button, if you disable the elementBrowser with the following example TCA > > 'pages' => [ > 'exclude' => true, > 'label' => 'aLabel', > 'config' => [ > 'type' => 'group', > 'internal_type' => 'db', > 'allowed' => 'pages', > 'size' => 3, > 'maxitems' => 50, > 'minitems' => 0, > 'fieldControl' => [ > 'elementBrowser' => [ > 'disabled' => false, > ], > ], > ] > ], > > - ❓But the table list under the field gives the editor the info, which types of allowed tables can be added. **Is this really what we want?** > > - ℹ️The actual approach is somehow breaking the UI from a editor's perspective. > - ❔What about removing the link of table list items instead of hiding them completely? You are right. We should not remove this information but just disable the element browser link. I changed the patch accordingly. Please have a look again.
  9. TYPO3com voted on patch set 3 V +1 04/06/20, 06:51 Completed build in 12m 15s on Mon, 6 Apr, 06:51 AM Test Summary: 73366 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2213

  10. Josef Glatz commented on patch set 3 CR -1 04/15/20, 20:29

    on it
  11. Josef Glatz uploaded patch set 4 04/15/20, 21:24

  12. Josef Glatz commented on patch set 4 V +1 CR +1 04/15/20, 21:31

    > Patch Set 3: Code-Review-1 > > on it To make it more accessible I removed CSS classes .btn.btn-default.disabled because this irritates the editor with the hover effect. The reduced opacity also prevents the text from being consumed from the point of view of accessibility. Therefore the allowed types are no listed without .btn styling at all without interactivity. There is room for discussions about the CSS classes. I'm also happy if the majority wants an explicit CSS class for this specific style instead of the generic classes in patch set 4.
  13. TYPO3com voted on patch set 4 V +1 04/15/20, 21:35 Completed build in 11m 27s on Wed, 15 Apr, 09:35 PM Test Summary: 73571 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2617

  14. Andreas Kienast commented on patch set 4 CR -1 04/16/20, 19:30

    TableList.php:64

    Where did you get these classes from? They are not available in the backend.
  15. Josef Glatz commented on patch set 4 V 0 CR -1 04/17/20, 04:07

    TableList.php:64 Reply

    > Where did you get these classes from? They are not available in the backend. Please read my previous comment. I've added them as well in the patch. As mentioned in my comment: I'm also happy if we decide to add a new specific CSS class instead for such purpose. E.g. `.tablelist-item-disabled`. Please check my screenshot https://slack-files.com/T024TUMLZ-F011QGTL1FG-704353c403 if you didn't tried it in your local TYPO3 instance. > The important thing is, that we must try to be accessible from an UI perspective. We have no generic CSS classes so far for that. I will push a new patch set to switch away from the newly added (inspired by bootstrap 4) CSS classes.
  16. Josef Glatz uploaded patch set 5 04/17/20, 05:41

  17. Josef Glatz commented on patch set 5 V +1 CR +1 04/17/20, 05:48

    Patch set 5 does visually the same. I've checked also against the element group of ext:styleguide e.g. when there is a active records list afterwards. I will create and publish a pull request for ext:styleguide after merging the patch to add also such a scenario.

    TableList.php:64 Reply

    Done. I've changed that to a specific CSS class in the scope of the existing parent CSS element selector.
  18. TYPO3com voted on patch set 5 V +1 04/17/20, 05:53 Completed build in 11m 15s on Fri, 17 Apr, 05:53 AM Test Summary: 73561 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2680

  19. Oli Bartsch voted on patch set 5 V +1 CR +1 04/17/20, 06:03

  20. Benni Mack voted on patch set 5 V +2 CR +2 05/04/20, 07:37

  21. Benni Mack merged patch set 6 05/04/20, 07:37