Add MultilineTextInput widget to the Toga web platform.#3788
Add MultilineTextInput widget to the Toga web platform.#3788Stringer90 wants to merge 3 commits intobeeware:mainfrom
Conversation
freakboy3742
left a comment
There was a problem hiding this comment.
The multilinetext example app seems to work as expected, with the caveat about sizing that you flagged (I suspect that is at least partially due to #3391, so it's out of scope for fixing here).
I've merged this with main; we've just landed a very big change to Toga's documentation, and this PR got caught in the aftermath. I've also made a small change to the rehinting implementation, reflecting the approach taken on other backends.
This seems an odd approach, on two fronts:
- It's using a complicated mechanism to defer style changes
- It's using the shadowRoot, rather than the actual DOM object.
However, the one question I have about the implementation is the deferred "updateComplete" call on a number of features. It's not clear to me why it this required. It's also not clear why the style changes are being applied to the shadowDOM directly, not to the shoelace-level DOM. Can you elaborate on why these two approaches are needed?
|
I just done some quicks tests to re-confirm things regarding your concerns, which involved setting The only combination that works is if the change is applied to the inner |
Ok - from a quick poke around Shoelace's documentation the need for a deferred style update seems to make sense. A quick investigation about styles suggests you're likely right about needing to work on the shadow DOM as well. What doesn't make sense, though, is why the deferred style thing hasn't come up before. It might be that this is the first widget that has "css altering methods" - but the base widget has a |
Added support for the
MultilineTextInputwidget for the web platform, which was missing. Relevant documentation has been updated.This was tested using the
examples/multilinetextinputapp, as well as another small app to test color-related functions.Currently, this widget on web does not resize vertically in response to flex or height styling, despite attempts to implement this.
Refs #3334
PR Checklist: