gpui-component/crates/story/src
Jason Lee 9fa2669ff4
list, table: Refactor List, Table to have ListState, TableState. (#1468)
## Break Change

- Like Select, Input API design, now `List`, `Table` also has ListState
and TableState.

```diff
- let table = cx.new(|_| Table::new(delegate, window, cx).stripe(true).border(true))
+ let table = cx.new(|_| TableState::new(delegate, window, cx))
+ Table::new(&table).stripe(true).border(true) // for render

- let list = cx.new(|_| List::new(delegate, window, cx))
+ let list = cx.new(|_| ListState::new(delegate, window, cx))
+ List::new(&list) // for render
```

- ListDelegate, TableDelegate methods has changed some argument type:
  
- If first argument is `&mut self`, the `cx` has been changed to `&mut
Context<ListState<Self>>` or `&mut Context<TableState<Self>>`.
  

    ```diff
- fn confirm(&mut self, _secondary: bool, _: &mut Window, cx: &mut
Context<List<Self>>)
+ fn confirm(&mut self, _secondary: bool, _: &mut Window, cx: &mut
Context<ListState<Self>>)
    ```

- If first argument is `&self`, the `cx` has been changed to `&mut App`.

    ```diff
- fn render_item(&self, ix: IndexPath, _: &mut Window, _: &mut
Context<List<Self>>)
    + fn render_item(&self, ix: IndexPath, _: &mut Window, _: &mut App)
    ```
2025-11-02 12:59:37 +00:00
..
fixtures plot(scale): Point scale support single point (#1185) 2025-08-29 15:05:51 +08:00
accordion_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
alert_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
app_menus.rs story: Add open file to Markdown and Editor example. (#1363) 2025-10-13 11:52:16 +08:00
assets.rs chore: Assets interpolate folder path via rust embed (#1318) 2025-10-02 16:04:33 +08:00
avatar_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
badge_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
button_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
calendar_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
chart_story.rs chart(pie): Support dynamic inner and outer radius (#1444) 2025-10-28 13:53:28 +08:00
checkbox_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
clipboard_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
color_picker_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
date_picker_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
description_list_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
drawer_story.rs list, table: Refactor List, Table to have ListState, TableState. (#1468) 2025-11-02 12:59:37 +00:00
form_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
group_box_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
icon_story.rs button: Fix button label display has overflow hidden. (#1322) 2025-10-03 10:18:00 +08:00
image_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
indicator_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
input_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
kbd_story.rs chore: Update List, Tree, Kbd exports. (#1467) 2025-10-30 07:19:39 +00:00
label_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
lib.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
list_story.rs list, table: Refactor List, Table to have ListState, TableState. (#1468) 2025-11-02 12:59:37 +00:00
main.rs resizable: Simplify Resizable API. (#1459) 2025-10-29 23:01:05 +08:00
menu_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
modal_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
notification_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
number_input_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
otp_input_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
popover_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
progress_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
radio_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
resizable_story.rs resizable: Simplify Resizable API. (#1459) 2025-10-29 23:01:05 +08:00
scrollable_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
select_story.rs select: Impl SelectItem for &'static str. (#1451) 2025-10-28 13:37:00 +00:00
sidebar_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
skeleton_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
slider_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
switch_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
table_story.rs list, table: Refactor List, Table to have ListState, TableState. (#1468) 2025-11-02 12:59:37 +00:00
tabs_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
tag_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
textarea_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
themes.rs story: Fix story panic when save state failed. (#1384) 2025-10-15 08:20:44 +00:00
title_bar.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
toggle_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
tooltip_story.rs chore: Refactor tab key to switch focus. (#991) 2025-09-29 16:48:24 +08:00
tree_story.rs chore: Update List, Tree, Kbd exports. (#1467) 2025-10-30 07:19:39 +00:00
virtual_list_story.rs chore: Update List, Tree, Kbd exports. (#1467) 2025-10-30 07:19:39 +00:00
webview_story.rs chore: Rename Dropdown to Select, TextInput to Input. (#1449) 2025-10-28 21:22:31 +08:00
welcome_story.rs markdown: Use list for Markdown render and add scrollbar. (#1357) 2025-10-13 22:06:07 +08:00