Review main Merged

78943[BUGFIX] Change selector to get container in `files` element

Andreas Kienast CR +2 V +2 Easy +2 −2 updated 05/05/23, 09:26

Commit message

The identifier used to get a container in `type=files` based on
`querySelector()` which flawed if the identifier contained a dot.
The example identifier "#foo-data-foo.bar" resulted in "find an
element with id 'foo-data-foo', having the class 'bar'", which
is wrong.

To solve this issue, while still limiting the scope to the web
component, the selector is changed to use the `[id='']` syntax,
which doesn't show the erroneous behavior.

Review

  • Code review CR +2 Done
    • Nikita Hovratov +2
    • Oli Bartsch +1
  • Verified V +2 Done
    • Nikita Hovratov +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 911

  1. Andreas Kienast uploaded patch set 1 05/05/23, 07:17

  2. core-ci voted on patch set 1 V +1 05/05/23, 07:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41596

  3. Nikita Hovratov voted on patch set 1 V +1 CR +1 05/05/23, 07:56

  4. Markus Klein voted on patch set 1 V +1 CR +1 05/05/23, 07:59

  5. Oli Bartsch commented on patch set 1 05/05/23, 08:33

    files-control-container.ts:142

    What about using "<HTMLElement>this.querySelector('[id=\'' + identifier + '\']')" to still limit the scope to "this"?
  6. Andreas Kienast commented on patch set 1 CR -1 05/05/23, 08:36

    files-control-container.ts:142 Reply

    That _could_ work, I have to check this. This also affects `inline-control-container.ts` then, will give a temp -1.
  7. Oli Bartsch uploaded patch set 2 CR +1 V +1 05/05/23, 09:12

  8. Oli Bartsch commented on patch set 2 V +1 CR +1 05/05/23, 09:13

    files-control-container.ts:142 Reply

    As discussed in slack, inline control container is not affected since it's no web component.
  9. core-ci voted on patch set 2 V +1 05/05/23, 09:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/41604

  10. Nikita Hovratov voted on patch set 2 V +2 CR +2 05/05/23, 09:22

  11. Nikita Hovratov merged patch set 3 05/05/23, 09:26