Conversation
Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
…tering) Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
…ance Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
…alone UIToolbar Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
…IToolbarAppearance config Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new cross-platform bottom action Toolbar component to DIPS.Mobile.UI, integrated with Components.Pages.ContentPage via a BottomToolbar property and supported by platform handlers for iOS and Android. Also includes sample usage and wiki documentation.
Changes:
- Introduces
Toolbar,ToolbarGroup, andToolbarButtonwith alignment, busy/visibility states, and menu support. - Adds
ContentPage.BottomToolbarplumbing + scroll-direction tracking to support hide-on-scroll behavior. - Adds a sample page and a new wiki page documenting usage and patterns.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 17 comments.
Show a summary per file
| File | Description |
|---|---|
| wiki/Components/Toolbar.md | New documentation page for the Toolbar component and usage patterns |
| src/library/DIPS.Mobile.UI/Components/Toolbar/iOS/ToolbarHandler.cs | iOS native UIToolbar handler with item building, menus, and animations |
| src/library/DIPS.Mobile.UI/Components/Toolbar/dotnet/ToolbarHandler.cs | net10.0 stub handler |
| src/library/DIPS.Mobile.UI/Components/Toolbar/ToolbarHorizontalAlignment.cs | Alignment enum for Start/Center/End positioning |
| src/library/DIPS.Mobile.UI/Components/Toolbar/ToolbarHandler.cs | Shared handler logic (property mapper + button property subscriptions) |
| src/library/DIPS.Mobile.UI/Components/Toolbar/ToolbarGroup.cs | Groups of toolbar buttons with BindingContext propagation |
| src/library/DIPS.Mobile.UI/Components/Toolbar/ToolbarButton.cs | ToolbarButton element with menu BindingContext propagation |
| src/library/DIPS.Mobile.UI/Components/Toolbar/ToolbarButton.Properties.cs | Bindable properties for ToolbarButton (Title/Icon/Command/IsVisible/IsBusy/etc.) |
| src/library/DIPS.Mobile.UI/Components/Toolbar/Toolbar.cs | Core Toolbar view API (Groups, alignment, hide-on-scroll target, Show/Hide) |
| src/library/DIPS.Mobile.UI/Components/Toolbar/Android/ToolbarHandler.cs | Android “floating pill” handler with ripple/elevation + visibility/busy transitions |
| src/library/DIPS.Mobile.UI/Components/Shell/iOS/ShellRenderer.cs | Removes an unused alias to avoid naming conflicts |
| src/library/DIPS.Mobile.UI/Components/Shell/Android/ShellRenderer.cs | Disambiguates Android Toolbar type after introducing new Toolbar component |
| src/library/DIPS.Mobile.UI/Components/Pages/iOS/ContentPage.cs | iOS platform attach/detach for BottomToolbar + pan-velocity scroll detection |
| src/library/DIPS.Mobile.UI/Components/Pages/dotnet/ContentPage.cs | net10.0 stubs for toolbar attach/scroll tracking |
| src/library/DIPS.Mobile.UI/Components/Pages/ContentPage.cs | Shared BottomToolbar lifecycle + scroll tracking orchestration |
| src/library/DIPS.Mobile.UI/Components/Pages/ContentPage.Properties.cs | Adds BottomToolbar bindable property |
| src/library/DIPS.Mobile.UI/Components/Pages/Android/ContentPage.cs | Android platform attach/detach + scroll direction tracking using scroll listeners |
| src/library/DIPS.Mobile.UI/AssemblyInfo.cs | Registers Toolbar namespace for XAML xmlns |
| src/library/DIPS.Mobile.UI/API/Builder/AppHostBuilderExtensions.cs | Registers Toolbar handler in DI/handler setup |
| src/app/Components/REGISTER_YOUR_SAMPLES_HERE.cs | Registers the Toolbar sample |
| src/app/Components/ComponentsSamples/Toolbar/ToolbarSamplesViewModel.cs | Toolbar sample VM (commands + busy/visible flags) |
| src/app/Components/ComponentsSamples/Toolbar/ToolbarSamples.xaml.cs | Sample code-behind wiring (Loaded -> HidesOnScrollFor, toggles, close) |
| src/app/Components/ComponentsSamples/Toolbar/ToolbarSamples.xaml | Sample UI demonstrating groups, menu button, busy/visibility, hide-on-scroll |
| CHANGELOG.md | Release notes for the new Toolbar + ContentPage integration |
Vetle444
left a comment
There was a problem hiding this comment.
Dæ eg ser e at dæ e veldig masse logikk i ContentPage, kunn dæ ha vært abstrahert ut i en klasse, kor man har referanse te contentpage inni den klassen?
Absolutt, jeg tenkte det samme. Det er også mye hardkodet verdier for å få stilen bra på Android, ska få disse ut som delte variabler. Jeg jobber med TaskToolbarItem nå, når den er ferdig skal jeg sjekke den inn å refaktorere med tilbakemeldingene dine👍🏻 |
|
@copilot can refactor the content page implementations on ios and android to parial classes that ends on .toolbar? That way we can keep ios and android contentpage implementations simpler and not this crowdy with the toolbar implementation details |
…l files (#828) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: haavamoa <2527084+haavamoa@users.noreply.github.com>
|
@copilot can we rename the error property on tasktoolbarbutton to HandleError and the class we use for this property to ErrorHandler |
…ndleError` on `ToolbarTaskButton` (#829)
|
@copilot looks like android does not compile: /Users/runner/work/1/s/src/library/DIPS.Mobile.UI/Components/Toolbar/Android/ToolbarHandler.cs(637,36): error CS0117: 'ToolbarTaskButton' does not contain a definition for 'Error' [/Users/runner/work/1/s/src/library/DIPS.Mobile.UI/DIPS.Mobile.UI.csproj::TargetFramework=net10.0-android] |
Description of Change
Add a new cross-platform
Toolbarcomponent for bottom action bars in content pages. The toolbar renders as a nativeUIToolbarwith Liquid Glass styling on iOS 26+ and as a Material 3 floating pill with elevation and rounded corners on Android.Key Features
Platform Differences
UIToolbarwith Liquid GlassFrameLayoutwith M3 floating pill (elevation, rounded corners, ripple)UIBarButtonItemwithUIActivityIndicatorViewViewwithProgressBarin pill layoutUIPanGestureRecognizeron target viewFindScrollableDescendant+ViewTreeObserver.OnScrollChangedListenerUIView.Animatefor show/hideAutoTransition+TransitionManagerFiles Changed
Components/Toolbar/— Full toolbar implementation (shared + platform handlers)Components/Pages/ContentPage—BottomToolbarattached property and scroll trackingapp/Components/ComponentsSamples/Toolbar/— Sample page with all toolbar featureswiki/Components/Toolbar.md— Documentation pageTodos