Review main Merged

81176[BUGFIX] Show but preserve invalid classes in link-browser

Benjamin Franzke CR +2 V +2 Normal +57 −23 updated 09/26/23, 08:20

Commit message

In case a link with an invalid CSS class is edited,
the class value is not simply invalidated and shown
as empty (which isn't true), but a virtual select option
"[ INVALID VALUE (…) ]" is added (and selected) that
documents the fact that the current value invalid,
but will be preserved upon updates. (as in FormEngine)

This allows the editor to choose between preserving,
removing or changing to another css class value.

With this change applied, we can not properly
remove empty value. Note that empty values previously
implicitly preserved existing values, which made
it impossible to remove a link title or target.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Stefan Bürk +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Stefan Bürk +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 2

Files 5

Review log 1012

  1. Benjamin Franzke uploaded patch set 1 09/22/23, 10:38

  2. core-ci voted on patch set 1 V +1 09/22/23, 10:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47082

  3. Andreas Kienast commented on patch set 1 09/25/23, 09:01

    BrowseLinksController.php:173

    PhpStorm suggests to use this instead (I know this changed in another patch already): ``` if ( isset($classesAnchor[$this->displayedLinkHandlerId]) && in_array($linkClass, $classesAnchor['all'], true) && !in_array($linkClass, $classesAnchor[$this->displayedLinkHandlerId], true) ) { /* ... */ } ```
  4. Benjamin Franzke uploaded patch set 2 V +1 09/25/23, 09:22

  5. Benjamin Franzke commented on patch set 2 09/25/23, 09:22

    BrowseLinksController.php:173 Reply

    Done
  6. core-ci voted on patch set 2 V +1 09/25/23, 09:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/47139

  7. Andreas Kienast voted on patch set 2 V +1 CR +1 09/25/23, 09:37

  8. Benjamin Franzke voted on patch set 2 V +2 CR +2 09/25/23, 10:08

  9. Benjamin Franzke voted on patch set 2 V 0 CR 0 09/25/23, 10:08

  10. Stefan Bürk voted on patch set 2 V +1 CR +1 09/26/23, 07:55

  11. Benjamin Franzke voted on patch set 2 V +2 CR +2 09/26/23, 08:20

  12. Benjamin Franzke merged patch set 3 09/26/23, 08:20