Skip to content

Port fluent-layout to the vendored upstream gpui (WI-1428) - #14

Open
thedancingdeveloper wants to merge 1 commit into
wi-1427-port-fluent-ribbonfrom
wi-1428-port-fluent-layout
Open

thedancingdeveloper wants to merge 1 commit into
wi-1427-port-fluent-ribbonfrom
wi-1428-port-fluent-layout

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Owner

Summary

Stacked on #13 (wi-1427-port-fluent-ribbon). Do not merge until #13 lands; this PR's base is that branch, not gpui-upstream.

Ports crates/fluent-layout to the vendored zed gpui. Three changes, each forced by the vendored gpui:

  • Window::focus now takes &mut App. The four call sites (command palette, context menu, menu bar, menu button) pass the cx already in scope.
  • AsyncApp::update returns its value directly instead of a Result. The toast timeout's .ok() is gone; the dismiss still runs.
  • gpui::Corner is removed. Popover::anchor now takes gpui::Anchor, and the menu button anchors its popup at Anchor::TopLeft.

No other behaviour changes. The element-scale and font pre-warm patches were not needed.

Public API

Popover::anchor takes gpui::Anchor instead of the removed gpui::Corner. The four variants (TopLeft/TopRight/BottomLeft/BottomRight) keep their names, so call sites that named a variant only change the type. Nothing else in the public API moved.

Operator check

None. This is a compile-level port; nothing here needs a visual check.

Gates (Linux)

  • cargo check -p fluent-layout --all-targets — clean
  • cargo test -p fluent-layout — 37 passed, 0 failed (1 doc-test ignored, as before)
  • cargo clippy -p fluent-layout --all-targets --no-deps -- -D warnings — clean. --no-deps because the vendored ztracing crate fails -D warnings on its own unexpected_cfg lint, which is outside this crate.

WI-1428.

Three changes, all forced by the vendored gpui: Window::focus takes
&mut App, AsyncApp::update returns its value instead of a Result, and
gpui::Corner is gone so Popover anchors with gpui::Anchor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant