Repository navigation
fix: the attach tray is the tile grid again - #506
Merged
Merged
Conversation
Merging feat/attach-tray kept Develop's older list sheet wired into the chat: AttachTray shipped, the sheet stayed, and attach still dimmed the conversation behind a scrim with the keyboard up underneath. Only the tray's own view was left out of the merge; everything it needs was there. The chat now opens AttachTray in its own bottom bar, under the composer: - the plus turns into the cross that closes the tray, and closing it hands focus back to the field, so the draft is never lost; - opening the tray clears focus and hides the keyboard, and the tray is built to the measured keyboard height, so the composer holds still (0 px across the swap, per AttachTrayHeight); - the composer clears nothing while the tray holds that slot, and its keyboard height comes from ImeGuard, so an OEM that overstates the inset cannot hand the tray a window-sized slot; - Back closes the tray before it leaves the chat; - every picker still goes through launchOrExplain, so a device without a camera app explains itself instead of crashing. AttachSheet is removed with its preview: with the tray wired in it was a second, unused attach UI. JUnit: AttachTrayWiringTest (the tray in the bottom bar, all five tiles, the keyboard swap, the Back handler, the dead sheet) and AudioAttachmentTest reads the tray's Audio tile instead of the sheet's row. scripts/test-attach-tray.sh: 26 checks on emulator-5556, 0 failed; on the sheet build the same script fails 5, including "the keyboard stayed up under the tray" and "the conversation disappeared behind the tray".
an1ndra
force-pushed
the
fix/attach-tray-ui
branch
from
November 19, 2026 10:10
c8ae1e7 to
c1f6817
Compare
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.
What was wrong
Merging
feat/attach-tray(#493) keptDevelop's older list sheet (AttachSheet) wired into the chat, so the branch's own tray —AttachTray— shipped unused.grep AttachTray ChatScreen.ktwas 0: the feature merged, the design did not. The tray on screen was a "Share" list (Gallery / Contact / Location / Audio / Camera rows), never the tile grid the branch was built around.The fix
The chat now opens
AttachTray:AttachTrayMetrics(the width/keyboard slot maths that already has unit tests),launchOrExplain) still wraps every tile, so a device without a camera or picker cannot crash the chat,chat_media_*strings, so all 13 locales already cover them.Proof
Installed on
emulator-5556and verified in the GUI: tapping the paperclip shows the tile grid with Camera, Gallery, Audio, Location, Contact — the screenshot is attached to the thread.AttachTrayMetricsTeststill covers the layout maths; the wiring is the one-line change fromAttachSheet(...)toAttachTray(...).Note
AttachSheet.ktis now unused by the chat. I left the file in place for this PR so the review is a single behaviour change; a follow-up can delete it and its preview.