Conversation
49dfa15 to
c33f82a
Compare
jneem
left a comment
There was a problem hiding this comment.
Could you explain the motivation for having a ClipBox that isn't managed? My initial reaction is that if you're clipping your children and ignoring SCROLL_TO_VIEW then that's a bug, and we don't need to be working around it in ClipBox.
I can't think of a specific usecase. But you can use |
|
Sorry for the slow reply. I've been thinking a bit more about this, and I think what worries me is that both the mananged and unmanaged scenarios have the potential for silently causing unexpected behavior. I agree that if you use I don't see a great way out of this situation, but I'm still of the opinion that if you have a |
Sounds good.
In this case maybe we should not have a default value, but force the user to make an explicit decision which option would fit? Either by introducing |
|
@jneem what do you think about this. I am in favor of the breaking change. But your suggestion would also be fine for me. |
|
Oh, sorry, for some reason in my mind I had already replied. I don't have a strong preference between having a default or not having a default. I agree that defaulting to |
|
Have I understood this correctly, you are in favor of the |
|
I'm ok with two approaches
I don't have a strong preference between these two. |
jneem
left a comment
There was a problem hiding this comment.
Thanks for the changes! Just a couple documentation clarifications, and I think you also need to fix the doc link for CI to be satisfied.
| /// internally. | ||
| /// | ||
| /// `ClipBox` will forward [`SCROLL_TO_VIEW`] notifications to its parent unchanged. | ||
| /// In this case the parent has to handle said notification itself. By default the ClipBox will |
There was a problem hiding this comment.
There's no more "by default", right? The choice is now explicit.
|
Thanks for your time :) |
- Fixed unused notification warning.
- moved default_scroll_to_view_handling to Viewport
- added docs
47c7dff to
14c90b7
Compare
| info!("{}: {:?}", i, n); | ||
| } | ||
| info!( | ||
| "if this was intended use EventCtx::submit_notification_unknown_target instead" |
This PR adds that
ClipBoxandTabscan handlescroll_to_view.managed()was called.Notificationnow has aknown_targetflag. When set to false there will be no warning even if the notification reaches the root widget.