Commit 0f8671c
Add Tizen modal page navigation, aligned with dotnet/maui#37853
Modal page navigation was the one area of this slice that could not be built on
the shipped .NET MAUI 11 surface. ModalNavigationManager.Tizen.cs upstream is an
internal partial-class completion compiled into Microsoft.Maui.Controls, and the
neutral Standard partial only updates logical state, so an out-of-tree backend
gets no rendering and has no DI, factory or provider hook.
dotnet/maui#37853 adds that seam, following the shape already used by
IAlertManager (#36633) and IGesturePlatformManagerFactory (#36655). It is still
OPEN, so its interfaces are not in the 11.0.0-preview.7 package this repository
builds against.
Provisional alignment
---------------------
Core/Platform/Modal/ProvisionalModalNavigationContracts.cs carries copies of
IModalNavigationPlatform, IModalNavigationPlatformFactory and
IModalNavigationHost with member shapes taken verbatim from the PR. Adopting the
real interfaces is then a namespace change on two types plus deleting that file.
The copies live in Microsoft.Maui.Platforms.Tizen, NOT
Microsoft.Maui.Controls.Platform: re-declaring a MAUI type name in a MAUI
namespace would collide (CS0433) for consumers that also reference MAUI's own
build once the PR lands.
ProvisionalModalNavigationContractTests keeps the copies honest. It asserts the
member shape of each interface, asserts the namespace rule, and fails outright
once Microsoft.Maui.Controls.Platform.IModalNavigationPlatform appears in the
referenced assembly, with instructions to delete the provisional file.
Implementation
--------------
TizenModalNavigationPlatform ports ModalNavigationManager.Tizen.cs onto the seam.
SendDisappearing/SendAppearing and the manual _platformModalPages bookkeeping are
deliberately absent: under the seam the framework owns the platform stack and
raises the page lifecycle events, so keeping them would fire those events twice.
Batch pops suppress animation so the intermediate modals of a Shell pop-to-root
do not flash, and the back-button handler resolves the current page on every
press rather than capturing it.
TizenModalPageRealizer replaces modal.ToPlatform(context), which is compiled per
platform and has no Tizen build now that Tizen left the MAUI repository. It does
the same work through public, platform-neutral handler APIs, which also makes
page realization testable on the host.
Dialog coordination is now neutral too
--------------------------------------
NuiModalHost is replaced by TizenModalHost, which drives the new Tizen-owned
ITizenNavigationStack instead of NUI directly. Placeholder balance - the failure
mode that wedges every subsequent modal in the app - is therefore verified by
host-side tests rather than only on device. NuiNavigationStack is now the single
NUI-aware piece of modal coordination.
Window-scoped services
----------------------
ITizenNavigationStack and ITizenWindowBackButton wrap objects the window owns,
but registration happens before any window exists, so both are registered scoped
as holders that the window handler fills in via AttachTizenWindow.
They fail differently on purpose: an unattached navigation stack throws, because
a modal that reports success without appearing is worse than a clear failure,
while an unattached back button records and replays the handler, because
PageAttached can run before the window handler does and a missing back button is
not fatal.
No back-button implementation is supplied here. Upstream that registry lives in
Microsoft.Maui.Platform.WindowExtensions and is consumed by MauiApplication, both
of which belong to the Tizen Core layer; duplicating it would create a second,
competing source of truth for back-button routing. AttachTizenWindow takes the
Core layer's implementation as an optional argument instead.
Testing
-------
150 host-side tests, up from 101. New coverage: modal push/pop ordering,
animation-flag propagation, batch-pop suppression, back-button routing and
disposal, factory per-window isolation and null-return fallback, dialog
placeholder balance including the fault and buried-placeholder paths,
window-scoped holder semantics, and the provisional contract guards.
eng/verify-nui-sources.sh now also type-checks the modal sources. It caught the
back-button boundary problem: NuiWindowBackButton was calling
SetBackButtonPressedHandler, which is a MAUI Core Tizen extension rather than a
NUI or Tizen.UIExtensions API and does not exist here.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent 6bf1bb4 commit 0f8671c
17 files changed
Lines changed: 1887 additions & 95 deletions
File tree
- docs
- eng
- src/Maui.Tizen.Controls
- Core/Platform
- Modal
- Nui
- tests/Controls.UnitTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
0 commit comments