Skip to content

Port the examples to the vendored gpui - #16

Open
thedancingdeveloper wants to merge 1 commit into
wi-1429-port-fluent-appfrom
wi-1430-port-examples
Open

thedancingdeveloper wants to merge 1 commit into
wi-1429-port-fluent-appfrom
wi-1430-port-examples

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Owner

Summary

Ports examples/* onto the vendored gpui, stacked on #15 (WI-1429).

  • gallery, demo_app, hello_world, widgets and form all launch through FluentApp::run, which Port fluent-app and fluent-test-utils to gpui_platform #15 already moved to gpui_platform::application(), so they needed no source change. demo_app's key bindings (KeyBinding::new) and surface_blur_layer (a plain Hsla colour) both still resolve against the vendored gpui.
  • screenshots was the only example calling Application::new() directly. It now calls gpui_platform::application(), matching the drift report (docs/gpui-api-drift.md). Its WindowOptions fields (window_bounds, titlebar, window_decorations, focus, show) are unchanged in the vendored gpui.
  • Neither the video-frames patch (Video frames as standalone GPU textures #9) nor the element-scale patch (Re-port element visual scale onto the vendored gpui #7) was needed: no example uses video textures or element scale.

Stacked on #15. Do not merge until #15 is merged, and not before review.

Gates (Linux, this host)

  • cargo check --workspace --examples --offline — green.
  • cargo clippy -p <crate> --all-targets --no-deps -- -D warnings — 0 errors for fluent-core, fluent-primitives, fluent-layout, fluent-ribbon, fluent-app, fluent-test-utils, demo_app, form, gallery, hello_world, screenshots, widgets. --no-deps is required: the vendored zed crates fail -D warnings on their own (ztracing cfgs, scheduler, http_client), which is outside this item.
  • cargo test --workspace --offline --tests (vendored gpui crates excluded) — all green. The two doctest failures in gpui_macros are pre-existing in the vendored tree.

Operator check

This host has no display, so nothing was run. On a machine with a display:

cargo run -p hello_world
cargo run -p gallery
cargo run -p widgets
cargo run -p form
cargo run -p demo_app
cargo run -p screenshots -- button

Look for: each opens a window themed with the Fluent dark palette and renders without a panic. hello_world shows a counter with Increment and Reset buttons. gallery and widgets show the component galleries. form shows the form. demo_app shows the demo shell; Ctrl-K opens the command palette and Ctrl-Shift-L / Ctrl-Shift-D switch themes. screenshots button opens a 1000x600 window titled "FluentGUI-Screenshots" showing the button variants and writes /tmp/.fluent-screenshot-ready after the first frame.

Regenerating screenshot baselines is WI-1431 and is deliberately not done here.

The vendored gpui removed Application::new(); the other examples go
through FluentApp, which WI-1429 already moved. Only screenshots
constructed the application directly.
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