Review main Merged

85217[BUGFIX] Properly handle boolean attribute in language packs

Oli Bartsch CR +2 V +2 Easy +6 −5 updated 07/12/24, 06:59

Commit message

When using boolean attributes there are two things to
consider:

1. The default value must be FALSE
2. Presence of the attribute always means TRUE

It's therefore not possible to have a boolean
attribute, which defaults to TURE and it's
also not possible to set an attribute to
FALSE via its value (e.g. "0" or "false).

See for reference: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes

Therefore, to properly handle the "is writeable"
state in the language packs module, the
default is set to FALSE an the attribute
only gets added (which defines the TRUE state)
in case corresponding data attribute is
set in the template.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 810

  1. Oli Bartsch uploaded patch set 1 07/10/24, 13:59

  2. core-ci voted on patch set 1 V +1 07/10/24, 14:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61321

  3. Andreas Kienast commented on patch set 1 07/10/24, 14:15

    LanguagePacks.html:15

    I think having the data attribute always is fine, we just have to keep the `setAttribute()` handling in `install/module/maintenance/language-packs.ts`.
  4. Oli Bartsch uploaded patch set 2 V +1 07/10/24, 14:24

  5. Oli Bartsch commented on patch set 2 07/10/24, 14:25

    LanguagePacks.html:15 Reply

    Done
  6. Andreas Kienast voted on patch set 2 CR +1 V +1 07/10/24, 14:25

  7. core-ci voted on patch set 2 V +1 07/10/24, 14:29 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61323

  8. Christian Kuhn voted on patch set 2 CR +1 V +1 07/11/24, 19:19

  9. Oli Bartsch voted on patch set 2 CR +2 V +2 07/12/24, 06:48

  10. Oli Bartsch merged patch set 3 07/12/24, 06:59