Review main Merged

84622[TASK] Render meta tag twitter:card only if required

Georg Ringer CR +2 V +2 Easy +37 −4 updated 06/13/24, 13:35

Commit message

Instead of rendering the tag meta tag `twitter:card` always it is now
only rendered if either one of the twitter fields is filled or
the twitter card attribute is selected in the page record.

Additionally the default value is now set to an empty string

This leads to one markup line less for most of the pages.

Review

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

Issues 1

Files 3

Review log 1113

  1. Georg Ringer uploaded patch set 1 06/11/24, 16:57

  2. Georg Ringer commented on patch set 1 06/11/24, 16:57

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 06/11/24, 17:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59218

  4. Garvin Hicking commented on patch set 1 06/11/24, 17:48

    If I read this right its not really breaking, right? Or could a html output make sense with just a "twitter:card=summary" and nothing else? I haven't follow what this Exxxxitr mess turned out with API usage and what it even evaluates. $0.02 Personally ai'd rather get rid of all these twitter specialties ;))

    Important-101621-ChangedDefaultValueForTwitter_cardField.rst:17

    Space after ' seems to be missing?

    MetaTagGenerator.php:103

    I think this needs to be inside the foreach loop so it only gets set when the property is used?
  5. Georg Ringer commented on patch set 1 06/11/24, 17:53

    Reply

    twitter:card=summary alone doesn't make sense
  6. Georg Ringer uploaded patch set 2 V +1 06/11/24, 17:54

  7. core-ci voted on patch set 2 V +1 06/11/24, 18:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59227

  8. Garvin Hicking commented on patch set 2 CR +1 V +1 06/11/24, 19:10

    Reply

    Ah I see now. "summary" was the default, but is also the twitter default if you don't specify anything else.

    Important-101621-ChangedDefaultValueForTwitter_cardField.rst:17 Reply

    Done

    MetaTagGenerator.php:103 Reply

    Done
  9. Benni Mack commented on patch set 2 CR +1 V +1 06/13/24, 13:33

    very useful
  10. Benni Mack voted on patch set 2 CR +2 06/13/24, 13:33

  11. Benni Mack voted on patch set 2 V +2 06/13/24, 13:33

  12. Benni Mack merged patch set 3 06/13/24, 13:34

  13. Kevin Appelt commented on patch set 3 06/13/24, 13:35

    Unresolved

    Currently the change only relies on twitter:title, twitter:description and twitter:image to be present, but Twitter/X also uses og:title, og:description and og:image as a fallback if the twitter equivalent is not present!