Repository navigation
Port fluent-primitives to the vendored upstream gpui (WI-1426) - #12
Open
thedancingdeveloper wants to merge 1 commit into
Open
thedancingdeveloper wants to merge 1 commit into
thedancingdeveloper wants to merge 1 commit into
Conversation
Five signature changes the symbol-location check missed: Window focus methods now take &mut App, ShapedLine::paint takes alignment, Styled::text_style returns the refinement directly, ElementId::NamedChild holds an Arc, and Corner is replaced by a local four-variant enum that converts into gpui::Anchor so the popover anchor API stays stable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #10 (
wi-1425-port-fluent-core). Do not merge until #10 lands; this PR's base is that branch, notgpui-upstream.Ports
crates/fluent-primitivesto the vendored zed gpui. The symbol-location drift report called every symbol this crate uses "unchanged", but five signatures moved. Each adaptation is mechanical and forced by the vendored gpui:Window::focus,focus_nextandfocus_prevnow take&mut App.ShapedLine::painttakes aTextAlignand an optional align width. The call passesTextAlign::LeftandNone, which is what the old four-argument paint did.Styled::text_style()returns&mut TextStyleRefinementdirectly instead of anOption, so theget_or_insert_withis gone.ElementId::NamedChildholds anArc<ElementId>instead of aBox.gpui::Corneris removed. The crate now exports its own four-variantCorner(TopLeft/TopRight/BottomLeft/BottomRight) that converts intogpui::Anchor, so the popover anchor API that ribbon, layout and app build on does not change.No other widget behaviour changes. The element-scale and font pre-warm patches (#7, #6) were not needed.
Public API
fluent_primitives::Corneris new and replaces the re-export ofgpui::Corner. Its four variants and the.anchor(...)builders keep their old shapes. 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-primitives— cleancargo test -p fluent-primitives— 27 passed, 0 failedcargo clippy -p fluent-primitives --all-targets --no-deps -- -D warnings— clean.--no-depsbecause the vendoredztracingcrate fails-D warningson its ownunexpected_cfglint, which is outside this crate.WI-1426.