Repository navigation
Fix share sheet position for "Share challenge URL" on iPad - #3837
Merged
veloce merged 1 commit intoOct 15, 2026
Merged
Conversation
nurullahturkoglu
marked this pull request as ready for review
October 10, 2026 17:11
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.
Fixes #3711
On iPad, tapping "Share challenge URL" opened the share sheet at the top of the screen instead of around the button. The issue was that
launchShareDialogwas using the loading screen's context, sosharePositionOriginended up covering almost the whole screen. Wrapping the button in aBuilderfixed this by passing the button's own context, so the share sheet now opens in the right place.I also added a widget test to check that
share_plusreceives the button's actual position. The test fails without the fix.Tested on the iPad Pro 13-inch (M4) simulator with iOS 26.0, against lichess.dev.
Before:
https://github.com/user-attachments/assets/79f41c1a-5989-4372-b7ab-a93a634d7912
After:
https://github.com/user-attachments/assets/dce5ecd4-710d-49af-bcba-d71bda622280
Other screens also pass a screen-level context to
launchShareDialog. I kept this PR to the challenge screen.AI disclosure: I reproduced the bug and tested the fix myself on the simulator. I used Claude Code to read through the code, write the fix and the test, and draft this description, which I then edited.