Review main Merged

69899[FEATURE] Introduce TCA type "category"

Oli Bartsch CR +2 V +2 Nightmare +5114 −298 updated 12/10/21, 15:16

Commit message

A new TCA type "category" is introduced, which
allows to simplify the configuration of category
TCA columns. Besides the benefit for integrators,
this allows to deprecate the CategoryRegistry
in the next step.

The new type can also be used for other use cases.
Therefore, the TCA option "relationship" is available
for this TCA type. Besides "manyToMany" (default), this
can also be set to "oneToOne" or "oneToMany".

Using the new type, FormEngine will always render a
category tree. This means, no additional `renderType`
is defined. In such case, TCA type "select" can
still be used as before, without any limitation. However,
all relevant places in core are adjusted in this patch.

The category element is rendered through a custom element
(web component), reducing inline javascript.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 104

Show 84 more files

Review log 5391

Show 3666 earlier messages
  1. Oli Bartsch uploaded patch set 1 07/16/21, 14:48

  2. core-ci voted on patch set 1 V -1 07/16/21, 16:59 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13394

  3. Oli Bartsch uploaded patch set 2 07/17/21, 00:59

  4. Oli Bartsch uploaded patch set 3 07/17/21, 01:03

  5. core-ci voted on patch set 2 V -1 07/17/21, 01:07 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13406

  6. core-ci voted on patch set 3 V -1 07/17/21, 01:15 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13407

  7. Oli Bartsch uploaded patch set 4 07/20/21, 12:06

  8. core-ci voted on patch set 4 V -1 07/20/21, 12:22 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13603

  9. Oli Bartsch uploaded patch set 5 07/20/21, 13:04

  10. core-ci voted on patch set 5 V -1 07/20/21, 13:13 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13604

  11. Oli Bartsch uploaded patch set 6 07/20/21, 13:49

  12. core-ci voted on patch set 6 V -1 07/20/21, 14:07 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13605

  13. Oli Bartsch uploaded patch set 7 07/22/21, 13:05

  14. core-ci voted on patch set 7 V -1 07/22/21, 13:20 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13665

  15. Oli Bartsch uploaded patch set 8 07/22/21, 15:30

  16. Oli Bartsch uploaded patch set 9 07/22/21, 15:44

  17. core-ci voted on patch set 8 V -1 07/22/21, 15:45 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13672

  18. core-ci voted on patch set 9 V -1 07/22/21, 16:06 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13675

  19. Oli Bartsch uploaded patch set 10 07/23/21, 11:07

  20. core-ci voted on patch set 10 V -1 07/23/21, 11:24 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13687

  21. Oli Bartsch uploaded patch set 11 07/23/21, 11:40

  22. core-ci voted on patch set 11 V -1 07/23/21, 11:56 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13688

  23. Oli Bartsch uploaded patch set 12 07/23/21, 11:57

  24. core-ci voted on patch set 12 V -1 07/23/21, 12:19 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13689

  25. Oli Bartsch uploaded patch set 13 07/26/21, 14:13

  26. core-ci voted on patch set 13 V -1 07/26/21, 14:28 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13761

  27. Oli Bartsch uploaded patch set 14 07/26/21, 14:51

  28. core-ci voted on patch set 14 V -1 07/26/21, 15:25 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13767

  29. Benni Mack commented on patch set 14 07/26/21, 18:59

    Thanks for this work. Some remarks: - Instead of "dbType" let's use "relationship" and use "oneToOne" (= single), "oneToMany" (= csv) and "manyToMany" (= lookupTable) as values. - we should get rid of "foreign_table_where" and use the `sys_language_uid IN (0, -1) or l10n_parent=0` in the TcaPreparations logic by default. IMHO we should only allow a logic similar to "itemsProcFunc". - when using "oneToOne" and "maxitems>1" a RuntimeException should be thrown, same with "oneToMany" and "maxitems=1"
  30. Oli Bartsch uploaded patch set 15 07/26/21, 22:48

  31. core-ci voted on patch set 15 V -1 07/26/21, 23:03 Core CI is not happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/13786

  32. Oli Bartsch uploaded patch set 16 07/27/21, 09:48

  33. Oli Bartsch commented on patch set 16 07/27/21, 09:57

    Reply

    Done
  34. core-ci voted on patch set 16 V -1 07/27/21, 10:01 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13800

  35. Benni Mack commented on patch set 16 07/27/21, 12:46

    tt_content.php:341

    this feels wrong

    tt_content.php:1198

    this feels wrong
  36. Benni Mack commented on patch set 16 07/27/21, 13:08

    I think this looks really great. We should deprecate CategoryRegistry and "defaultCategorizedTables" as well. fine with me if we do this in antoher patch, but we should mention this in the RST file.
  37. Oli Bartsch uploaded patch set 17 07/27/21, 14:36

  38. core-ci voted on patch set 17 V -1 07/27/21, 14:50 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13813

  39. Oli Bartsch uploaded patch set 18 07/27/21, 20:18

  40. Oli Bartsch commented on patch set 18 07/27/21, 20:19

    Reply

    Added an information to the RST.

    tt_content.php:341 Reply

    Done

    tt_content.php:1198 Reply

    Done
  41. core-ci voted on patch set 18 V -1 07/27/21, 20:33 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13823

  42. Oli Bartsch uploaded patch set 19 07/27/21, 21:26

  43. core-ci voted on patch set 19 V -1 07/27/21, 21:41 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13824

  44. Oli Bartsch uploaded patch set 20 07/28/21, 11:14

  45. core-ci voted on patch set 20 V -1 07/28/21, 11:29 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13838

  46. Oli Bartsch uploaded patch set 21 07/28/21, 13:10

  47. core-ci voted on patch set 21 V -1 07/28/21, 13:23 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13844

  48. Oli Bartsch uploaded patch set 22 07/28/21, 14:45

  49. core-ci voted on patch set 22 V +1 07/28/21, 14:57 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13848

  50. Oli Bartsch uploaded patch set 23 07/28/21, 15:48

  51. core-ci voted on patch set 23 V +1 07/28/21, 16:04 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13849

  52. Oli Bartsch uploaded patch set 24 07/29/21, 00:10

  53. core-ci voted on patch set 24 V -1 07/29/21, 00:22 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13861

  54. Oli Bartsch uploaded patch set 25 07/29/21, 09:59

  55. core-ci voted on patch set 25 V +1 07/29/21, 10:17 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13866

  56. Oli Bartsch uploaded patch set 26 07/29/21, 11:51

  57. core-ci voted on patch set 26 V -1 07/29/21, 12:22 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13876

  58. core-ci voted on patch set 26 V +1 07/29/21, 12:35 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13876

  59. Oli Bartsch uploaded patch set 27 07/29/21, 14:14

  60. core-ci voted on patch set 27 V +1 07/29/21, 14:35 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13882

  61. Oli Bartsch uploaded patch set 28 07/29/21, 16:04

  62. core-ci voted on patch set 28 V +1 07/29/21, 16:24 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13893

  63. Oli Bartsch uploaded patch set 29 07/29/21, 21:38

  64. core-ci voted on patch set 29 V -1 07/29/21, 21:55 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13910

  65. Oli Bartsch uploaded patch set 30 07/29/21, 22:58

  66. Oli Bartsch uploaded patch set 31 07/29/21, 23:01

  1. core-ci voted on patch set 30 V -1 07/29/21, 23:17 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13911

  2. core-ci voted on patch set 31 V +1 07/29/21, 23:22 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13912

  3. Oli Bartsch uploaded patch set 32 07/29/21, 23:56

  4. core-ci voted on patch set 32 V +1 07/30/21, 00:07 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13913

  5. Oli Bartsch uploaded patch set 33 07/30/21, 12:22

  6. core-ci voted on patch set 33 V +1 07/30/21, 12:37 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13922

  7. Benni Mack voted on patch set 33 V +1 CR +1 07/30/21, 12:38

  8. Christian Kuhn commented on patch set 33 CR -1 07/30/21, 13:11

    reviewing - would like to have a more detailed look at this.
  9. Christian Kuhn commented on patch set 33 07/30/21, 15:43

    will push changes.

    TcaPreparation.php:54

    rephrasing would be good.

    TcaPreparation.php:63

    should be dropped.

    TcaPreparation.php:88

    rephrase code.

    TcaPreparation.php:92

    Force

    TcaPreparation.php:97

    relationship should throw if not one of the 3 allowed values.

    TcaPreparation.php:134

    should have a todo, that it would be better if oneToOne without a connected category should be NULL, not 0. For manyToMany 0 is ok as default, since it's the "count" connected things.

    Feature-94622-NewTCATypeCategory.rst:127

    ... non-e- is defined ...
  10. Christian Kuhn uploaded patch set 34 08/02/21, 10:56

  11. Christian Kuhn commented on patch set 34 08/02/21, 10:56

    TcaPreparation.php:54 Reply

    Done

    TcaPreparation.php:63 Reply

    Done

    TcaPreparation.php:88 Reply

    Done

    TcaPreparation.php:92 Reply

    Done

    TcaPreparation.php:97 Reply

    Done

    TcaPreparation.php:134 Reply

    Done

    Feature-94622-NewTCATypeCategory.rst:127 Reply

    Done
  12. core-ci voted on patch set 34 V -1 08/02/21, 10:58 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13983

  13. Christian Kuhn uploaded patch set 35 08/02/21, 11:24

  14. core-ci voted on patch set 35 V +1 08/02/21, 11:52 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13988

  15. Christian Kuhn voted on patch set 35 V +1 CR +1 08/02/21, 11:54

  16. Christian Kuhn voted on patch set 35 V 0 CR 0 08/02/21, 12:01

  17. Christian Kuhn voted on patch set 35 CR -1 08/02/21, 12:01

  18. Christian Kuhn uploaded patch set 36 08/02/21, 12:08

  19. core-ci voted on patch set 36 V -1 08/02/21, 12:11 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13991

  20. Christian Kuhn uploaded patch set 37 08/02/21, 12:21

  21. core-ci voted on patch set 37 V +1 08/02/21, 12:34 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/13993

  22. Christian Kuhn voted on patch set 37 V +1 CR +1 08/02/21, 12:50

  23. Benni Mack voted on patch set 37 V +2 CR +2 08/02/21, 14:36

  24. Benni Mack merged patch set 38 08/02/21, 14:36

  25. Benjamin Franzke commented on patch set 38 12/10/21, 15:16

    CategoryTreeElement.js:1 Unresolved

    This file is stray (no sources are present and it is unused). Removal here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69899