Commit 0bc2572
Popup V2 (#1581)
* Initial musings on showing popups without having to create your own popup
* Remove commented code
* Pass on the BindingContext of a view up to the popup
* Expand IPopupService API to enable the ability to supply the configurable properties
The aim is to allow us to hide the Popup away from developers, or at least simply the usage of showing a popup to not needing to create a Popup implementation
* Name the cancellation token usage
* Include DynamicallyAccessedMembers
* Popup V2
* Update samples
* Fix tests
* register all popups
* fix tizen build
* await tasks
* fix xaml
* Fix tests
* Fix popup Result
* Fix tests, fix samples, rework popup service
* fix sample
* Fix back button
* Fix tests
* Add Navigation parameter
* Fix after rebase
* Remove old page
* Add docs
* Use Partial Property
* Disable `PushModalAsync` and `PopModalAsync` Animations
* Remove Circular Reference to PopupContainer
* Remove Null Forgiving Operator
* Update Event Name
* Add CancellationToken Parameter
* Remove duplicate `()`
* Add PopupExtension method for `Page`
* Remove `return await`
* Update formatting
* Use `WeakEventManager`
* Remvoe Duplicate `SemanticOrderViewPageViewModel` Mapping
* Use Bindings to ensure `Popup.BindingContext` and `PopupContainer.BindingContext` always matches Popup.BindingContext
* Remove `PopupLifecycleController`, Organize Folder Structure
* Remove `BuildPopupContent()`, `BuildPopupContent` and `ConfigurePopupContainer ` from `PopupExtensions
* Use correct `ShowPopup` method
* Make PopupOptions Bindable, Fix Popup Samples, Add `PopupService.ShowPopup`
* Propogate BindableProperties
* `dotnet format`
* Fix binding
* Apply suggestions from code review
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
* Create `IPopupOptions`, Add `PopupOptions.Empty`, Fix File Naming, Namespaces + Folder Structure
* Add `PopupOptionsDefaults`
* Fix file names
* `dotnet format`
* Move to `CommunityToolkit.Maui`
* Remove `ConvertToLayoutOptions`
* Add PopupContainer Tests
* Add PopupServiceTests
* Add PopupTests
* Remove `PopupAnchor`
* Make `PopupOptions` properties readonly on `Popup`
* Mark `PopupOptions` `BindableProperty`s as `[Obsolete]`
* Update XML Comments, Add `Background`
* Update XML Comments
* Add XC0618 to `WarningsAsErrors`
* Add Unit Tests
* Remove duplicate GetPopupContainer()
* Update PopupServiceTests.cs
* Update Popup Tests
* Add Popup Tests
* Fix Popup_Close_ShouldNotThrowExceptionWhenCloseIsOverridden
* Update Popup Tests
* Update Popup.shared.cs
* Update Popup.shared.cs
* Add CancellationToken to PopupT.Close()
* Add PopupExtensionsTests
* Fix namespace
* Add `PopupOptionsTests`
* Add `IPopupOptionsTests`
* Format + Remove unused code
* Add `PopupContainer Tests`
* Update Unit Tests
* Rename to `bindablePopupOptions`
* Add PopupOptions.BorderStroke
* Rename `PopupOptions.BackgroundColor` -> `PopupOptions.PageOverlayColor`
* Refactor Popup BackgroundColor
* Fix Default Padding and Background Bindings
* Remove duplicate BindingContext Binding
* Add ShowPopupAsync_ShouldReturnResult_WhenPopupIsClosedByTappingOutsidePopup
* Remove duplicate code
* Update PopupResult.shared.cs
* Update PopupResult.shared.cs
* Ensure PopupResult<T> generic type is always nullable
* Refactor `IsNullable()`
* Implement `IPopupResult`
* Update Popup Unit Tests
* Remove XAML from CSharpBindingPopup
* Add PopupOptionsDefaults.PopupBackgroundColor
* Set default Shape + BorderColor
* Add IPopupOptions.Shadow
* Add Shadow, Update Unit Tests
* Add `ArgumentNullException.ThrowIfNull(view);`
* Update Sample Popups
* Ensure PopupContainer.Close closes the correct popup
* Add `popupContainersInModalStackList.Count` check
* Refactor Close
* Add IAsyncDisposable
* Fix failing PopupTests
* Fix PopupSizingIssuesPage
* Update Popup Styling
* Use `PopupOptions.Shape` for BorderStroke and StrokeThickness
* `dotnet format`
* Rename `PopupContainer` -> `PopupPage`
* Update ServiceCollectionExtensions.shared.cs
* Remove `CommunityToolkit.Maui.Extensions.NullableExtensions`
* Rename to `PopupPage`
* Update Sample Popups
* Fix Default `StrokeThickness`
* Refactor `DisplayPopup`
* Add `string? shellRoute`
* Add `string? shellRoute` parameter
* Add `PopupOnDisappearingPage`
* Refactor OnDisappearingPopupPage
* Update PopupOnDisappearingPage.cs
* Remove default parameters from `internal` methods
* Flow Popup Properties through to PopupPageLayout.Content
* Update src/CommunityToolkit.Maui/Extensions/PopupExtensions.shared.cs
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
* Unsubscribe event handler
* Fix XML Comments
* Add `ThrowIfCancellationRequested()`
* Update XML Docs, Create InvalidPopupOperationException, Update Unit Tests
* Add `AddTransientPopup()`, `AddSingletonPopup()` and `AddScopedPopup()`
* Add Unit Tests
* Add Unit Tests
* Update Sample App Popups
* Use Colors.LightGray for Default BorderStroke
* Reduce Sample App Popup VerticalStackLayout Spacing to `6`
* Reduce `BoxView` Margin
* Fix Sample App Build Errors
* Make default constructor internal
* Add Support for Shell + `IQueryAttributable` for PopupV2 (#2661)
* Re-add Handlers with `[Obsolete]`
* Remove `Microsoft.NET.Test.Sdk`
* `dotnet format`
* Update PopupResultException
* Update NuGet Packages
* Fix formatting
* Use `PopupDefaults.Padding` when Padding is not set
* Add `HorizontalOptionsConverter` and `VerticalOptionsConverter` to ensure PopupDefaults are set
* Remove `LayoutOptions.Fill` from `PopupLayoutAlignmentPage`
* Add `ShowPopupAsync_WithViewType_SetsCorrectDefaults`
* Add .NET 10 Compiler Error
This ensures we do not forget to remove the Obsolete Popup classes in our .NET 10 release
* Add `[EditorBrowsable(EditorBrowsableState.Never)]` to Obsolete classes
* Add `PopupExtensions.ClosePopup()` (#2671)
* Add `Close()`
* Update PopupExtensions.shared.cs
* Add CancellationToken
* Add Unit Tests
* Add Support for Shell
* Add .NET 10 Compiler Error
This ensures we do not forget to remove the Obsolete Popup classes in our .NET 10 release
* Rename `Close()` -> `CloseAsync()`
* Add `[EditorBrowsable(EditorBrowsableState.Never)]` to Obsolete classes
* Update Samples
* Fix XML
* Use async/await
* Rename to `CloseAsync`
* Bump `TOOLKIT_NET_VERSION` to 9.0.300
* Update global.json
* Add Page Overloads to IPopupService
---------
Co-authored-by: Shaun Lawrence <17139988+bijington@users.noreply.github.com>
Co-authored-by: Vladislav Antonyuk <vladislav.antonyuk@dataart.com>
Co-authored-by: Vladislav Antonyuk <vlad.antonyuk@gmail.com>
Co-authored-by: Brandon Minnick <13558917+TheCodeTraveler@users.noreply.github.com>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: James Crutchley <ne0rmatrix@gmail.com>1 parent 12adc49 commit 0bc2572
File tree
141 files changed
+5120
-2836
lines changed- .github/workflows
- samples/CommunityToolkit.Maui.Sample
- Models
- Pages
- Converters
- Views
- MediaElement
- Popup
- Resources/Styles
- ViewModels/Views
- Popup
- Views/Popups
- src
- CommunityToolkit.Maui.Analyzers.Benchmarks
- CommunityToolkit.Maui.Analyzers.CodeFixes
- CommunityToolkit.Maui.Analyzers.UnitTests
- CommunityToolkit.Maui.Analyzers
- CommunityToolkit.Maui.Camera.Analyzers.CodeFixes
- CommunityToolkit.Maui.Camera.Analyzers
- CommunityToolkit.Maui.Core
- Extensions
- Handlers/Popup
- Interfaces
- Primitives
- Views/Popup
- CommunityToolkit.Maui.MediaElement.Analyzers.CodeFixes
- CommunityToolkit.Maui.MediaElement.Analyzers
- CommunityToolkit.Maui.MediaElement
- CommunityToolkit.Maui.SourceGenerators.Internal
- CommunityToolkit.Maui.SourceGenerators
- CommunityToolkit.Maui.UnitTests
- Extensions
- Mocks
- Services
- Views/Popup
- CommunityToolkit.Maui
- Extensions
- HandlerImplementation/Popup
- Interfaces
- Popup
- Primitives
- Defaults
- Services
- Views/Popup
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
141 files changed
+5120
-2836
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
| 186 | + | |
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
18 | 16 | | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
26 | 22 | | |
27 | 23 | | |
28 | 24 | | |
29 | | - | |
| 25 | + | |
| 26 | + | |
30 | 27 | | |
31 | 28 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 29 | + | |
36 | 30 | | |
37 | 31 | | |
38 | 32 | | |
39 | | - | |
| 33 | + | |
| 34 | + | |
40 | 35 | | |
41 | 36 | | |
42 | | - | |
43 | | - | |
| 37 | + | |
44 | 38 | | |
45 | 39 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 40 | + | |
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
| |||
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
132 | | - | |
133 | | - | |
| 131 | + | |
| 132 | + | |
134 | 133 | | |
135 | 134 | | |
136 | 135 | | |
| 136 | + | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
| |||
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
70 | | - | |
| 69 | + | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
124 | 123 | | |
125 | 124 | | |
126 | 125 | | |
127 | | - | |
128 | 126 | | |
129 | 127 | | |
130 | 128 | | |
| |||
249 | 247 | | |
250 | 248 | | |
251 | 249 | | |
252 | | - | |
253 | 250 | | |
254 | 251 | | |
255 | 252 | | |
| |||
258 | 255 | | |
259 | 256 | | |
260 | 257 | | |
261 | | - | |
262 | | - | |
| 258 | + | |
263 | 259 | | |
264 | 260 | | |
265 | 261 | | |
| |||
271 | 267 | | |
272 | 268 | | |
273 | 269 | | |
| 270 | + | |
| 271 | + | |
274 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
275 | 288 | | |
276 | 289 | | |
277 | 290 | | |
| |||
This file was deleted.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| |||
Lines changed: 5 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | 253 | | |
257 | 254 | | |
258 | 255 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
277 | 259 | | |
278 | 260 | | |
0 commit comments