-
Notifications
You must be signed in to change notification settings - Fork 284
Create SuperChatBubble widget. (Resolves #2804) #2805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Why are these needed? Is it because of the document layout widget? I would expect us to be able to achieve our goals without extra stuff like this.
Then we should change this widgets. Maybe we want named constructors or something, but we shouldn't be creating and passing things that don't have any relevance to the use-case.
For |
We need Without |
But this widget doesn't want any scrolling at all. So why don't we build a widget that doesn't use/include slivers? |
@matthew-carroll |
|
@angelosilvestre it may not be easy, but I think the goal of this ticket is to have a reader that doesn't include scrolling. The scrolling internals interfere with the broader widget tree, and they also make things way more complicated. So let's try to create a reader with an intrinsically sized document layout, no scrolling system, and then gestures on top of that. I think most of the work comes down to copying the existing layout widget, removing scrolling, copying the existing reader widget, removing scrolling. If you hit major roadblocks while trying to do that then please let me know. Also, I know I asked you to call it a |
|
@matthew-carroll Are you saying that, for this widget, we should use the older |
Yeah, I guess that'll have to happen. I think we're just gonna have to maintain some parallel implementations so we can have with-scrolling and without-scrolling options. |
Create
SuperChatBubblewidget. (Resolves #2804)This PR introduces a
SuperChatBubble, which is a copy ofSuperReaderwithout scrolling. The subtree is basically the same, with the following differences:IntrinsicWidthwas added to make the widget size itself based on its intrinsic width.SuperEditorDryLayoutwas added to make theIntrinsicWidthuse possible.DocumentScaffoldwas removed from the subtree, because this widget adds the scrolling behavior to the widget. Instead ofDocumentScaffoldwe useContentLayersandSingleColumnDocumentLayoutdirectly.I had to keep an
AutoScrollControllerand aScrollControllerin the state class because the inner widgets require them.There are some properties that I'm not sure we need for this widget, like
autoFocus, which I think we probably don't want, andkeyboardActions.This PR also modifies the Slack clone to use the new
SuperChatBubblewidget.The following screenshot shows
SuperChatBubblesized according its intrinsic width.