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

Enable requesting the full preview size on iOS drag shadow & iOS and Windows Samples #17282

Merged

Conversation

tj-devel709
Copy link
Member

@tj-devel709 tj-devel709 commented Sep 8, 2023

Description of Change

On iOS, when you drag an item inside the drag and drop context, the system automatically resizes the item so that you can more easily see where it is going. However, if we have say a collectionview with custom functionality, we may want to request to keep the drag items the same size. This PR allows the customer to throw in a func and request to keep their items the full size when dragging.

I also added in a sample to the gallery to see how this request full preview, using custom PreviewProviders, and different UIDropProposals interact with each other!

iOSDragNDropDemo2.mov

edit: I also added a sample for Windows showing some platform-specific code to change the drag caption and glyph!

BetterWindowsDragNDropDemo.mov

Issues Fixed

Fixes #17281

@tj-devel709 tj-devel709 added platform/macOS 🍏 macOS / Mac Catalyst platform/iOS 🍎 partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with area-gestures Gesture types labels Sep 8, 2023
@tj-devel709 tj-devel709 requested a review from a team as a code owner September 8, 2023 17:37
@samhouts samhouts added this to the .NET 8 GA milestone Sep 11, 2023
@tj-devel709 tj-devel709 changed the title Enable requesting the full preview size on iOS drag shadow Enable requesting the full preview size on iOS drag shadow & iOS and Windows Samples Sep 12, 2023
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Looks nice!

How could we do tests for this? I know it is just setting platform props, but I see things in iOS that we are doing. Any way to test that at all?

@tj-devel709
Copy link
Member Author

Looks nice!

How could we do tests for this? I know it is just setting platform props, but I see things in iOS that we are doing. Any way to test that at all?

In the last PR I have for drag and drop stuff, I added some UITests to make sure that the properties in the PlatformArgs exist when appropriate. This one adds a set method and I'm not really too sure how we can test that visually the drag objects are changing. What kinds of things are you referring to in iOS?

@PureWeen PureWeen merged commit 96073eb into dotnet:main Sep 13, 2023
samhouts pushed a commit that referenced this pull request Sep 17, 2023
* Removed references to GraphicsTester.Skia.Tizen from Maui-dev and Maui-vscode sln files. (#17334)

* Enable requesting the full preview size on iOS drag shadow & iOS and Windows Samples (#17282)

* Enable requesting the full preview size on iOS drag shadow

* Add in windows drag and drop sample

* Move itemssource class into main class

---------

Co-authored-by: TJ Lambert (HE/HIM/HIS) <[email protected]>

* Wait for parent to get set before realizing titleview (#17360)

* [create-pull-request] automated change (#17362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Make the taps work on all platforms (#17325)

* Added integration test for maui blazor maccatalyst codesign verification. (#17331)

* Added integration test for maui blazor maccatalyst codesign verification.

* Created new Codesign class and moved SearchForExpectedEntitlements to it.

* Updated to DotNetCurrent

* [C] Replace value with same specificity (#17365)

We don't have a test for that

-fixes #17357

* Enable Mac Catalyst Controls Device Tests in CI (#17229)

* Enable Mac Catalyst Controls Device Tests in CI

* Disable failing tests

* [C] Port the specificity concept to Bindings (#17215)

* [C] Port the specificity concept to Bindings

Allow having multiple layers of Bindings, useful for e.g.
AppThemeBinding, Style, VSM

- fixes #16538

* test for 17354

* Revert changes to setting context and add tests (#17348)

* Remove macOS as that is not installed by default (#17379)

* Increase timeouts to 4 hours (#17386)

* Bump the aspnetcore group with 7 updates (#17345)

Bumps the aspnetcore group with 7 updates:

| Package | From | To |
| --- | --- | --- |
| [Microsoft.AspNetCore.Authorization](https://github.com/dotnet/aspnetcore) | `7.0.10` | `7.0.11` |
| [Microsoft.AspNetCore.Components.WebView](https://github.com/dotnet/aspnetcore) | `7.0.10` | `7.0.11` |
| [Microsoft.JSInterop](https://github.com/dotnet/aspnetcore) | `7.0.10` | `7.0.11` |
| [Microsoft.AspNetCore.Components.Web](https://github.com/dotnet/aspnetcore) | `7.0.10` | `7.0.11` |
| [Microsoft.AspNetCore.Authentication.Facebook](https://github.com/dotnet/aspnetcore) | `7.0.10` | `7.0.11` |
| [Microsoft.AspNetCore.Authentication.Google](https://github.com/dotnet/aspnetcore) | `7.0.10` | `7.0.11` |
| [Microsoft.AspNetCore.Authentication.MicrosoftAccount](https://github.com/dotnet/aspnetcore) | `7.0.10` | `7.0.11` |


Updates `Microsoft.AspNetCore.Authorization` from 7.0.10 to 7.0.11
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.10...v7.0.11)

Updates `Microsoft.AspNetCore.Components.WebView` from 7.0.10 to 7.0.11
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.10...v7.0.11)

Updates `Microsoft.JSInterop` from 7.0.10 to 7.0.11
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.10...v7.0.11)

Updates `Microsoft.AspNetCore.Components.Web` from 7.0.10 to 7.0.11
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.10...v7.0.11)

Updates `Microsoft.AspNetCore.Authentication.Facebook` from 7.0.10 to 7.0.11
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.10...v7.0.11)

Updates `Microsoft.AspNetCore.Authentication.Google` from 7.0.10 to 7.0.11
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.10...v7.0.11)

Updates `Microsoft.AspNetCore.Authentication.MicrosoftAccount` from 7.0.10 to 7.0.11
- [Release notes](https://github.com/dotnet/aspnetcore/releases)
- [Changelog](https://github.com/dotnet/aspnetcore/blob/main/docs/ReleasePlanning.md)
- [Commits](dotnet/aspnetcore@v7.0.10...v7.0.11)

---
updated-dependencies:
- dependency-name: Microsoft.AspNetCore.Authorization
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: aspnetcore
- dependency-name: Microsoft.AspNetCore.Components.WebView
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: aspnetcore
- dependency-name: Microsoft.JSInterop
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: aspnetcore
- dependency-name: Microsoft.AspNetCore.Components.Web
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: aspnetcore
- dependency-name: Microsoft.AspNetCore.Authentication.Facebook
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: aspnetcore
- dependency-name: Microsoft.AspNetCore.Authentication.Google
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: aspnetcore
- dependency-name: Microsoft.AspNetCore.Authentication.MicrosoftAccount
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: aspnetcore
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [create-pull-request] automated change (#17388)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* [X] fix CollectionItems enumeration (#17364)

- fixes #17333

* passing test for #16960 (#17397)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dustin-wojciechowski <[email protected]>
Co-authored-by: TJ Lambert <[email protected]>
Co-authored-by: TJ Lambert (HE/HIM/HIS) <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: E.Z. Hart <[email protected]>
Co-authored-by: Stephane Delcroix <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 6, 2023
@samhouts samhouts added the fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-gestures Gesture types fixed-in-8.0.0-rc.2.9373 Look for this fix in 8.0.0-rc.2.9373! partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[iOS] Drag and Drop Request Full-Size Previews
4 participants