## Summary - Implements `icon_label` on `GitPanel` to return the total count of uncommitted changes (`new_count + changes_count`) when non-zero, capped at `"99+"` for large repos. - Updates `PanelButtons::render()` to render that label as a small green badge overlaid on the panel's sidebar icon, using absolute positioning within a `div().relative()` wrapper. - The badge uses `version_control_added` theme color and `LabelSize::XSmall` text with `LineHeightStyle::UiLabel` for accurate vertical centering, positioned at the top-right corner of the icon button. The `icon_label` method already existed on the `Panel`/`PanelHandle` traits with a default `None` impl, and was already implemented by `NotificationPanel` (unread notification count) and `TerminalPanel` (open terminal count) — but was never rendered. This wires it up for all three panels at once. ## Notes - Badge is positioned with non-negative offsets (`top(0)`, `right(0)`) to stay within the parent container's bounds. The status bar's `render_left_tools()` uses `.overflow_x_hidden()`, which in GPUI clips both axes (the `overflow_mask` returns a full content mask whenever any axis is non-`Visible`), so negative offsets would be clipped. - `LineHeightStyle::UiLabel` collapses line height to `relative(1.)` so flex centering aligns the visual glyph rather than a taller-than-necessary line box. - No new data tracking logic — `GitPanel` already maintains `new_count` and `changes_count` reactively. - No feature flag or settings added per YAGNI. ## Suggested .rules additions The following pattern came up repeatedly and would prevent future sessions from hitting the same issue: ``` ## GPUI overflow clipping `overflow_x_hidden()` (and any single-axis overflow setter) clips **both** axes in GPUI. The `overflow_mask()` implementation in `style.rs` returns a full `ContentMask` (bounding box) whenever any axis is non-`Visible`. Absolute-positioned children that extend outside the element bounds will be clipped even if only the X axis is set to Hidden. Avoid negative `top`/`right`/`bottom`/`left` offsets on absolute children of containers that have any overflow hidden — keep badge/overlay elements within the parent's bounds instead. ``` Release Notes: - Added a numeric badge to the git panel sidebar icon showing the count of uncommitted changes. --------- Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.