From 19d84229337da3386693c01061471b014f4d3e8a Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Fri, 9 Aug 2024 12:32:26 +0200 Subject: [PATCH] stories: Get OverflowScrollStory to scroll again (#15982) This makes it at least scroll again, but it doesn't scroll down to the last element yet. We haven't figured out why yet. Release Notes: - N/A Co-authored-by: Bennet Co-authored-by: Antonio --- crates/story/src/story.rs | 20 +++++++++---------- .../storybook/src/stories/overflow_scroll.rs | 2 ++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/story/src/story.rs b/crates/story/src/story.rs index 1f37267cdb..4f153aaac8 100644 --- a/crates/story/src/story.rs +++ b/crates/story/src/story.rs @@ -117,17 +117,15 @@ impl RenderOnce for StoryContainer { pub struct Story {} impl Story { - pub fn container() -> Div { - div().size_full().overflow_hidden().child( - div() - .id("story_container") - .overflow_y_scroll() - .w_full() - .min_h_full() - .flex() - .flex_col() - .bg(story_color().background), - ) + pub fn container() -> gpui::Stateful
{ + div() + .id("story_container") + .overflow_y_scroll() + .w_full() + .min_h_full() + .flex() + .flex_col() + .bg(story_color().background) } // TODO: Move all stories to container2, then rename diff --git a/crates/storybook/src/stories/overflow_scroll.rs b/crates/storybook/src/stories/overflow_scroll.rs index ee2ea12c00..5e507541b5 100644 --- a/crates/storybook/src/stories/overflow_scroll.rs +++ b/crates/storybook/src/stories/overflow_scroll.rs @@ -25,6 +25,8 @@ impl Render for OverflowScrollStory { .child(Story::label("`overflow_y_scroll`")) .child( v_flex() + .w_full() + .flex_1() .id("overflow_y_scroll") .gap_2() .overflow_y_scroll()