Review main Merged

70977[FEATURE] Introduce <f:transform.html> view-helper

Oliver Hader CR +2 V +2 Hard +679 −1 updated 09/20/21, 08:07

Commit message

Introduces `<f:transform.html>` view-helper, providing capabilities
to resolves system internal links, like `t3://`.

Example:

   <f:transform.html selector="a.href,div.data-uri">
     <a href="t3://page?uid=1" class="page">visit</a>
     <div data-uri="t3://page?uid=1" class="page trigger">visit</div>
   </f:transform.html>

... will be resolved and transformed to the following markup ...

   <a href="https://typo3.localhost/" class="page">visit</a>
   <div data-uri="https://typo3.localhost/" class="page trigger">
     visit</div>

Following Composer dependency is made explicit:

  composer req masterminds/html5:'^2.7' ext-dom:'*'

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Lina Wolf +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Lina Wolf +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 3755

Show 1830 earlier messages
  1. Oliver Hader uploaded patch set 1 09/08/21, 21:59

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

  3. Oliver Hader uploaded patch set 2 09/10/21, 13:23

  4. Oliver Hader updated the commit message in patch set 3 09/10/21, 13:24

  5. core-ci voted on patch set 3 V +1 09/10/21, 13:49 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16485

  6. core-ci voted on patch set 2 V +1 09/10/21, 13:55 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16484

  7. Oliver Hader uploaded patch set 4 09/10/21, 13:55

  8. Oliver Hader uploaded patch set 5 09/10/21, 14:04

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

  10. core-ci voted on patch set 5 V +1 09/10/21, 14:26 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16490

  11. Chris Müller commented on patch set 5 09/10/21, 19:24

    Feature-95176-IntroduceFtransformhtmlView-helper.rst:46

    I assume, this should be div.data-uri instead of p.data-uri?
  12. Oliver Hader updated the commit message in patch set 6 09/10/21, 20:01

  13. Oliver Hader commented on patch set 7 09/10/21, 20:02

    Published edit on patch set 6.
  14. Oliver Hader commented on patch set 7 09/10/21, 20:03

    Feature-95176-IntroduceFtransformhtmlView-helper.rst:46 Reply

    Correct, thx! Patch was adjusted
  15. core-ci voted on patch set 6 V +1 09/10/21, 20:17 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16511

  16. core-ci voted on patch set 7 V +1 09/10/21, 20:24 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16512

  17. Sybille Peters uploaded patch set 8 09/12/21, 07:36

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

  19. Sybille Peters commented on patch set 8 09/12/21, 08:10

    composer.json:42

    This patch changes the core extension "fluid". Shouldn't the changes in composer.json be done in the composer.json of that extension (instead of in core extension)? Even though you will most likely always use fluid, it seems a bit "cleaner" that way.
  20. Benni Mack commented on patch set 8 09/13/21, 13:14

    HtmlViewHelper.php:154

    how about moving this logic to EXT:frontend (e.g. "LinkGenerator") and have the VH only access the API class? This way, we could use this in other places too
  21. Oliver Hader commented on patch set 8 09/14/21, 07:06

    composer.json:42 Reply

    `masterminds/html5` is implicitly used by `typo3/html-sanitizer` already in `typo3/cms-core`. This change just makes the requirement explicit.

    HtmlViewHelper.php:154 Reply

    Hm... difficult with naming, "generator", "builder", "service"... What about `TYPO3\CMS\Frontend\TypoLink\LinkResultFactory::fromUri($uri)`?
  22. Oliver Hader uploaded patch set 9 09/14/21, 07:40

  23. Oliver Hader uploaded patch set 10 09/14/21, 07:47

  24. core-ci voted on patch set 9 V +1 09/14/21, 07:53 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16685

  25. core-ci voted on patch set 10 V +1 09/14/21, 08:10 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16686

  26. Oliver Hader uploaded patch set 11 09/14/21, 20:27

  27. Oliver Hader uploaded patch set 12 09/14/21, 20:30

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

  29. core-ci voted on patch set 12 V +1 09/14/21, 20:45 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16722

  30. Oliver Hader commented on patch set 12 09/14/21, 20:53

    HtmlViewHelperTest.php:99

    Not sure whether invalid page uid values, should be removed (blank string) or kept (passed through)...
  1. Benni Mack commented on patch set 12 09/16/21, 10:19

    HtmlViewHelperTest.php:99 Reply

    TYPO3 usually removes the <a>Blabla</a> and just writes "Blabla" then (default behaviour in frontend)
  2. Oliver Hader commented on patch set 12 09/16/21, 12:22

    HtmlViewHelperTest.php:99 Reply

    I read that as "yes, make sure invalid URIs are removed"...
  3. Oliver Hader uploaded patch set 13 09/16/21, 12:32

  4. core-ci voted on patch set 13 V +1 09/16/21, 12:49 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16798

  5. Benni Mack commented on patch set 13 09/16/21, 15:13

    HtmlViewHelper.php:154 Reply

    Done

    HtmlViewHelperTest.php:99 Reply

    No, it does not add the <a> tag at all. just "visit"
  6. Oliver Hader uploaded patch set 14 09/17/21, 20:33

  7. Oliver Hader commented on patch set 14 09/17/21, 20:34

    HtmlViewHelperTest.php:99 Reply

    Okay... added a new behavior `removeEnclosure` which does exactly this...
  8. Oliver Hader commented on patch set 14 09/17/21, 20:42

    composer.json:42 Reply

    Done

    HtmlViewHelperTest.php:99 Reply

    Done
  9. core-ci voted on patch set 14 V -1 09/17/21, 20:50 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16892

  10. Oliver Hader uploaded patch set 15 09/17/21, 20:55

  11. core-ci voted on patch set 15 V +1 09/17/21, 21:09 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16894

  12. Lina Wolf commented on patch set 15 CR -1 09/19/21, 13:31

    Working on this
  13. Lina Wolf uploaded patch set 16 09/19/21, 13:36

  14. Lina Wolf commented on patch set 16 V +1 09/19/21, 13:47

    I tried it out by integrating the example from the Changelog into the template of the site_package example extension. Worked fine.
  15. Lina Wolf commented on patch set 16 CR +1 09/19/21, 13:49

    The code looks fine to me, but someone else should have a look
  16. core-ci voted on patch set 16 V +1 09/19/21, 13:51 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16918

  17. Oliver Hader commented on patch set 17 09/19/21, 14:09

    Published edit on patch set 16.
  18. Oliver Hader commented on patch set 18 09/19/21, 14:10

    Published edit on patch set 17.
  19. core-ci voted on patch set 18 V +1 09/19/21, 14:25 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16920

  20. core-ci voted on patch set 17 V +1 09/19/21, 14:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16919

  21. Benni Mack voted on patch set 18 V +1 CR +1 09/20/21, 07:33

  22. Lina Wolf commented on patch set 18 CR +1 09/20/21, 07:55

    Code Looks good to me
  23. Lina Wolf commented on patch set 18 V +1 09/20/21, 07:57

    And works ok as described above
  24. Oliver Hader voted on patch set 18 V +2 CR +2 09/20/21, 08:07

  25. Oliver Hader merged patch set 19 09/20/21, 08:07