Review main Merged

70884[FEATURE] Introduce Bootstrap 5 compatible and accessible templates

rgropp CR +2 V +2 Expert +1180 −6 updated 10/01/21, 13:33

Commit message

The form framework now provides Bootstrap 5 compatible templates.
The markup has been completely reworked, unnecessary nesting layers
have been removed and semantically more meaningful HTML tags are used.
The templates were also improved in the area of accessibility.

In the course of Bootstrap 5 compatibility two new breakpoints "xl" and
"xxl" were added to the grid configuration.

All hardcoded CSS classes in the templates have been moved to the
configuration. This simplifies the integration of the frontend. The
change makes it easier for integrators to make upgrades of the
frontend framework. In most cases, it is now no longer necessary to
override a template for changes to classes. Instead, it is only
necessary to add the appropriate CSS classes to the form
configuration.

In order not to be breaking, by default the templates are still rendered
as they used to be.

To use the new Bootstrap 5 compatible templates the form rendering option
`templateVariant` must be set from `version1` to `version2`
in your form setup.

Review

  • Code review CR +2 Done
    • waldhacker +2
    • Björn Jacob +1
    • Andreas Steiger +1
    • Oliver Hader +1
  • Verified V +2 Done
    • waldhacker +2
    • Björn Jacob +1
    • Andreas Steiger +1
    • core-ci +1 CI

Issues 3

Files 62

Show 42 more files

Review log 6077

Show 3952 earlier messages
  1. rgropp uploaded patch set 1 09/03/21, 13:57

  2. core-ci voted on patch set 1 V -1 09/03/21, 14:20 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16187

  3. Paul H commented on patch set 1 09/03/21, 14:46

    Would you consider splitting the BS5/breakpoint changes from the a11y-related ones? It is harder to review and refine the a11y improvements. Regarding the additional breakpoints and form editor UX, do typical editors need so many options in the form editor?
  4. waldhacker uploaded patch set 2 09/03/21, 14:51

  5. Paul H commented on patch set 2 09/03/21, 14:54

  6. core-ci voted on patch set 2 V -1 09/03/21, 15:20 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16199

  7. Björn Jacob commented on patch set 2 09/03/21, 21:24

    Reply

    Exactly, as soon as the other patch is merged, this one is smaller 😊
  8. waldhacker commented on patch set 2 CR -1 09/04/21, 08:19

    I'm afraid we can only include this with the launch of v12. The changes are too breaking and can therefore no longer be included in the current release cycle.
  9. waldhacker commented on patch set 2 09/04/21, 11:05

    on it
  10. waldhacker uploaded patch set 3 09/04/21, 14:09

  11. waldhacker updated the commit message in patch set 4 09/04/21, 14:14

  12. waldhacker commented on patch set 4 09/04/21, 14:20

    Reply

    Sorry, now its bigger 🐨
  13. core-ci voted on patch set 3 V +1 09/04/21, 14:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16251

  14. core-ci voted on patch set 4 V +1 09/04/21, 14:32 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16252

  15. Björn Jacob updated the commit message in patch set 5 09/04/21, 20:32

  16. core-ci voted on patch set 5 V +1 09/04/21, 20:48 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16272

  17. Björn Jacob commented on patch set 5 09/04/21, 21:15

    Hidden.yaml:76

    Can be removed IMHO.

    StaticText.yaml:43

    Correct condition missing, or am I wrong?
  18. Björn Jacob uploaded patch set 6 09/04/21, 22:01

  19. Björn Jacob commented on patch set 6 CR -1 09/04/21, 22:10

    Not ready yet. I am working on the rsts and some questions are open. I am in dialog with Ralf.
  20. core-ci voted on patch set 6 V +1 09/04/21, 22:14 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16273

  21. waldhacker uploaded patch set 7 09/05/21, 06:56

  22. waldhacker commented on patch set 7 09/05/21, 07:00

    Hidden.yaml:76 Reply

    I think it's ok to give integrators the ability to write a class to the element. Integrators may want to select the element e.g. via JavaScript based on the class.

    StaticText.yaml:43 Reply

    Good catch!
  23. waldhacker voted on patch set 7 CR -1 09/05/21, 07:00

  24. core-ci voted on patch set 7 V +1 09/05/21, 07:13 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16278

  25. waldhacker uploaded patch set 8 09/05/21, 08:22

  26. waldhacker voted on patch set 8 CR -1 09/05/21, 08:23

  27. core-ci voted on patch set 8 V +1 09/05/21, 08:40 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16280

  28. waldhacker voted on patch set 8 CR 0 09/05/21, 08:42

  29. Björn Jacob updated the commit message in patch set 9 09/05/21, 19:53

  30. Björn Jacob uploaded patch set 10 09/05/21, 20:03

  31. Björn Jacob voted on patch set 10 V +1 CR +1 09/05/21, 20:04

  32. core-ci voted on patch set 9 V +1 09/05/21, 20:08 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16292

  33. core-ci voted on patch set 10 V +1 09/05/21, 20:18 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16293

  34. Björn Jacob uploaded patch set 11 09/05/21, 20:39

  35. Björn Jacob voted on patch set 11 V +1 CR +1 09/05/21, 20:39

  36. core-ci voted on patch set 11 V +1 09/05/21, 20:56 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16295

  37. waldhacker commented on patch set 12 09/06/21, 06:40

    Published edit on patch set 11.
  38. Björn Jacob voted on patch set 12 V +1 CR +1 09/06/21, 06:56

  39. core-ci voted on patch set 12 V +1 09/06/21, 07:07 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16300

  40. waldhacker voted on patch set 12 V +1 CR +1 09/06/21, 07:16

  41. waldhacker uploaded patch set 13 09/06/21, 08:56

  42. rgropp voted on patch set 12 V +1 CR +1 09/06/21, 09:12

  43. core-ci voted on patch set 13 V +1 09/06/21, 09:13 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16312

  44. rgropp voted on patch set 13 V +1 CR +1 09/06/21, 09:13

  45. waldhacker voted on patch set 13 V +1 CR +1 09/06/21, 09:13

  46. Björn Jacob voted on patch set 13 V +1 CR +1 09/06/21, 09:14

  47. Oli Bartsch commented on patch set 13 CR -1 09/06/21, 10:17

    RST files have to be moved to 11.4/ since https://review.typo3.org/c/Packages/TYPO3.CMS/+/70888/ got merged.

    Deprecation-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates:33

    I don't use bootstrap in frontend. EXT:form does also not provide the necessary stylesheets for the classes, which are set by default in the configuration. If I get the patch right, this now means, to prevent deprecation entires in v11, I have to overwrite each and every field to use my custom framework classes again, right?

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18

    I don't think it's a good idea to use a version number here. Do we rename them again after bootstrap 6 release? Reminds me of customer projects having "Relaunch2018/", "Relaunch2020/", "NewLayout123" as directory names.
  48. Tobias Siegler voted on patch set 13 V +1 CR +1 09/06/21, 10:18

  49. waldhacker commented on patch set 13 09/06/21, 10:27

    Deprecation-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates:33 Reply

    The previous templates were also aligned to bootstrap 3 in terms of classes, regardless of whether bootstrap is used in the frontend or not. We can also remove the deprecation here, but we wanted to use the new templates as default in v12 because they offer better accessibility. Do you have any idea how we could do this without deprecation?

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    We can also use a different naming here. The idea to call it bootstrap5 was exactly that we don't need to use "new" or something like that. If at some point a new template variant is implemented in ext:from, then we could better switch / distinguish based on the explicit namings. Do you have a suggestion for a better naming?
  50. Björn Jacob commented on patch set 13 09/06/21, 10:40

    Deprecation-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates:33 Reply

    Neither the form framework nor the TYPO3 core provide any CSS or JS for the frontend when it comes to FE frameworks. Since the birth of the form framework, we provide templates which are Bootstrap 3 ready. Now, we are switching to Bootstrap 5. If you want to use different classes, adapt the config and the templates accordingly. That is the concept since ever. We don't touch this. No change in functionality. I totally support the current solution of deprecating the old templates for v12. The new templates are highly optimized regarding structure and accessibility. And you don't need to overwrite the templates anymore if you just want to add some more classes or change them etc.

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    The name is IMHO perfect. It describes what it does. Shipping Bootstrap 5 ready templates. Nothing else. And yes: if there is a Bootstrap 6, the changes could be quite big which justifies having new templates in a new folder.
  51. Oli Bartsch commented on patch set 13 09/06/21, 12:09

    Deprecation-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates:33 Reply

    Previously some bootstrap related classes were "hardcoded" in the templates, while by default, "elementClassAttribute" was not set for most of the field types. So, to be able to define custom framework classes (and to do changes to markup structur), templates got overriden. With this change, devs are now forced to set "templateVariant: bootstrap5" even if they do not use bootstrap. Furthermore does this _activate_ the new variant and the bootstrap5 related classes are applied. Devs therefore either have to rewrite the templates again or otherwise have to override each an every field in the configuration to omit the bootstrap5 classes.

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    Won't block this, however still don't see why we have to name the directory this way. I mean, non of the templates use bootstrap classes. They just contain scaffolding, while the attributes get filled by variables. In case those templates only work when assigning bootstrap5 related classes to the variables, this would be another reason to not deprecate the old behaviour.
  52. waldhacker commented on patch set 13 09/06/21, 12:13

    Deprecation-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates:33 Reply

    Maybe we can omit the deprecation and just run both template variants in parallel while the "legacy" templates are still the default?
  1. waldhacker uploaded patch set 14 09/06/21, 12:22

  2. waldhacker commented on patch set 14 09/06/21, 12:30

    Deprecation-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates:33 Reply

    I have removed the deprecation so that from now on both template variants are delivered

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    Ok but do you have any idea how to distinguish "new stuff" from "old stuff" in terms of naming without using something like "Ng" or "New"? I can't think of anything useful right now....
  3. core-ci voted on patch set 14 V +1 09/06/21, 12:37 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16318

  4. Oli Bartsch commented on patch set 14 09/06/21, 13:01

    Deprecation-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates:33 Reply

    All right, feels better now.

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    Don't have any idea currently, sorry. Maybe some term which describes the improvements, referring to a11y, "new" grid and clean templates (no more "hardcoded" classes).
  5. waldhacker commented on patch set 14 09/06/21, 13:21

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    I think then the only thing left is some kind of versioning.... something like "version2"... what do you think?
  6. waldhacker uploaded patch set 15 09/06/21, 13:46

  7. waldhacker commented on patch set 15 09/06/21, 13:48

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    I have renamed the stuff from `legacy` / `bootstrap5` to `version1` / `version2`.
  8. core-ci voted on patch set 15 V +1 09/06/21, 14:11 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16327

  9. waldhacker voted on patch set 15 V +1 CR +1 09/06/21, 14:11

  10. Björn Jacob voted on patch set 15 V +1 CR +1 09/06/21, 14:12

  11. Tobias Siegler voted on patch set 15 V +1 CR +1 09/06/21, 14:48

  12. Björn Jacob commented on patch set 15 09/24/21, 10:10

    Reply

    Done

    Feature-94868-IntroduceBootstrap5CompatibleAndAccessibleTemplates.rst:18 Reply

    Done

    Hidden.yaml:76 Reply

    Done
  13. Oliver Hader commented on patch set 15 09/27/21, 17:53

    The change concerning configuration options has been extracted to https://review.typo3.org/c/Packages/TYPO3.CMS/+/71314 - which makes this change smaller a little bit.
  14. Benni Mack uploaded patch set 16 09/28/21, 09:17

  15. rgropp uploaded patch set 17 09/29/21, 08:30

  16. core-ci voted on patch set 17 V +1 09/29/21, 08:43 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17299

  17. Björn Jacob uploaded patch set 18 09/30/21, 16:33

  18. core-ci voted on patch set 18 V +1 09/30/21, 16:48 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17360

  19. Björn Jacob voted on patch set 18 V +1 CR +1 09/30/21, 17:27

  20. Andreas Steiger commented on patch set 18 V +1 CR +1 10/01/21, 12:44

    really, really nice!
  21. Andreas Steiger commented on patch set 18 10/01/21, 12:46

    Reply

    Done
  22. Oliver Hader voted on patch set 18 CR +1 10/01/21, 13:12

  23. Oliver Hader commented on patch set 18 10/01/21, 13:13

    Please go ahead and merge it
  24. waldhacker voted on patch set 18 V +2 CR +2 10/01/21, 13:31

  25. waldhacker merged patch set 19 10/01/21, 13:33