86685[BUGFIX] Scroll element into view when reviewing FormEngine field
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Benjamin Franzke +1
- Garvin Hicking +1
- Sebastian Iffland +1
-
Verified V +2 Done
- Andreas Kienast +2
- Benjamin Franzke +1
- Garvin Hicking +1
- core-ci +1 CI
Issues 1
Files 4
Review log 2227
Show 12 earlier messages
-
Andreas Kienast uploaded patch set 1 10/22/24, 05:49
-
core-ci voted on patch set 1 V +1 10/22/24, 05:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68349
-
Garvin Hicking voted on patch set 1 CR +1 V +1 10/22/24, 06:47
-
Simon Schaufelberger commented on patch set 1 10/22/24, 07:23
how can this be reproduced? there is no clear description in the issue tracker. -
Garvin Hicking commented on patch set 1 10/22/24, 07:43
Reply
You can reproduce this for example with the EXT:styleguide "required" record tree. Create a new record that has at least one required field (that 'required' TCA styleguide example has several). You should then see a "i" element in the top right bar of the top section, right next to the "Share backend URL" one. This is the "FormEngine review" button. Clicking on it will reveal a list of all failed fields. Clicking on a field in this list will open the formengine tab and focus the field. This works for all input fields. For trees or inline field containers, without this patch, the focus will not scroll an element in the view. With the patch applied, the focussing will be done on the main failure element level and scroll it into view, so that a "missing" focus will not be a problem anymore. Two notes: First: The "i" info button sometimes doesn't occur. Re-forcing validation (by filling out a field and then making it fail again) should re-trigger this. That race condition is beyond the scope of this patch. Second: The review list of many items is currently not scrollable, also beyond the scope of this patch. Thanks for taking the time to review this, hope it helps. -
Andreas Kienast uploaded patch set 2
CR +1V +110/31/24, 11:29 -
core-ci voted on patch set 2 V +1 10/31/24, 11:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68913
-
Sebastian Iffland voted on patch set 2 CR +1 11/04/24, 07:38
-
Garvin Hicking voted on patch set 2 CR +1 V +1 11/04/24, 08:21
-
Benjamin Franzke commented on patch set 2 CR -1 11/04/24, 10:23
dom-helper.ts:53better rename to `centerIfNeeded` to match https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoViewIfNeeded#centerifneeded (?)dom-helper.ts:57`scrollIntoView` argument is not center, but `alignToTop`, see: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView#aligntotop IMO we should call it without any arguments and ignore this parameter. -
Andreas Kienast commented on patch set 2 11/04/24, 10:36
dom-helper.ts:57ReplyPerhaps we should drop the argument in general, also for `scrollIntoViewIfNeeded` (or hardcode to center), I'm not a big fan of having an argument suited for a single case only for such a small wrapper. -
Sebastian Iffland commented on patch set 2 11/04/24, 10:47
dom-helper.ts:57ReplyEven-though method is never called changing parameter (if read right) and `true` defaults to both methods' first argument, I'd argue +1 for omit arguments at all. -
Andreas Kienast uploaded patch set 3
CR +1V +111/04/24, 12:09 -
core-ci voted on patch set 3 V +1 11/04/24, 12:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69030
-
Benjamin Franzke commented on patch set 3 CR +1 11/04/24, 12:52
dom-helper.ts:53ReplyDonedom-helper.ts:57ReplyDone -
Sebastian Iffland voted on patch set 3 CR +1 11/04/24, 12:58
-
Benjamin Franzke voted on patch set 3 V +1 11/04/24, 12:59
-
Andreas Kienast uploaded patch set 4
CR +1V +111/04/24, 13:44 -
Garvin Hicking voted on patch set 4 CR +1 V +1 11/04/24, 13:47
-
core-ci voted on patch set 4 V +1 11/04/24, 13:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69036
-
Andreas Kienast uploaded patch set 5
CR +1V +111/04/24, 14:49 -
Sebastian Iffland voted on patch set 5 CR +1 11/04/24, 14:54
-
core-ci voted on patch set 5 V +1 11/04/24, 14:56 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/69039
-
Benjamin Franzke voted on patch set 5 CR +1 V +1 11/04/24, 15:21
-
Garvin Hicking voted on patch set 5 CR +1 V +1 11/05/24, 14:25
-
Andreas Kienast voted on patch set 5 CR +2 V +2 11/05/24, 14:26
-
Andreas Kienast merged patch set 6 11/05/24, 14:44