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

[net8.0] Merge main to net8.0 #17024

Merged
merged 19 commits into from
Aug 29, 2023
Merged

[net8.0] Merge main to net8.0 #17024

merged 19 commits into from
Aug 29, 2023

Conversation

rmarinho
Copy link
Member

@rmarinho rmarinho commented Aug 27, 2023

Description of Change

Bring latest changes from main to net8 branch.
Fixes UITests

jsuarezruiz and others added 9 commits August 25, 2023 19:23
* Fix Keyboard.Numeric issue on DisplayPromptAsync on Android

* Remove AlertsPage sample

---------

Co-authored-by: Rachel Kang <[email protected]>
* Fix flyout crash due to invalid casting of child

* Add tests

* Add additional tests, PR feedback

* Fix missing call to `RemoveLogicalChild`

* Update Clear

---------

Co-authored-by: Mike Corsaro <[email protected]>
b0bba51 was incomplete, in that it missed registrations with 1 type
argument:

    builder.Services.AddScoped<HideSoftInputOnTappedChangedManager>();

So we need to add entries with "`1" for all of the banned methods:

    ++M:Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddScoped`1(Microsoft.Extensions.DependencyInjection.IServiceCollection);Use a Factory method to register the service instead
    M:Microsoft.Extensions.DependencyInjection.ServiceCollectionServiceExtensions.AddScoped`2(Microsoft.Extensions.DependencyInjection.IServiceCollection);Use a Factory method to register the service instead

We can improve startup time by using a factory method instead:

    builder.Services.AddScoped(_ => new HideSoftInputOnTappedChangedManager());

This also found a couple more calls to fix throughout .NET MAUI.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Ignore failures from WhenQueryingCarouselItemsInViewThenSingleItemIsRetrieved

* Update Ignore to include all platformss

* Center window on WinUI, so it's always fully on screen in CI

* Set agent screen resolution bigger for UI tests

* Update baseline snapshots for bigger screen

* Just set screen resolution on Windows

* Ignore Issue16320 on Android
* Fix Android text alignment in migrated projects

* Add (manual) device tests

* Add clarifying comment

* [tentative] Move input tests to generic code

* Wrap up tests

* Make masks constants

* Fix title to be consistent with other test names
* Fix the order of logical modifications

* - keep in sync while removing

* - fix clear
@rmarinho rmarinho requested review from a team as code owners August 27, 2023 22:36
@rmarinho rmarinho enabled auto-merge August 27, 2023 22:37
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mattleibow
mattleibow previously approved these changes Aug 28, 2023
…30821.1 (#17030)

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Common , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 8.0.0-prerelease.23416.1 -> To Version 8.0.0-prerelease.23421.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
@samhouts samhouts added this to the .NET 8 GA milestone Aug 28, 2023
dependabot bot and others added 5 commits August 28, 2023 16:39
Bumps [Microsoft.CodeAnalysis.NetAnalyzers](https://github.com/dotnet/roslyn-analyzers) from 7.0.3 to 7.0.4.
- [Release notes](https://github.com/dotnet/roslyn-analyzers/releases)
- [Changelog](https://github.com/dotnet/roslyn-analyzers/blob/main/PostReleaseActivities.md)
- [Commits](https://github.com/dotnet/roslyn-analyzers/commits)

---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis.NetAnalyzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ropEventArgs (#16335)

* Implemented on Android and Windows

* Added Position property to DragStartingEventArgs

* Implement drag location for iOS

* Document DragStartingEventArgs

* Document DragEventArgs

* Mild refactor + document DragGestureRecognizer

* Avoid duplicated code

* avoid repetitive code

* More changes

* Fix build errors

* Update comment

* Address PR comments + more docs

* Remove TODO

* Use cleaner default param rather than new point

* Apply suggestions from code review

Co-authored-by: Manuel de la Pena <[email protected]>

* Add locations to UI drag and drop test

* Add UI test, fix Windows

* Refactor DragStarting Event args

* Make DragGestureRecognizer support nullable

* DragStarting Android & Windows

Docs

DragStarting Android & Windows

* Drag Android & Windows

* iOS DragStart & Drag

* Began refactor of UITest

* UI Test Improvement

* Changes in Tizen PublicAPI

* Mild improvements, revert making parent view be sender

* Fix parents + typo

* Fix Tizen Unshipped APIs

* Add position to DropEventArgs

* Drop UI Tests + Samples

* Delete DropEventArgs.xml

* Revert "Changes in Tizen PublicAPI"

This reverts commit 7c08990.

* Fix tizen docs

* Fix tize duplicated api

* Fix tizen again

* Fix casting error

* Apply PR feedback

* Delete VisualElementTracker

It wasn't doing anything

* Address PR Comments

---------

Co-authored-by: Juan Diego Herrera <[email protected]>
Co-authored-by: Manuel de la Pena <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
* Implement IsEnabled property in MenuFlyoutItems on Catalyst

* Auto-format source code

* More samples

* Updated Impl

* More refactoring

* Auto-format source code

* Updated sample

* Updated sample

* Updated sample

* Updated sample

* Propagate IsEnabled on MenuItem

* Update src/Core/src/Handlers/MenuBarItem/MenuBarItemHandler.cs

Co-authored-by: Matthew Leibowitz <[email protected]>

* Clear up ios/macos divide

---------

Co-authored-by: GitHub Actions Autoformatter <[email protected]>
Co-authored-by: Javier Suárez <[email protected]>
Co-authored-by: E.Z. Hart <[email protected]>
Co-authored-by: E.Z. Hart <[email protected]>
Co-authored-by: Matthew Leibowitz <[email protected]>
- The main branch builds find with the NET 8 sdk so there's no reason to require/pin it to NET7
…17012)

* [android] CollectionView logical children grows with Header/Footer

Fixes: #16961

Debugging the `ItemsSourceDoesNotLeak()` test with a new `Header` and
`Footer` on Android, there was some very odd behavior...

At the end of the test, `_logicalChildren` contained 9 items!

    Header
    Footer
    Header
    Footer
    Header
    null
    null
    null
    Footer

Where I would expect it to contain 5?!?

It appears the problem is:

* `CollectionView.ItemsSource` changes

* We notify Android's `RecyclerView` to refresh

* `RecyclerView` calls `OnCreateViewHolder()` for the header, footer,
  and all rows.

* `CreateHeaderFooterViewHolder()` is called again for the header &
  footer.

* Duplicate `viewHolder.View` items are added as logical children.

To fix this, an idea:

* Create a new `internal ContainsLogicalChild()` method

* Call this before adding the same `View` in
  `CreateHeaderFooterViewHolder()`

This isn't the *best*, because it will iterate over the
`_logicalChildren` to decide if the list contains the view. But this is
better than what strange behavior might result from this?

* Check `viewHolder.View.Parent != ItemsView`
@rmarinho
Copy link
Member Author

@Eilon can you investigate why Blazor tests are failing?

@rmarinho
Copy link
Member Author

@jfversluis This bring more windows tests to net8, can you double check is ok ?

# Conflicts:
#	eng/Versions.props
@Eilon
Copy link
Member

Eilon commented Aug 28, 2023

@rmarinho - at least one of the failures I see for BlazorWebView isn't the tests failing, but rather not even compiling:

/Users/builder/azdo/_work/1/s/src/BlazorWebView/tests/MauiDeviceTests/Elements/BlazorWebViewTests.cs(144,5): error RS0030: The symbol 'ServiceCollectionServiceExtensions.AddScoped<TService>(IServiceCollection)' is banned in this project: Use a Factory method to register the service instead (https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md) [/Users/builder/azdo/_work/1/s/src/BlazorWebView/tests/MauiDeviceTests/MauiBlazorWebView.DeviceTests.csproj::TargetFramework=net8.0-ios]
/Users/builder/azdo/_work/1/s/src/BlazorWebView/tests/MauiDeviceTests/Elements/BlazorWebViewTests.cs(186,5): error RS0030: The symbol 'ServiceCollectionServiceExtensions.AddScoped<TService>(IServiceCollection)' is banned in this project: Use a Factory method to register the service instead (https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md) [/Users/builder/azdo/_work/1/s/src/BlazorWebView/tests/MauiDeviceTests/MauiBlazorWebView.DeviceTests.csproj::TargetFramework=net8.0-ios]
/Users/builder/azdo/_work/1/s/src/BlazorWebView/tests/MauiDeviceTests/Elements/BlazorWebViewTests.cs(214,5): error RS0030: The symbol 'ServiceCollectionServiceExtensions.AddScoped<TService>(IServiceCollection)' is banned in this project: Use a Factory method to register the service instead (https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.BannedApiAnalyzers/BannedApiAnalyzers.Help.md) [/Users/builder/azdo/_work/1/s/src/BlazorWebView/tests/MauiDeviceTests/MauiBlazorWebView.DeviceTests.csproj::TargetFramework=net8.0-ios]

@jonathanpeppers - are these symbols supposed to be banned in tests or just prod code? Or maybe that was changed in another PR you sent?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this should have been committed @PureWeen ?

Copy link
Member

Choose a reason for hiding this comment

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

There is another one just below

@jfversluis
Copy link
Member

@rmarinho yeah the tests aren't even running yet as Eilon mentions. Tests seem OK to me from a glance. But it's the banned symbols thing that needs to be resolved first.

@jfversluis
Copy link
Member

jfversluis commented Aug 29, 2023

@Eilon you approved it yourself 😬 #17004

Weird that it didn't give any errors before. So I guess the calls for the BlazorWebView tests need some updating

Found that <IsTestProject>true</IsTestProject> could be used for this, adding that to the BlazorWebView test project.

@jonathanpeppers
Copy link
Member

Yes, $(IsTestProject) was added in e7812b0 if you need to turn off the BannedApisAnalyzer in a test project.

Generally, it should be fine to use these "banned apis" in tests, as they are usually banned for performance reasons.

@Eilon
Copy link
Member

Eilon commented Aug 29, 2023

All green now.

@rmarinho rmarinho removed the request for review from jsuarezruiz August 29, 2023 18:15
@rmarinho rmarinho merged commit 83c5aa4 into net8.0 Aug 29, 2023
@rmarinho rmarinho deleted the merge-main-to-net82 branch August 29, 2023 18:24
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2023
@samhouts samhouts added the fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171 label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-in-8.0.0-rc.1.9171 Look for this fix in 8.0.0-rc.1.9171
Projects
None yet
Development

Successfully merging this pull request may close these issues.