-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[file_selector_macos] Do not set nameFieldStringValue for NSOpenPanel #9324
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
[file_selector_macos] Do not set nameFieldStringValue for NSOpenPanel #9324
Conversation
Which is an interesting distinction for them to draw, given that they decided (oddly, IMO) to make It's unfortunate that this was only documented in the header, and not the primary API docs 😐 Given the undocumented-anywhere-but-observed behavior that it logs a message implying that we are doing something wrong rather than silently ignoring it, we should probably change the implementation to not call the setter in this case. This is the kind of logging that leads to the situation where anyone reporting any issue related to the plugin sees what sounds like an error being logged, thinks it's related to the problem they are having, and then everyone piles every unrelated report into a single issue because they find that log string when searching the issue tracker. |
Good idea. Updated the PR |
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.
LGTM
(Other than the fact that we need to do this at all)
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.
flutter/packages@6eebe72...5743798 2025-05-27 [email protected] [file_selector_macos] Do not set nameFieldStringValue for NSOpenPanel (flutter/packages#9324) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…flutter#9324) file_selector_macos is trying to set [`nameFieldStringValue`](https://developer.apple.com/documentation/appkit/nssavepanel/namefieldstringvalue) for an `NSOpenPanel`. However, `nameFieldStringValue` does not support `NSOpenPanel`, it only supports `NSSavePanel`. This PR does not set `nameFieldStringValue` if using `NSOpenPanel`. It also updates the tests to verify it works for `NSSavePanel` and not `NSOpenPanel`.  Fixes flutter/flutter#169510. ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
…flutter#9324) file_selector_macos is trying to set [`nameFieldStringValue`](https://developer.apple.com/documentation/appkit/nssavepanel/namefieldstringvalue) for an `NSOpenPanel`. However, `nameFieldStringValue` does not support `NSOpenPanel`, it only supports `NSSavePanel`. This PR does not set `nameFieldStringValue` if using `NSOpenPanel`. It also updates the tests to verify it works for `NSSavePanel` and not `NSOpenPanel`.  Fixes flutter/flutter#169510. ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
file_selector_macos is trying to set
nameFieldStringValue
for anNSOpenPanel
. However,nameFieldStringValue
does not supportNSOpenPanel
, it only supportsNSSavePanel
.This PR does not set
nameFieldStringValue
if usingNSOpenPanel
. It also updates the tests to verify it works forNSSavePanel
and notNSOpenPanel
.Fixes flutter/flutter#169510.
Pre-Review Checklist
[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or I have commented below to indicate which version change exemption this PR falls under1.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or I have commented below to indicate which CHANGELOG exemption this PR falls under1.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.
Footnotes
Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. ↩ ↩2 ↩3