Skip to content

Port fluent-app and fluent-test-utils to gpui_platform - #15

Open
thedancingdeveloper wants to merge 1 commit into
wi-1428-port-fluent-layoutfrom
wi-1429-port-fluent-app
Open

thedancingdeveloper wants to merge 1 commit into
wi-1428-port-fluent-layoutfrom
wi-1429-port-fluent-app

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Owner

Stacked on #14 (wi-1428-port-fluent-layout). Do not merge until #14 and everything beneath it has landed; this branch contains the whole stack.

WI-1429. gpui::Application::new() is gone from the vendored upstream gpui, so FluentApp::run now starts the app through gpui_platform::application(), and fluent-test-utils exposes the same constructor as application().

What did not change

The window API the chrome and title bar use is unchanged, so chrome.rs, title_bar.rs and assets.rs are untouched:

  • WindowOptions, TitlebarOptions, WindowDecorations::Client, ResizeEdge, HitboxBehavior
  • window_decorations, insert_hitbox, start_window_resize, start_window_move, zoom_window, minimize_window, remove_window, set_cursor_style, set_app_id, on_window_should_close, set_window_title
  • AssetSource
  • TestAppContext / VisualTestContext and add_window_view (still behind gpui's test-support feature)

API break

fluent-test-utils gains a public application() -> gpui::Application. Nothing else in the two crates' public API changes: FluentApp still builds and runs the same way.

Not covered

examples/screenshots/src/main.rs calls gpui::Application::new() directly and will not compile on this branch. It is outside the two crates this port covers; the examples that go through FluentApp pick the fix up automatically.

Operator check

This host has no display, so client-side decorations were not exercised. Please confirm examples/hello_world opens a frameless window and that move, resize, zoom and minimise work on both Wayland and X11.

Gates (Linux, --offline)

  • cargo check -p fluent-app -p fluent-test-utils --tests — clean
  • cargo test -p fluent-app -p fluent-test-utils --lib — 7 passed, 0 failed
  • cargo clippy -p fluent-app -p fluent-test-utils --tests --no-deps -- -D warnings — clean (--no-deps because the vendored scheduler crate fails clippy on its own, unrelated to this change)

gpui::Application::new() is gone from the vendored upstream gpui.
FluentApp::run now starts the app through gpui_platform::application(),
and fluent-test-utils exposes the same constructor as application().

The window API the chrome and title bar use is unchanged: WindowOptions,
TitlebarOptions, WindowDecorations, ResizeEdge, HitboxBehavior and the
window methods (start_window_resize, start_window_move, zoom, minimise,
remove, decorations, hitbox, cursor style, app id, close handler, title)
keep their signatures, so chrome.rs, title_bar.rs and assets.rs are
untouched. AssetSource and the test-support contexts are likewise
unchanged.
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