Repository navigation
fix: Keep a margin card's turns still when a growing draft caps a top-held card - #7617
Merged
Merged
Conversation
…-held card While the user writes in a margin card that keeps its top, the card's transcript now holds its height as a minimum, so the line the draft gains comes out of the reply, whose field scrolls, instead of the grid sharing the shortfall between both rows and moving the turns on the capping keystroke. The minimum yields to the reply's own minimum and clears once the user stops writing. test_a_growing_draft_under_its_words_holds_the_editor_s_top now runs at 540, 550, 600 and 628px windows without the xfail; 540 to 600 fail on the old code. Closes #7511
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.
In a margin card below its words, the keystroke that brought the card's foot to the window's moved the first message and the reply up by 5 to 15px. The card's grid gives the transcript and reply rows equal shares of whatever the cap takes away, so once the cap could no longer give the transcript its full height, both rows shrank. While the user writes in a card that keeps its top,
measureThreadCardnow holds the transcript's height as amin-height. That hold sits beside the existingmax-heightshare that a card keeping its reply box's top uses. Lines the draft gains then come out of the reply, whose field scrolls, and the turns stay where they stood. The held height never exceeds what the cap leaves after the reply's own minimum, so a shrinking window can't push the reply out of the card. It clears on the next fit once the user stops writing: after Send, an emptied draft or a change of side. The module header now says that a card keeping its top is the exception to the transcript yielding writing room. A card over its words still yields, and its test is unchanged.test_a_growing_draft_under_its_words_holds_the_editor_s_topnow runs at 540, 550, 600 and 628px windows, without the strict xfail it had at 600. The 540, 550 and 600 cases fail onmain(the first turn moves 17, 7 and 7px) and pass with this change. These also pass: the draft, editor and Send tests intest_card_reply.py(21), a selection of card growth and fit tests undertests/browser/margin(28),pnpm run test:runtime, and the browser type check.Closes #7511 — automated triage