From ab81f4d072b7387dab09cc0bcb6020790d9a3b00 Mon Sep 17 00:00:00 2001 From: Andres Pineda Date: Sat, 28 Sep 2024 18:31:53 -0400 Subject: [PATCH 1/4] docs: FeedView update wording (cherry picked from commit de9ea2759e70358596acc75d8ade6d29678fe84c) --- doc/Learn/Mvux/FeedView.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/Learn/Mvux/FeedView.md b/doc/Learn/Mvux/FeedView.md index 095b2c293d..75447c4f21 100644 --- a/doc/Learn/Mvux/FeedView.md +++ b/doc/Learn/Mvux/FeedView.md @@ -4,7 +4,7 @@ uid: Uno.Extensions.Mvux.FeedView # The `FeedView` control -The `FeedView` control is one of the main ways to consume Feeds and States within an application. The `FeedView` uses different visual states to control what is displayed on the screen depending on the state of the underlying `IFeed`, or `IState`. +The `FeedView` control is one of the main ways to consume Feeds and States within an application. It uses different visual states to control what is displayed on the screen depending on the state of the underlying `IFeed`, or `IState`. ## How to use the `FeedView` control @@ -192,9 +192,7 @@ But you can customize that by overriding the `ProgressTemplate`: ### NoneTemplate -If you set a template to this property, it will show if the data that was returned from the service contained no entries. -For instance, if an `IFeed` completed its request successfully with the server returning a `null` result, it's important to note that this is not considered an `Error`. Instead, it's still considered a successful result with no data. -Similarly, when using `IListFeed`, the `NoneTemplate` will also display if the collection is empty, as well as if the result is `null.` +Setting a template to this property will show when the data returned from the service contains no entries. For instance, if an `IFeed` completed its request successfully with the server returning a `null` result, it's important to note that this is not considered an `Error`. Instead, it's still considered a successful result with no data. Similarly, when using `IListFeed`, the `NoneTemplate` will also display if the collection is empty, as well as if the result is `null.` Example: @@ -214,12 +212,14 @@ Example: ### ErrorTemplate -The `FeedView` will display this template if an Exception was thrown by the underlying asynchronous operation. +The `FeedView` will display this template if the underlying asynchronous operation throws an Exception. + +Example: ### UndefinedTemplate -This template is displayed when the control loads before the underlying asynchronous operation has even been called. -As soon as the asynchronous operation is invoked and awaited, the `FeedView` will switch to its `ProgressTemplate`, until the operation has resulted in data, which it will then switch to the `ValueTemplate`, or `NoneTemplate`, depending on the data result. +This template is displayed when the `FeedView` loads before the underlying asynchronous operation has even been called. +As soon as the asynchronous operation is invoked and awaited, the `FeedView` will switch to its `ProgressTemplate` until the operation has resulted in data, at which point it will switch to the `ValueTemplate` or `NoneTemplate`, depending on the data result. Typically, this template will only show for a very short period - a split second or so, depending on how long it takes for the page and its Model to load. @@ -227,7 +227,7 @@ Typically, this template will only show for a very short period - a split second ### Refresh command property -The `FeedView` provides an asynchronous `Command` you can bind to, which, when executed, will refresh the underlying `Feed` by re-requesting its data source. +The `FeedView` provides an asynchronous `Command` to which you can bind. When executed, this command will refresh the underlying `Feed` by re-requesting its data source. Here's how to utilize it: From 21b936ce1bc93220a29d8f705de74a5eee3110e7 Mon Sep 17 00:00:00 2001 From: Andres Pineda Date: Sat, 28 Sep 2024 18:32:25 -0400 Subject: [PATCH 2/4] docs: FeedView add template samples (cherry picked from commit 0a4a6559e63b3a8e0ace1721aeb0bea174a2d978) --- doc/Learn/Mvux/FeedView.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/doc/Learn/Mvux/FeedView.md b/doc/Learn/Mvux/FeedView.md index 75447c4f21..0be780282f 100644 --- a/doc/Learn/Mvux/FeedView.md +++ b/doc/Learn/Mvux/FeedView.md @@ -216,6 +216,20 @@ The `FeedView` will display this template if the underlying asynchronous operati Example: +```xml + + + ... + + + + + + + + +``` + ### UndefinedTemplate This template is displayed when the `FeedView` loads before the underlying asynchronous operation has even been called. @@ -223,6 +237,20 @@ As soon as the asynchronous operation is invoked and awaited, the `FeedView` wil Typically, this template will only show for a very short period - a split second or so, depending on how long it takes for the page and its Model to load. +```xml + + + ... + + + + + + + + +``` + ## Other notable features ### Refresh command property From d0ea897d48fa51e11bde137a7fe346cb3d3e537a Mon Sep 17 00:00:00 2001 From: Andres Pineda Date: Mon, 7 Oct 2024 12:20:22 -0400 Subject: [PATCH 3/4] docs: update FeedView refresh command (cherry picked from commit cfed0da6c4a638e3c52462d9b09ddc55e96fd0d5) --- doc/Learn/Mvux/FeedView.md | 43 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/doc/Learn/Mvux/FeedView.md b/doc/Learn/Mvux/FeedView.md index 0be780282f..150de02708 100644 --- a/doc/Learn/Mvux/FeedView.md +++ b/doc/Learn/Mvux/FeedView.md @@ -106,7 +106,26 @@ For example: ``` -The `Button`'s `Command` property binds to the `FeedViewState`'s `Refresh` property which exposes a special asynchronous command that when called, triggers a refresh of the parent feed (in our example `CurrentContact`, and the data is re-obtained from the server. +The `Button`'s `Command` property binds to the `FeedViewState`'s `Refresh` property, which exposes a special asynchronous command that, when called, triggers a refresh of the parent feed, in our example, `CurrentContact`, and the data is re-obtained from the server. + +It's also possible to bind the `Refresh` command to a Control outside the `FeedView` template, as shown below: + +```xml + + + + + + + + + +