Repository navigation
fix(session): stack the composer pills only when they don't fit - #233
Merged
Merged
Conversation
The pills above the composer (background work, queued messages, Jump to latest) chose between one row and a stack by font scale (>= 1.8). A long label at normal size, like German "1 in der Warteschlange", was squeezed to "1 in der", and the row's split never looked at the real widths. ComposerPills is now one measured Layout, as iOS ComposerPillRows (p551: 41e2b90d, 6a02dc7d): the pills share a row unless background work and queued overflow it at full width. Jump to latest joins the queued pill's row only when its full slot fits, and otherwise floats above the rows' top end, so it never changes their layout. Android's 10 dp stacked gap stays; no new motion. Verified: scripts/check.sh (full, on the VM). On the emulator with session-lab (background work + a held queued message, scrolled up), English and German at font scale 1.0 and 2.0 on dev and on this branch: German at 1.0 now stacks with the full queued label instead of clipping it; English at 1.0 and 2.0 look the same as before; German at 2.0 floats Jump above the stack where dev squeezed its slot.
… jump whole Review fixes for the composer pill fit: - The rows' height moves on the composer column's curve when the queued pill stacks under background work or leaves, so the work pill and the transcript slide instead of stepping (dev stepped too at font scale 2). - At least 8 dp between the pills before they count as fitting a row. - A floating jump button keeps its full 48 dp slot; only the slot beside the queued pill collapses. The pills are measured first (SubcomposeLayout), so the fit decision picks the jump's slot. - The jump slot follows the queued pill still on screen, so its exit no longer moves the jump mid-way. - The KDoc no longer points at the iOS counterpart. Verified: scripts/check.sh on the VM (full). Emulator with session-lab, animations at 5x: German at font scale 1.0, a queued message arriving and leaving under background work (dev vs branch recording); German at 2.0 with the jump floating at 48 dp; the jump hidden vs shown keeps the rows' height.
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.
The pills above the composer chose between one row and a stack by font scale alone. At normal size a long label was squeezed: in German the queued pill read "1 in der" instead of "1 in der Warteschlange".
Now the pills share a row, at least 8 dp apart, unless background work and queued messages don't fit side by side at full width. Jump to latest joins the queued pill's row only when its whole slot fits, and otherwise floats above the rows at its full size, so it never changes their layout. When the rows stack or unstack, their height slides on the composer column's curve instead of stepping. This ports iOS ComposerPillRows (p551: 41e2b90d, 6a02dc7d).
Top row is dev, bottom row is this branch. Columns: English at font 1.0, English at 2.0, German at 1.0, German at 2.0.
A queued message arriving and leaving under background work, German at font 1.0, animations slowed 2.5x. Dev squeezes the label; this branch stacks, and the work pill slides up and back down.
queue-arrive-leave-de-1.0.mp4
Jump to latest hidden and shown (German, 1.0): the rows keep their height and the queued pill slides over.
supportsRtl="false"), so there's no right-to-left case to show.pill-row-exitbranch edits the sameComposerPills/QueuedActivitycode (it should keep the agents, shells and scripts counts while leaving), and PR feat(session): add an up arrow that jumps to the previous user message #182 adds its previous-message action to the jump call, which is now one call.Verified: full scripts/check.sh on the VM. On the emulator with session-lab (background work plus a held queued message), I compared dev and this branch in English and German at font scale 1.0 and 2.0, recorded a queued message arriving and leaving with animations at 5x on both, and checked Jump hidden and shown.