-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Implement iOS/macOS secondary ToolbarItems - Shell #30480
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
Implement iOS/macOS secondary ToolbarItems - Shell #30480
Conversation
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.
Pull Request Overview
This PR adds support for secondary toolbar items in Shell on iOS/macOS by introducing a new pull-down menu for items marked Secondary, and also updates the DatePicker API to allow nullable dates.
- Added
ToSecondarySubToolbarItemextension andSecondarySubToolbarItemclass - Modified Shell handlers to group secondary items under a menu button with configurable icon
- Changed
DatePickerproperties and event args to useDateTime?for nullable support
Reviewed Changes
Copilot reviewed 287 out of 1121 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Controls/src/Core/Compatibility/iOS/Extensions/ToolbarItemExtensions.cs | Added ToSecondarySubToolbarItem extension and SecondarySubToolbarItem class |
| src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs | Updated UpdateToolbarItems to insert secondary items into a pull-down menu |
| src/Controls/src/Core/DatePicker/DatePicker.cs | Changed bindable Date, MinimumDate, MaximumDate and related APIs to nullable DateTime? |
Comments suppressed due to low confidence (1)
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellSectionRenderer.cs:391
- Typo:
Viewcois undefined; this should beViewControllerto correctly reference the view controller instance.
break;
| return new PrimaryToolbarItem(item, forceName); | ||
| } | ||
|
|
||
| internal static SecondarySubToolbarItem ToSecondarySubToolbarItem(this ToolbarItem item) |
Copilot
AI
Jul 8, 2025
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.
Add automated UI tests in TestCases.HostApp and TestCases.Shared.Tests to cover the new SecondarySubToolbarItem functionality so secondary toolbar menus are validated end-to-end.
Copilot uses AI. Check for mistakes.
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
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 are some build errors:
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(395,9): error CS0103: The name 'Viewco' does not exist in the current context [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-ios18.5]
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(397,22): error CS0103: The name 'navRenderer' does not exist in the current context [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-ios18.5]
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(394,29): error CS8600: Converting null literal or possible null value to non-nullable type. [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-ios18.5]
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(402,22): error CS8600: Converting null literal or possible null value to non-nullable type. [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-ios18.5]
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(395,9): error CS0103: The name 'Viewco' does not exist in the current context [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-maccatalyst18.5]
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(397,22): error CS0103: The name 'navRenderer' does not exist in the current context [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-maccatalyst18.5]
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(394,29): error CS8600: Converting null literal or possible null value to non-nullable type. [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-maccatalyst18.5]
C:\a\_work\1\s\src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs(402,22): error CS8600: Converting null literal or possible null value to non-nullable type. [C:\a\_work\1\s\src\Controls\src\Core\Controls.Core.csproj::TargetFramework=net10.0-maccatalyst18.5]
8 Error(s)
|
I'm waiting for net10 preview6 to continue working on this PR, but I cannot switch it to draft |
c054fcf to
fc992ee
Compare
Fixed |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
|
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
This PR is an extension for @jfversluis one's #28185 which implements iOS/macOS secondary ToolbarItems for shell pages
Issues Fixed
Fixes #30674
Fixes #815
Screen.Recording.2025-07-08.at.01.45.07.mov