Skip to content

Commit 7059a1a

Browse files
committed
Updates
1 parent 505e58d commit 7059a1a

File tree

4 files changed

+66
-2
lines changed

4 files changed

+66
-2
lines changed

astro.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ export default defineConfig({
236236
{
237237
label: 'Extensions',
238238
link: 'release-notes/extensions'
239+
},
240+
{
241+
label: 'Templates',
242+
link: 'release-notes/templates'
239243
}
240244
]
241245
}

src/content/docs/mediator/extensions/blazor.mdx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,43 @@ simply pass false to the first argument in `UseMaui`
2828
* [User Notification Errors](/mediator/exceptionhandlers)
2929
* [Offline](/mediator/middleware/offline)
3030
* [Replay Stream](/mediator/middleware/replay)
31-
* [Persistent Caching](/mediator/middleware/caching)
31+
* [Persistent Caching](/mediator/middleware/caching)
32+
33+
## Connectivity Broadcaster
34+
Connectivity is used on almost every page or viewmodel in an app. You almost always have to inject the a connectivity service and hook the StateChanged event
35+
to do things like disabling buttons, showing errors, or putting up an banner to let you users know why your app isn't showing fresh data. That's a lot of extra
36+
code, cleanup, hooks, etc. This is where connectivity broadcaster comes in
37+
38+
<Steps>
39+
1. In your main lastout, add the `<InternetConnectivity />` component
40+
```razor
41+
<InternetConnectivity />
42+
```
43+
44+
2. In your pages, controls (in scope of current page), or services, implement the `IConnectivityEventHandler` interface
45+
```csharp
46+
public class MyService : Shiny.Mediator.IConnectivityEventHandler
47+
{
48+
49+
public async Task Handle(ConnectivityChanged @event, IMediatorContext context, CancellationToken ct)
50+
{
51+
// that's it
52+
SomeString = @event.Connected ? "Connected" : "Disconnected";
53+
}
54+
}
55+
```
56+
57+
OR
58+
59+
```razor
60+
@implements Shiny.Mediator.IConnectivityEventHandler
61+
@code {
62+
public async Task Handle(ConnectivityChanged @event, IMediatorContext context, CancellationToken ct)
63+
{
64+
// that's it
65+
SomeString = @event.Connected ? "Connected" : "Disconnected";
66+
await InvokeAsync(StateHasChanged);
67+
}
68+
}
69+
```
70+
</Steps>

src/content/docs/release-notes/mediator.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,17 @@
22
title: Mediator Releases
33
tableOfContents: true
44
---
5-
65
import Aside from '/src/components/Alert.tsx';
76
import RN from '/src/components/ReleaseNote.astro';
87

98
## v4
109

10+
### 4.9.0 - TBD
11+
<RN type="feature">Blazor now has a connectivity event broadcaster. Simply add `<InternetConnectivity />` to your main layout (don't add more than 1)</RN>
12+
<RN type="enhancement">Blazor now has a `IConnectivityEventHandler` that you can implement to receive connectivity events</RN>
13+
<RN type="fix">Blazor connectivity handler was not broadcasting changes</RN>
14+
<RN type="fix" repo="mediator" githubNumber="39">Only release semaphore slim call, if that call passed the waitstate</RN>
15+
1116
### 4.8.0 - July 18, 2025
1217
<RN type="enhancement">User notification exception handler will no longer try to react for subrequests</RN>
1318
<RN type="enhancement">IMediatorContext.Exception is now set if an exception is thrown in the scope of a send/request</RN>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: Templates
3+
tableOfContents: true
4+
---
5+
import Aside from '/src/components/Alert.tsx';
6+
import RN from '/src/components/ReleaseNote.astro';
7+
8+
Shiny.Templates is the fastest way to get a .NET MAUI app up and running with all the Shiny libraries. It also includes TONS of 3rd party libraries and ensures all permissions, plists, entitlements, and other platform specific files are all set up for you. It is the best way to get started with Shiny.
9+
10+
```bash
11+
dotnet new --install Shiny.Templates
12+
```
13+
14+
## v4.0
15+
<RN type="enhancement">Reorganize all 3rd party libraries and place category in front of each to improve clarity and ensure it is nicely organized on Visual Studio</RN>
16+
<RN type="enhancement">Remove old libraries that haven't been receiving updates</RN>

0 commit comments

Comments
 (0)