Repository navigation
Conversation
Right after Select in the forward picker, the comment bar placed its buttons from their old width, so Send was laid out just past the picker's right edge and couldn't be clicked until the next layout. Now the bar's width is computed first and used for both its position and its size.
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.
Key change
In the forward picker, right-click a chat > Select. The comment bar now shows the emoji button and the Send button inside the picker at once, and Send can be clicked. Before, Send was laid out just past the picker's right edge. Only the emoji button showed, in Send's usual place, so a click there opened the emoji panel, and Send itself couldn't be clicked until something else laid the picker out again, for example opening a forum's topics.
The same picker serves Reply in Another Chat and sharing an inline bot result, so Select there is fixed too.
Reason
ShareModalView.updateLayout(ShareModalController.swift) placed the bar's buttons container atsize.width - actionsContainerView.frame.width, the width from the previous pass, and only then gave it the new width.These pickers open in single-pick mode, where Send is hidden and the container is only as wide as the emoji button and its 20 pt gap. Select turns on multiple selection,
notifyshows Send, and the next layout pass placed the wider container from the narrow width. The container ran past the right edge by Send's width plus its gap, and Send, atemojiButton.frame.maxX + 20inside it, started exactly at the picker's right edge. A click there lands outside the picker view, so it never reaches Send.The fix computes the width first and uses it for both the origin and the size, so the buttons start where the comment field ends.
Screenshot/video result (before/after)
Before
The picker's comment bar right after Select on Saved Messages. Only the emoji button shows (x 630–660 pt), in Send's usual place. Send was laid out at x 680–705 pt, starting at the picker's right edge, and a click at its centre landed on the
ModalBackgroundbehind the picker.The whole picker at the same moment, with Saved Messages ticked. Gray boxes cover chats outside the test.
After
Same steps. The emoji button (x 585–615 pt) and Send (x 635–660 pt) are both inside the picker, and a click at Send's centre reaches it.
The whole picker at the same moment.
Confirmation
Tested on macOS 26.6.2 (25G83) in a Debug build (13.2.0, 283467), signed in to a test environment account. Both builds were current master
38309ec9with the same local lab and isolation edits, none of them in the code this PR changes. The After build had all 5 fixes of this run together; the other 4, each sent as its own PR, are: the checkmark success popup with the text popup's glass (ProgressModal.swift); no Open In Window on the My Notes row of Saved Messages (ChatListRowItem.swift); Reply to Option on the right-clicked option while a quiz explanation is shown (ChatPollItem.swift); only the topic's pins counted in a forum topic's pinned list (ChatController.swift). None of them changes the files this PR changes. The scripted test ran one pass per build.Steps, as a scripted test:
e2e supergroup.messages.forwardMessagesrequest went out and deletes the message it posted.ModalBackgroundmessages.forwardMessagesrequestsA local test script runs the picker view's layout code, its init, the
hasCaptionViewandhasSendViewsetters,textWidthand the two lines ofnotifyfrom source, on real AppKit views with stubs for the rest, and reads each share object'smultipleSelectionandblockCaptionViewfrom source. It has 1608 checks; current master fails 456 of them. It covers:15 mutants of the fix (the old width for the origin or the size, the gaps, Send hidden or not, the bar's position and height, Send's position, the
hasSendViewsetter, thenotifyline) all fail it.Limitations:
Only Forward was tested live. Reply in Another Chat and inline-result share use the same code and were checked with the script.
Pickers that open with Send already shown (such as sharing a link, a message, a story or a contact) go through the same line. Their first layout pass also read a stale width; the script covers that pass, but the live test doesn't open these pickers.
Layout only: what Send forwards, the comment and the recipients are unchanged.
The open PR Keep the ticked chats when a topic is picked in the forward picker's Select mode #443 (ticked chats kept when a topic is picked in the forward picker's Select mode) lists this layout under its Limitations as unchanged; this PR fixes it. The two change different lines of
ShareModalController.swiftand merge cleanly together, and also with the open Apply Schedule and Send Without Sound when forwarding to one picked chat #445 and Keep the reply or forward when Reply or Forward to Another Chat is cancelled #436, which change the same file.I confirm that I have tested the affected behavior and verified that it works properly, or verified the content and links for a documentation-only change.