### Summary This PR integrates the git graph canvas with the `Table` component’s `RedistributableColumnsState`, making the graph column resizable while preserving the table’s existing resize behavior. In particular, column resizing continues to use the same cascading redistribution behavior as the table. This is also the last PR needed to remove the feature flag on the git graph! ### Table API changes I pulled the redistributable column logic out of `Table` into reusable UI helpers so layouts outside of `Table` can participate in the same column resizing behavior. This adds a shared `RedistributableColumnsState` API, along with helpers for binding drag/drop behavior, rendering resize handles, and constructing header resize metadata. I also added `ColumnWidthConfig::explicit` and `TableRenderContext::for_column_widths` so callers can render table like headers and content with externally managed column widths. The reason for this change is that the git graph now renders a custom split layout: a graph canvas on the left and table content on the right. By reusing the same column state and resize machinery, the graph column can resize together with the table columns while preserving the existing table behavior, including cascading column redistribution and double click reset to default sizing. I also adjusted the resize handle interaction styling so the divider stays in its hovered/highlighted state while a drag is active, which makes the drag target feel more stable and visually consistent during resizing. ### Preview https://github.com/user-attachments/assets/347eed71-0cc1-4db4-9dee-a86ee5ab6f91 Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [ ] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Release Notes: - N/A or Added/Fixed/Improved ...
90 lines
1.5 KiB
Rust
90 lines
1.5 KiB
Rust
mod ai;
|
|
mod avatar;
|
|
mod banner;
|
|
mod button;
|
|
mod callout;
|
|
mod chip;
|
|
mod collab;
|
|
mod context_menu;
|
|
mod count_badge;
|
|
mod data_table;
|
|
mod diff_stat;
|
|
mod disclosure;
|
|
mod divider;
|
|
mod dropdown_menu;
|
|
mod facepile;
|
|
mod gradient_fade;
|
|
mod group;
|
|
mod icon;
|
|
mod image;
|
|
mod indent_guides;
|
|
mod indicator;
|
|
mod keybinding;
|
|
mod keybinding_hint;
|
|
mod label;
|
|
mod list;
|
|
mod modal;
|
|
mod navigable;
|
|
mod notification;
|
|
mod popover;
|
|
mod popover_menu;
|
|
mod progress;
|
|
mod redistributable_columns;
|
|
mod right_click_menu;
|
|
mod scrollbar;
|
|
mod stack;
|
|
mod sticky_items;
|
|
mod tab;
|
|
mod tab_bar;
|
|
mod toggle;
|
|
mod tooltip;
|
|
mod tree_view_item;
|
|
|
|
#[cfg(feature = "stories")]
|
|
mod stories;
|
|
|
|
pub use ai::*;
|
|
pub use avatar::*;
|
|
pub use banner::*;
|
|
pub use button::*;
|
|
pub use callout::*;
|
|
pub use chip::*;
|
|
pub use collab::*;
|
|
pub use context_menu::*;
|
|
pub use count_badge::*;
|
|
pub use data_table::*;
|
|
pub use diff_stat::*;
|
|
pub use disclosure::*;
|
|
pub use divider::*;
|
|
pub use dropdown_menu::*;
|
|
pub use facepile::*;
|
|
pub use gradient_fade::*;
|
|
pub use group::*;
|
|
pub use icon::*;
|
|
pub use image::*;
|
|
pub use indent_guides::*;
|
|
pub use indicator::*;
|
|
pub use keybinding::*;
|
|
pub use keybinding_hint::*;
|
|
pub use label::*;
|
|
pub use list::*;
|
|
pub use modal::*;
|
|
pub use navigable::*;
|
|
pub use notification::*;
|
|
pub use popover::*;
|
|
pub use popover_menu::*;
|
|
pub use progress::*;
|
|
pub use redistributable_columns::*;
|
|
pub use right_click_menu::*;
|
|
pub use scrollbar::*;
|
|
pub use stack::*;
|
|
pub use sticky_items::*;
|
|
pub use tab::*;
|
|
pub use tab_bar::*;
|
|
pub use toggle::*;
|
|
pub use tooltip::*;
|
|
pub use tree_view_item::*;
|
|
|
|
#[cfg(feature = "stories")]
|
|
pub use stories::*;
|