69037[FEATURE] Add support of readOnly in t3editor
Commit message
Review
-
Code review CR +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
-
Verified V +2 Done
- Benjamin Franzke +2
- Oli Bartsch +1
- core-ci +1 CI
Issues 1
Files 2
Review log 2027
Show 12 earlier messages
-
Christian Kuhn uploaded patch set 1 05/05/21, 14:07
-
core-ci voted on patch set 1 V +1 05/05/21, 14:17 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11213
-
Christian Kuhn uploaded patch set 2 05/06/21, 15:09
-
core-ci voted on patch set 2 V +1 05/06/21, 15:20 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11266
-
Christian Kuhn uploaded patch set 3 05/06/21, 15:58
-
core-ci voted on patch set 3 V +1 05/06/21, 16:09 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11267
-
Benni Mack voted on patch set 3 V +1 CR +1 05/06/21, 18:52
-
Benjamin Franzke commented on patch set 3 CR -1 05/06/21, 19:23
T3editorElement.php:222Do these properties really need to be <textarea> attributes? Seems to me they could be added to $settings (which is passed to <typo3-t3editor-codemirror options="…">). I guess the same applies to the new attributes in render(). -
Benjamin Franzke uploaded patch set 4 05/06/21, 20:48
-
Benjamin Franzke commented on patch set 4 05/06/21, 20:48
CodeMirrorElement.ts:140UnresolvedIs this change related? Did we have a visual bug here?CodeMirrorElement.ts:148ReplyDoneT3editorElement.php:222ReplyDone -
Benjamin Franzke commented on patch set 4 CR -1 05/06/21, 20:58
I have to say I do not understand what (static) TCA properties codeMirrorMarkText and codeMirrorScrollTo are good for. I mean, they are not applied conditionally. Marking text or scrolling to a text does only makes sense when you know the text. The RST states: These options are probably used rather seldom in casual TCA, but if needed, they're nice to have. To extend on that. scrollTo and markText and codemirror methods (not options), so they are really not designed to be static values. We at least need to find a reason why we provide these as properties(?), or we should drop that.FormEngine.js:351Unrelated change? Which bug does this fix? Preparation for using FormEngine.js somewhere different? -
core-ci voted on patch set 4 V +1 05/06/21, 21:01 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11272
-
Andreas Kienast commented on patch set 4 05/09/21, 09:17
FormEngine.js:351Reply UnresolvedIt's a preparation for https://review.typo3.org/c/Packages/TYPO3.CMS/+/68496 -
Christian Kuhn commented on patch set 4 05/12/21, 13:09
Reply
In FormEngine context, these properties are not static. The input TCA undergoes a lot of processing hrough the DataProviders - for instance select items from DB relations are put into the initial TCA. Patch https://review.typo3.org/c/Packages/TYPO3.CMS/+/68496 that makes use of these render options uses the 'render' part of FormEngine only. A custom usage within EditDocumentController would probably also add a DataProvider to determine the settings and make them 'dynamic'. -
Christian Kuhn uploaded patch set 5 05/12/21, 13:09
-
core-ci voted on patch set 5 V +1 05/12/21, 13:23 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11437
-
Benni Mack commented on patch set 5 V +1 CR +1 05/12/21, 15:29
In general I guess a web component for rendering Textareas with CodeMirror (outside of FormEngine) might be a better fit in the long run, but I think the change is OK for now. -
Benjamin Franzke commented on patch set 5 CR -1 05/13/21, 00:09
Reply Unresolved
IMHO "A custom usage within EditDocumentController would probably…" is too vague to justify adding this as API. It really sounds like these options should not be API but rather *internal*, if we really, really need these. (but) I actually think the Fake-FormEngine approach, for non-Form views, is really a ugly hack as this is by no means a "Form". I mean, if we couldn't do better, I would probably be fine, but… a) …we need more codemirror + tca adaptions to make this properly usable in the patch you linked: * We need to use a custom line-formatter in order for line-numbers to align across the multiple editors * We need to disable IntersectionObserver (no lazy loading), otherwise auto-scroll does not work * We need to adapt for autoheight using codeMirrors `viewportMargin` setting, see https://codemirror.net/demo/resize.html – this is to be set by javascript via the `Infinity` special value (so not doable via plain TCA codemirror options) * We should show the codemirror panel above instead of below b) …we can do better via direct usage of our codemirror webcomponent: I've worked on a demo based on your Fake-FormEngine approach but with webcomponents instead, link is here: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69139 So I think this new "feature" isn't "enough" for the Follow-up change. Therefore I'm against merging this. -
Christian Kuhn commented on patch set 5 CR -1 05/13/21, 12:50
Aligned with benjamin on this: we'll hack that patch into pieces and will solve some parts differently, result will be significantly smaller. -
Christian Kuhn uploaded patch set 6 05/19/21, 11:19
-
core-ci voted on patch set 6 V +1 05/19/21, 11:30 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11669
-
Oli Bartsch uploaded patch set 7 05/19/21, 11:49
-
Oli Bartsch voted on patch set 7 V +1 CR +1 05/19/21, 11:50
-
core-ci voted on patch set 7 V +1 05/19/21, 11:58 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11672
-
Benjamin Franzke voted on patch set 7 CR +1 05/19/21, 14:15
-
Benjamin Franzke voted on patch set 7 V +2 CR +2 05/19/21, 14:19
-
Benjamin Franzke merged patch set 8 05/19/21, 14:20
CodeMirrorElement.ts:148