Repository navigation
Dependencies: gpui-base 0.8.1 on gpui-fast 0.1.12, with the workarounds it closes removed - #1011
Merged
Merged
Conversation
…t 0.1.12 gpui-base 0.8.1 pins gpui-pre 0.3.10 and gpui-fast 0.1.12, so the reqwest-client snapshot follows to 0.3.10 and every crate's gpui-fast minimum states 0.1.12. GPUI renamed `ScrollWheelEvent` to `ScrollEvent` and added the input's source; the mobile two-finger pan is a touch scroll, and so are the finger pans the selection tests simulate. `KeyBinding::new` no longer reads `secondary-`: it panics at startup. `shortcut::secondary` loads those bindings for the host OS, which GPUI now reports at run time, so a browser on a Mac binds Command as a native Mac build does. `Kbd::format` reads the same OS, so a hint names the key its binding takes.
…fast closed Page viewports go back to gpui-base's own wheel bounce. #933 turned it off because a release while moving threw the edge and f32 rounding of the delta the content used read as reaching it; gpui-base 0.8.1 throws the edge only when it is stretched and ignores that rounding. The test #933 added, a drag right after a flick, holds with the default. gpui-fast fixed a reparented retained child left unmeasured (#68) in 0.1.9, and since 0.1.11 measures text that reaches prepaint unmeasured instead of panicking. The sidebar's empty provider-mark slot and the chat row's content-keyed id existed only for #68: the mark is absent while marks are off, and rows carry no id; the images inside them are keyed by their message. The provider-mark toggle test (#452) and the Work Log collapse test (#898) still pass.
… by its unit gpui-base 0.8.1 extends a double- or triple-click drag, and a shift-click after it, by words or lines, and keeps the clicked unit selected whichever way they go (#3681). A transcript owns its selection, so it now holds the unit the same way: until the button is released a drag moves the far end to the edge of the word or line under the pointer, and a shift-click does so until a plain click starts afresh. A long press, a touch handle and Select Entry make their own selection and hold no unit.
gpui-fast 0.1.12 asks every platform for the host OS, which decides what `secondary-` binds and how a keystroke is written: the iOS backend reports iOS and the Android one Android, both native, so `secondary` stays Control there as before. Window insets gained the display's corner radii; neither host reports them, so they are zero, which GPUI reads as square or unknown. The palette shortcut no longer imports `KeyBinding` for the macOS-only Quit.
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
gpui-base, gpui-kit and gpui-webview go to 0.8.1. That moves gpui-fast from 0.1.10 to 0.1.12 and gpui-pre to 0.3.10. Tcode follows the API changes, removes the workarounds upstream has now fixed, and adopts upstream's new multi-click selection rule.
Transcript selection (
markdown/selection.rs):What changes for users
secondaryshortcuts (⌘K palette, ⌘1–9, ⌘Z, image-viewer zoom) now bind Command, and the hints show ⌘. GPUI'sModifiers::secondaryis now OS-aware (zed#65970). Editing keys inside inputs still use gpui-base's compile-time bindings (Ctrl). Native builds are unchanged, iOS included (secondary= Control, plus Tcode's own Cmd editing bindings).Toolbarno longer takes focus.Checked and left as they are
character_index_for_point, the mark left open on blur, the length query and the selection setter. Upstream code is unchanged.web/keyboard.rsand the input's mouse-up keyboard request on wasm.on_prepaintorigin change (gpui-kit#3689) doesn't affect Tcode: its sites read only the size, or sit on unpadded elements.Dialog::centered, the Sheet/notification insets, DataTable and Diff live in gpui-component, which Tcode doesn't use.Not done
ScrollSource::Touchcould tell the edge-back and sidebar swipe gestures apart from trackpad scrolls. That needs checking on a device.corner_radii, which needs a Swift host change.Evidence
Before: on gpui-fast 0.1.12,
KeyBinding::new("secondary-k", …)fails to parse (Keystroke::parseno longer resolvessecondary), so the bindings inshortcut::initandrun_shellpanic at startup. Clippy also fails ongpui-mobile-touch(PlatformInput::ScrollWheelno longer exists), and the iOS crate fails on the missingplatform_infoandcorner_radii.After:
New test:
a_drag_or_shift_click_from_a_double_click_extends_by_words.It failed before the change (
left: "beta", right: "beta gamma delta") and passes after.Existing regression tests that cover the removed workarounds still pass without them:
a_drag_right_after_a_flick_scrolls_the_timeline(Scroll the page under a drag that follows a flick #933)thread_rows_carry_the_provider_mark_until_the_setting_is_off(Add off-by-default provider marks to sidebar thread rows #452)collapsing_work_log_preserves_following_message_bounds(Fix assistant layout after collapsing a work log #898)No test failed, was removed or was rewritten. Test event literals only gained
source:Touchwhere the test simulates a finger, the defaultPointerfor wheel and trackpad.Desktop app launched on a throwaway
TCODE_DATA_DIR: it starts without a panic and the sidebar hint shows ⌘K. Synthetic keystrokes couldn't be delivered to the app in this environment, so a throwaway test (not committed) checkedshortcut::secondary("secondary-k")on macOS instead: it bindscmd-k, ⌘K dispatches the action and Ctrl-K does not.Not run locally:
tcode-android(no NDK on this machine;gpui-androiditself checks)--features webclippy (needs the browser bundle)Merge Danger
Door: two-way
A dependency bump plus local refactors. A revert restores 0.8.0 exactly; nothing persisted or on the wire changes.
Blast Radius: input-wide
Scroll bounce on every page viewport, every
secondaryshortcut and its hint (browser on a Mac only), and transcript multi-click selection. gpui-fast's list scroll-anchoring rewrite and Taffy 0.15 reach every list and layout; the chat suite passes, but long-transcript scrolling deserves a manual pass.