-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Add Translate to iOS selection context menu #180021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
hellohuanlin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exciting!
engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm
Outdated
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterPlatformPlugin.mm
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/TranslateController.swift
Outdated
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/TranslateController.swift
Outdated
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/TranslateController.swift
Outdated
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/TranslateController.swift
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/TranslateController.swift
Outdated
Show resolved
Hide resolved
engine/src/flutter/shell/platform/darwin/ios/framework/Source/TranslateController.swift
Outdated
Show resolved
Hide resolved
| if let rect = ipadBounds { | ||
| return .rect(rect) | ||
| } | ||
| return .bounds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment on why use different anchor source for iphone/ipad?
The format is off. @jmagman i remember you setup formatter in packages repo. Do we also have it setup for flutter repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LouiseHsu can you manually format this code in xcode by using CMD + A then Control + I
|
autosubmit label was removed for flutter/flutter/180021, because - The status or check suite Linux web_canvaskit_tests_4 has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
|
| dest='variant', | ||
| action='store', | ||
| default='host_debug_unopt_arm64', | ||
| default='host_debug_unopt', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remember to revert this @LouiseHsu
|
Ugh, the test failures are real. The semantic node order is wrong even when the translate option is not being triggered - this failure occurs for a test for just a normal disabled text field. Note that root node in the expect has |
Fixes #150392, part of #107578
This PR adds a "Translate" action to the ios selection context menu using this swiftui translate api announce during WWDC 2024.
Includes the ipad implementation as well.
Simulator.Screen.Recording.-.iPad.Air.11-inch.M3.-.2025-05-28.at.14.11.58.mp4
Simulator.Screen.Recording.-.iPhone.16.Plus.-.2025-05-28.at.14.09.13.mp4
Pre-launch Checklist
///).