Skip to content
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

Fix the FilePicker.PickMultipleAsync() Not Returning Null When Canceled #27924

Closed
wants to merge 115 commits into from

Conversation

Shalini-Ashokan
Copy link
Contributor

Issue Details

If the user cancels the file picking, the result must be null. However, FilePicker.PickMultipleAsync() does not return a null value.

Root Cause

The method currently returns a file result value even when the user cancels the file pick operation.

Description of Change

Modify the FilePicker.PickMultipleAsync() method to be nullable and return null when the user cancels the file pick operation.

Validated the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #27710

Output ScreenShot

Before After
BeforeFix.mov
AfterFix.mov

rmarinho and others added 30 commits October 19, 2024 23:50
* Run on arm the device tests

* no brew

* install api35

* add log installdefault api

* use iOS pool

* Maybe try skip this on handlers main build

* Add new pool name
# Conflicts:
#	eng/pipelines/handlers.yml
#	src/Essentials/test/DeviceTests/Tests/DeviceInfo_Tests.cs
Update runtime

Try private

Try 200

Try again

GTry

Teste again

Try public

Fix emscript

Update NuGet.config

Fix url

Missing s
### Description of Change

Bring latest changes fro main to net9.0 so we can test iOS and Android
workloads
* Update dependencies from https://github.com/dotnet/android build 9.0.20-ci.net9.24570.1+azdo.10587270

Microsoft.Android.Sdk.Windows
 From Version 35.0.16 -> To Version 35.0.18

Dependency coherency updates

Microsoft.NET.Workload.Emscripten.Current.Manifest-9.0.100.Transport
 From Version 9.0.0 -> To Version 9.0.0-rtm.24515.1 (parent: Microsoft.NETCore.App.Ref

* Update the EMSscript to use non transport version

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Rui Marinho <[email protected]>
### Description of Change

Bring latest changes from main to net9.0
…0241127.10 (dotnet#26205)

Microsoft.AspNetCore.Authentication.Facebook , Microsoft.AspNetCore.Authentication.Google , Microsoft.AspNetCore.Authentication.MicrosoftAccount , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.Components.Forms , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.Components.WebAssembly , Microsoft.AspNetCore.Components.WebAssembly.Server , Microsoft.AspNetCore.Components.WebView , Microsoft.AspNetCore.Metadata , Microsoft.JSInterop
 From Version 10.0.0-alpha.2.24571.1 -> To Version 10.0.0-alpha.2.24577.10

Dependency coherency updates

Microsoft.Extensions.Configuration,Microsoft.Extensions.Configuration.Abstractions,Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.DependencyInjection,Microsoft.Extensions.DependencyInjection.Abstractions,Microsoft.Extensions.FileProviders.Abstractions,Microsoft.Extensions.Logging.Abstractions,Microsoft.Extensions.Logging,Microsoft.Extensions.Logging.Console,Microsoft.Extensions.Logging.Debug,Microsoft.Extensions.Primitives
 From Version 10.0.0-alpha.1.24569.15 -> To Version 10.0.0-alpha.1.24576.1 (parent: Microsoft.AspNetCore.Authorization

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…0241205.9 (dotnet#26429)

Microsoft.AspNetCore.Authentication.Facebook , Microsoft.AspNetCore.Authentication.Google , Microsoft.AspNetCore.Authentication.MicrosoftAccount , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.Components.Forms , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.Components.WebAssembly , Microsoft.AspNetCore.Components.WebAssembly.Server , Microsoft.AspNetCore.Components.WebView , Microsoft.AspNetCore.Metadata , Microsoft.JSInterop
 From Version 10.0.0-alpha.2.24577.10 -> To Version 10.0.0-alpha.2.24605.9

Dependency coherency updates

Microsoft.Extensions.Configuration,Microsoft.Extensions.Configuration.Abstractions,Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.DependencyInjection,Microsoft.Extensions.DependencyInjection.Abstractions,Microsoft.Extensions.FileProviders.Abstractions,Microsoft.Extensions.Logging.Abstractions,Microsoft.Extensions.Logging,Microsoft.Extensions.Logging.Console,Microsoft.Extensions.Logging.Debug,Microsoft.Extensions.Primitives
 From Version 10.0.0-alpha.1.24576.1 -> To Version 10.0.0-alpha.1.24605.1 (parent: Microsoft.AspNetCore.Authorization

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…0241207.1 (dotnet#26454)

Microsoft.AspNetCore.Authentication.Facebook , Microsoft.AspNetCore.Authentication.Google , Microsoft.AspNetCore.Authentication.MicrosoftAccount , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.Components.Forms , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.Components.WebAssembly , Microsoft.AspNetCore.Components.WebAssembly.Server , Microsoft.AspNetCore.Components.WebView , Microsoft.AspNetCore.Metadata , Microsoft.JSInterop
 From Version 10.0.0-alpha.2.24605.9 -> To Version 10.0.0-alpha.2.24607.1

Dependency coherency updates

Microsoft.Extensions.Configuration,Microsoft.Extensions.Configuration.Abstractions,Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.DependencyInjection,Microsoft.Extensions.DependencyInjection.Abstractions,Microsoft.Extensions.FileProviders.Abstractions,Microsoft.Extensions.Logging.Abstractions,Microsoft.Extensions.Logging,Microsoft.Extensions.Logging.Console,Microsoft.Extensions.Logging.Debug,Microsoft.Extensions.Primitives
 From Version 10.0.0-alpha.1.24605.1 -> To Version 10.0.0-alpha.1.24605.9 (parent: Microsoft.AspNetCore.Authorization

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…0241208.1 (dotnet#26476)

Microsoft.AspNetCore.Authentication.Facebook , Microsoft.AspNetCore.Authentication.Google , Microsoft.AspNetCore.Authentication.MicrosoftAccount , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.Components.Forms , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.Components.WebAssembly , Microsoft.AspNetCore.Components.WebAssembly.Server , Microsoft.AspNetCore.Components.WebView , Microsoft.AspNetCore.Metadata , Microsoft.JSInterop
 From Version 10.0.0-alpha.2.24607.1 -> To Version 10.0.0-alpha.2.24608.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
…0241210.1 (dotnet#26503)

Microsoft.AspNetCore.Authentication.Facebook , Microsoft.AspNetCore.Authentication.Google , Microsoft.AspNetCore.Authentication.MicrosoftAccount , Microsoft.AspNetCore.Authorization , Microsoft.AspNetCore.Components , Microsoft.AspNetCore.Components.Analyzers , Microsoft.AspNetCore.Components.Forms , Microsoft.AspNetCore.Components.Web , Microsoft.AspNetCore.Components.WebAssembly , Microsoft.AspNetCore.Components.WebAssembly.Server , Microsoft.AspNetCore.Components.WebView , Microsoft.AspNetCore.Metadata , Microsoft.JSInterop
 From Version 10.0.0-alpha.2.24608.1 -> To Version 10.0.0-alpha.2.24610.1

Dependency coherency updates

Microsoft.Extensions.Configuration,Microsoft.Extensions.Configuration.Abstractions,Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.DependencyInjection,Microsoft.Extensions.DependencyInjection.Abstractions,Microsoft.Extensions.FileProviders.Abstractions,Microsoft.Extensions.Logging.Abstractions,Microsoft.Extensions.Logging,Microsoft.Extensions.Logging.Console,Microsoft.Extensions.Logging.Debug,Microsoft.Extensions.Primitives
 From Version 10.0.0-alpha.1.24605.9 -> To Version 10.0.0-alpha.1.24609.1 (parent: Microsoft.AspNetCore.Authorization

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
piersdeseilligny and others added 16 commits February 11, 2025 16:44
)

* Add support for iOS Specific popover-style modals

* Cleanup PR

* Update PublicAPI for other platforms

* Update PublicAPI.Unshipped.txt

* Minor fixes

* Update iOSModalPagePresentationStyle.xaml.cs

---------

Co-authored-by: Gerald Versluis <[email protected]>
# Conflicts:
#	.config/dotnet-tools.json
#	eng/Version.Details.xml
#	eng/Versions.props
#	eng/pipelines/common/variables.yml
#	eng/pipelines/device-tests.yml
#	src/Controls/src/Core/PublicAPI/net-android/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-tizen/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/netstandard/PublicAPI.Unshipped.txt
#	src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
#	src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
#	src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt
### Description of Change

Bring latest changes from main to net10.0 branch
….0-ci.net10.25111.1+azdo.10992587 (dotnet#27719)

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.155 -> To Version 35.99.0-ci.main.156

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25111.1+azdo.10993596

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.156 -> To Version 35.99.0-ci.main.157

* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25111.1+azdo.10995065

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.156 -> To Version 35.99.0-ci.main.158

* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25112.1+azdo.10997150

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.156 -> To Version 35.99.0-ci.main.159

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* fix added

* test added

* unshipped file changes reverted

* attributes added

* test case changes added

* ui test changes added

* test case changes added

* code behind click event removed

* UI test files name changed

* API changes and test case changes added

* modified test sample

* platform condition added in script file

* fix added

* test added

* unshipped file changes reverted

* attributes added

* test case changes added

* ui test changes added

* test case changes added

* code behind click event removed

* UI test files name changed

* API changes and test case changes added

* modified test sample

* platform condition added in script file

* OffColor API added in tizen platform

* sender parameter nullable removed

* simplified a test case

* test sample changes

* new snapshot added

* script changes

* added snapshots for mac
* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25112.1+azdo.11003934

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.159 -> To Version 35.99.0-ci.main.162

* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25113.1+azdo.11009355

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.159 -> To Version 35.99.0-ci.main.164

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* [ci] Update sdk, aspnet and runtime

* [ci] Add RestoreEnablePackagePruning false
….0-ci.net10.25113.1+azdo.11011643 (dotnet#27791)

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.164 -> To Version 35.99.0-ci.main.165

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
….0-ci.net10.25114.1+azdo.11016217 (dotnet#27810)

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.165 -> To Version 35.99.0-ci.main.167

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
* Internalize MessagingCenter

* Oops
* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25118.1+azdo.11021954

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.167 -> To Version 35.99.0-ci.main.169

* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25118.1+azdo.11031872

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.167 -> To Version 35.99.0-ci.main.170

* Update dependencies from https://github.com/dotnet/android build 10.0.0-ci.net10.25119.1+azdo.11032035

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.167 -> To Version 35.99.0-ci.main.171

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
….0-ci.net10.25119.1+azdo.11037128 (dotnet#27902)

Microsoft.Android.Sdk.Windows
 From Version 35.99.0-ci.main.171 -> To Version 35.99.0-ci.main.172

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Feb 20, 2025
Copy link
Contributor

Hey there @Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Feb 20, 2025
@jfversluis
Copy link
Member

This should be targeting the net10.0 branch as it includes breaking API changes

@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz added the area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info label Feb 20, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you retarget to net10.0 branch?

@Shalini-Ashokan Shalini-Ashokan changed the base branch from main to net10.0 February 21, 2025 11:08
@Shalini-Ashokan Shalini-Ashokan changed the base branch from net10.0 to main February 21, 2025 11:16
@Shalini-Ashokan
Copy link
Contributor Author

@jfversluis, The same changes targeting net10 included in the PR. So, I am closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-essentials Essentials: Device, Display, Connectivity, Secure Storage, Sensors, App Info community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FilePicker PickMultipleAsync nullable reference type