fix(dashboard): swap the chat panes where two do not fit - #1427
Merged
Conversation
With the navigation expanded the chat room is `viewport - 646`, so between the mobile breakpoint and 888px it is narrower than the composer's own minimum and the send button fell outside the panel's clip, with neither a scrollbar nor a visible text field to work around it. Narrowing the chat list cannot pay for this: its own header floors at 245px in English and 270px in French, well above the 229px the budget allows. The panes now swap one at a time across that band, which is the behaviour the page already has on a phone, and the room goes from 123px to 443px at the narrow end. The band is keyed to the navigation as well as the viewport, so the collapsed nav, where the room already fits, is untouched at every width. The message input also gains a 64px floor. It could previously shrink to its own padding and border and render a text box exactly zero pixels wide, which kept the send button reachable at the cost of hiding what the user typed.
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.
With the navigation expanded the chat room is
viewport - 646, so between the mobile breakpoint and 888px it is narrower than the composer's own minimum. The send button sat outside the clip of.chats-layout, with no scrollbar to recover it, and the text field had already collapsed to a zero pixel content box, so a user could neither see what they typed nor click send. #1425 moved the threshold from 1014px down to 859px; this closes the rest.Why not narrow the chat list
That was the plan recorded on #1422, and measurement rejected it. The budget at 769px is 443px, and the composer needs 214px, so the sidebar would have to fit in 229px. Its own header does not: the search input floors it at 245px in English, and in French the tab row "Discussions / Chaînes / Statut" floors it at 270px. Reaching 229px would have taken four more rules (a tab ellipsis, a
min-widthon the search input, hiding the kind badge) and still handed back a 30px text field.What changed
viewport - 646only while the nav is expanded. With it collapsed the room already fits at every width, and nothing here applies..chats-page .message-text-inputgains a 64px floor. It could previously shrink to its own padding and border and render a text box exactly 0px wide.Impact
Measured in headless Chromium against this branch, with the real webfont and the production custom properties and element defaults.
Navigation expanded:
The send button is no longer outside the clip at any width, and the text field is never zero.
Verification
main.mainat 769, 858, 889, 900 and 1024px. That state was never broken and is untouched.main, so the mobile shell is unaffected..chats-pagestays 649px and.chats-layout569px inside the band, against the 239px/191px they would take if the mobile shell's rules had been ported with them.lint,format:check,typecheck,i18n:check,build,test:unit. Docs lanetest:docs, 264 tests. The page-CSS scope gate passes, 11 of 11.Follow-ups this does not cover
Two overflows sit inside the two-pane range that remains and are not caused by this change:
.chats-page .replying-to-titlehas nooverflowhandling, so a long unbreakable quoted name paints across the close button, and the location message's map thumbnail carries an inlinemaxWidth: 220with nomax-width: 100%, so it passes the clip once the room is narrower than that. Both are filed as #1428.Fixes #1422