From 0b52d09cd9cc60fb18084c6d5976ef8f9a31e494 Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 13:47:38 +0100 Subject: [PATCH 01/16] typo --- ch09-client-side-scripting.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch09-client-side-scripting.typ b/ch09-client-side-scripting.typ index a3651de..fdd030a 100644 --- a/ch09-client-side-scripting.typ +++ b/ch09-client-side-scripting.typ @@ -514,7 +514,7 @@ Here is what our code looks like now: #figure[ ```js // counter.js <1> -document.querySelectorAll("[data-counter]") <1> +document.querySelectorAll("[data-counter]") <2> .forEach(el => { const output = el.querySelector("[data-counter-output]"), From 29422d2d9af2b5d5561ee773c7b61d708d968f65 Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 13:54:34 +0100 Subject: [PATCH 02/16] set hx-swap off in backticks --- ch08-tricks-of-the-htmx-masters.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch08-tricks-of-the-htmx-masters.typ b/ch08-tricks-of-the-htmx-masters.typ index 166afcf..1ac9d41 100644 --- a/ch08-tricks-of-the-htmx-masters.typ +++ b/ch08-tricks-of-the-htmx-masters.typ @@ -51,7 +51,7 @@ options for creating more advanced Hypermedia-Driven Applications. ==== #indexed[hx-swap] -We’ll start with the hx-swap attribute. This is often not included on elements +We’ll start with the `hx-swap` attribute. This is often not included on elements that issue htmx-driven requests because its default behavior --- `innerHTML`, which swaps the inner HTML of the element --- tends to cover most use cases. From a1c029c7ae371a8df9e770bb6ee0dcca29ba2511 Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 13:58:53 +0100 Subject: [PATCH 03/16] Fix auto listification of "1." in "from Chapter 1." --- ch04-extending-html-as-hypermedia.typ | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ch04-extending-html-as-hypermedia.typ b/ch04-extending-html-as-hypermedia.typ index cd095e9..9f6d668 100644 --- a/ch04-extending-html-as-hypermedia.typ +++ b/ch04-extending-html-as-hypermedia.typ @@ -87,11 +87,10 @@ and address the issues with legacy HTML applications we mentioned above (as well as a few others.) Before we get into how htmx allows us to improve the UX of our Web 1.0 style -application, let’s revisit the hyperlink/anchor tag from Chapter -1. Recall, a hyperlink is what is known as a _hypermedia control_, -a mechanism that describes some sort of interaction with a server by encoding -information about that interaction directly and completely within the control -itself. +application, let’s revisit the hyperlink/anchor tag from Chapter 1. Recall, a +hyperlink is what is known as a _hypermedia control_, a mechanism that describes +some sort of interaction with a server by encoding information about that +interaction directly and completely within the control itself. Consider again this simple #indexed[anchor tag] which, when interpreted by a browser, creates a #indexed[hyperlink] to the website for this book: From 58cb35d86857b24ad0f0543537bec2d228840c2f Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:00:21 +0100 Subject: [PATCH 04/16] typo --- ch04-extending-html-as-hypermedia.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch04-extending-html-as-hypermedia.typ b/ch04-extending-html-as-hypermedia.typ index 9f6d668..13a7815 100644 --- a/ch04-extending-html-as-hypermedia.typ +++ b/ch04-extending-html-as-hypermedia.typ @@ -804,7 +804,7 @@ Let’s take our original #indexed[search] form and convert it to use htmx inste ```) -1. When an htmx-powered element is withing an ancestor form tag, all input values within that +1. When an htmx-powered element is within an ancestor form tag, all input values within that form will be submitted for non-`GET` requests 2. We have switched from an `input` of type `submit` to a `button` and added the `hx-post` attribute From 04a77e03fd6ec492a6f896f15f4314cd0071601c Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:11:07 +0100 Subject: [PATCH 05/16] Comma/word order --- ch06-more-htmx-patterns.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch06-more-htmx-patterns.typ b/ch06-more-htmx-patterns.typ index eb6f6ed..7c835c0 100644 --- a/ch06-more-htmx-patterns.typ +++ b/ch06-more-htmx-patterns.typ @@ -68,7 +68,7 @@ normal form submission. Finally, we only want to do this after a small pause in typing has occurred. As we said, this functionality is very similar to what we needed for email -validation. We can, in fact copy the `hx-trigger` attribute directly from our +validation. In fact, we can copy the `hx-trigger` attribute directly from our email validation example, with its small 200-millisecond delay, to allow a user to stop typing before a request is triggered. From a4c456641f88e53dcd96dcbb5283934dc265d00d Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:12:20 +0100 Subject: [PATCH 06/16] word choice --- ch06-more-htmx-patterns.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch06-more-htmx-patterns.typ b/ch06-more-htmx-patterns.typ index 7c835c0..63df6df 100644 --- a/ch06-more-htmx-patterns.typ +++ b/ch06-more-htmx-patterns.typ @@ -69,7 +69,7 @@ typing has occurred. As we said, this functionality is very similar to what we needed for email validation. In fact, we can copy the `hx-trigger` attribute directly from our -email validation example, with its small 200-millisecond delay, to allow a user +email validation example, with its small 200-millisecond delay, to wait for a user to stop typing before a request is triggered. This is another example of how common patterns come up again and again when From c2c0ad3534998e23ffd16bd541fe0e58e1ca96ce Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:13:14 +0100 Subject: [PATCH 07/16] typo --- ch06-more-htmx-patterns.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch06-more-htmx-patterns.typ b/ch06-more-htmx-patterns.typ index 63df6df..45a4c51 100644 --- a/ch06-more-htmx-patterns.typ +++ b/ch06-more-htmx-patterns.typ @@ -838,7 +838,7 @@ You aren’t really waiting until the value is actually needed." Fine. Let’s make it _lazy_ lazy: we’ll only issue the request when the `span` scrolls into view. -To do that, lets recall how we set up the infinite scroll example: we used the `revealed` event +To do that, let's recall how we set up the infinite scroll example: we used the `revealed` event for our trigger. That’s all we want here, right? When the element is revealed we issue the request? From f11d7f1025dcd33956fcf456a36433bc7471a4d6 Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:26:48 +0100 Subject: [PATCH 08/16] Consistently use Chapter 1 format instead of "chapter 1" or "Chapter One". --- asciidoc/CH06_MorehtmxPatterns.adoc | 2 +- asciidoc/CH07_ADynamicArchiveUIWithhtmx.adoc | 2 +- asciidoc/CH08_TricksOfThehtmxMasters.adoc | 6 +++--- ch06-more-htmx-patterns.typ | 2 +- ch07-a-dynamic-archive-ui.typ | 2 +- ch08-tricks-of-the-htmx-masters.typ | 6 +++--- ch13-extending-the-hyperview-client.typ | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/asciidoc/CH06_MorehtmxPatterns.adoc b/asciidoc/CH06_MorehtmxPatterns.adoc index 3d8d77e..c435d13 100644 --- a/asciidoc/CH06_MorehtmxPatterns.adoc +++ b/asciidoc/CH06_MorehtmxPatterns.adoc @@ -1174,7 +1174,7 @@ the web. (((accessibility))) Accessibility problems can arise when we try to implement controls that aren't built into HTML. -Earlier, in Chapter One, we looked at the example of a
improvised to work like a button. +Earlier, in Chapter 1, we looked at the example of a
improvised to work like a button. Let's look at a different example: what if you make something that looks like a set of tabs, but you use radio buttons and CSS hacks to build it? It's a neat hack that makes the rounds in web development communities from time to time. The problem here is that tabs have requirements beyond clicking to change content. diff --git a/asciidoc/CH07_ADynamicArchiveUIWithhtmx.adoc b/asciidoc/CH07_ADynamicArchiveUIWithhtmx.adoc index d662fe7..2571dbf 100644 --- a/asciidoc/CH07_ADynamicArchiveUIWithhtmx.adoc +++ b/asciidoc/CH07_ADynamicArchiveUIWithhtmx.adoc @@ -672,7 +672,7 @@ file. Another pattern that we see on the web is "auto-downloading", where the fi needing to click a link. We can add this functionality quite easily to our application with just a bit of scripting. We will discuss scripting -in a Hypermedia-Driven Application in more depth in chapter 9, but, put briefly: scripting is perfectly +in a Hypermedia-Driven Application in more depth in Chapter 9, but, put briefly: scripting is perfectly acceptable in a HDA, as long as it doesn't replace the core hypermedia mechanics of the application. For our auto-download feature we will use https://hyperscript.org[+_hyperscript+], our preferred scripting option. diff --git a/asciidoc/CH08_TricksOfThehtmxMasters.adoc b/asciidoc/CH08_TricksOfThehtmxMasters.adoc index 4573533..254c996 100644 --- a/asciidoc/CH08_TricksOfThehtmxMasters.adoc +++ b/asciidoc/CH08_TricksOfThehtmxMasters.adoc @@ -53,9 +53,9 @@ We'll start with the hx-swap attribute. This is often not included on elements t its default behavior -- `innerHTML`, which swaps the inner HTML of the element -- tends to cover most use cases. We earlier saw situations where we wanted to override the default behavior and use `outerHTML`, for example. And, in -chapter 2, we discussed some other swap options beyond these two, `beforebegin`, `afterend`, etc. +Chapter 2, we discussed some other swap options beyond these two, `beforebegin`, `afterend`, etc. -In chapter 5, we also looked at the `swap` delay modifier for `hx-swap`, which allowed us to fade some content out +In Chapter 5, we also looked at the `swap` delay modifier for `hx-swap`, which allowed us to fade some content out before it was removed from the DOM. In addition to these, `hx-swap` offers further control with the following modifiers: @@ -533,7 +533,7 @@ general mechanism for refreshing the contacts table in our application. == HTTP Requests & Responses We have just seen an advanced feature of HTTP responses supported by htmx, the `HX-Trigger` response header, -but htmx supports quite a few more headers for both requests and responses. In chapter 4 we discussed the +but htmx supports quite a few more headers for both requests and responses. In Chapter 4 we discussed the headers present in HTTP Requests. Here are some of the more important headers you can use to change htmx behavior with HTTP responses: diff --git a/ch06-more-htmx-patterns.typ b/ch06-more-htmx-patterns.typ index 45a4c51..ac8b721 100644 --- a/ch06-more-htmx-patterns.typ +++ b/ch06-more-htmx-patterns.typ @@ -1338,7 +1338,7 @@ manner of the web. Accessibility problems can arise when we try to implement controls that aren’t built into HTML. -Earlier, in Chapter One, we looked at the example of a \ improvised to +Earlier, in Chapter 1, we looked at the example of a \ improvised to work like a button. Let’s look at a different example: what if you make something that looks like a set of tabs, but you use radio buttons and CSS hacks to build it? It’s a neat hack that makes the rounds in web development diff --git a/ch07-a-dynamic-archive-ui.typ b/ch07-a-dynamic-archive-ui.typ index 8583fc3..6c9faa0 100644 --- a/ch07-a-dynamic-archive-ui.typ +++ b/ch07-a-dynamic-archive-ui.typ @@ -740,7 +740,7 @@ the file downloads immediately without the user needing to click a link. We can add this functionality quite easily to our application with just a bit of scripting. We will discuss scripting in a Hypermedia-Driven Application in more -depth in chapter 9, but, put briefly: scripting is perfectly acceptable in a +depth in Chapter 9, but, put briefly: scripting is perfectly acceptable in a HDA, as long as it doesn’t replace the core hypermedia mechanics of the application. diff --git a/ch08-tricks-of-the-htmx-masters.typ b/ch08-tricks-of-the-htmx-masters.typ index 1ac9d41..9b2533a 100644 --- a/ch08-tricks-of-the-htmx-masters.typ +++ b/ch08-tricks-of-the-htmx-masters.typ @@ -56,11 +56,11 @@ that issue htmx-driven requests because its default behavior --- `innerHTML`, which swaps the inner HTML of the element --- tends to cover most use cases. We earlier saw situations where we wanted to override the default behavior and -use `outerHTML`, for example. And, in chapter 2, we discussed some other swap +use `outerHTML`, for example. And, in Chapter 2, we discussed some other swap options beyond these two, `beforebegin`, `afterend`, etc. -In chapter 5, we also looked at the `swap` delay modifier for `hx-swap`, which +In Chapter 5, we also looked at the `swap` delay modifier for `hx-swap`, which allowed us to fade some content out before it was removed from the DOM. In addition to these, `hx-swap` offers further control with the following @@ -624,7 +624,7 @@ refreshing the contacts table in our application. === HTTP Requests & Responses <_http_requests_responses> We have just seen an advanced feature of HTTP responses supported by htmx, the `HX-Trigger` response header, but htmx supports quite a few more headers for both requests and -responses. In chapter 4 we discussed the headers present in HTTP Requests. Here +responses. In Chapter 4 we discussed the headers present in HTTP Requests. Here are some of the more important headers you can use to change htmx behavior with HTTP responses: diff --git a/ch13-extending-the-hyperview-client.typ b/ch13-extending-the-hyperview-client.typ index d596c61..4f1d63e 100644 --- a/ch13-extending-the-hyperview-client.typ +++ b/ch13-extending-the-hyperview-client.typ @@ -826,7 +826,7 @@ it exactly using hypermedia. While htmx and Hyperview significantly improve the user experience available via the hypermedia-driven approach, there are still times when it won’t be easy to pull of a particular user experience. -As we saw in Chapter Two, Roy Fielding noted this tradeoff with respect to the +As we saw in Chapter 2, Roy Fielding noted this tradeoff with respect to the web’s RESTful network architecture, where "information is transferred in a standardized form rather than one which is specific to an application’s needs." From 7e9293552897ec7cf77008a1564df367e6b0d950 Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:30:36 +0100 Subject: [PATCH 09/16] reference correct element --- asciidoc/CH11_HyperviewAMobileHypermedia.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciidoc/CH11_HyperviewAMobileHypermedia.adoc b/asciidoc/CH11_HyperviewAMobileHypermedia.adoc index 1af47d9..db3aef3 100644 --- a/asciidoc/CH11_HyperviewAMobileHypermedia.adoc +++ b/asciidoc/CH11_HyperviewAMobileHypermedia.adoc @@ -326,7 +326,7 @@ Some mobile OSes will use a different transition for the header than the rest of (((HXML, ""))) `` is the basic building block for layouts and structure within the screen's body. Think of it like a `
` in HTML. -Note that unlike in HTML, a `
` cannot directly contain text. +Note that unlike in HTML, a `` cannot directly contain text. (((HXML, ""))) `` elements are the only way to render text in the UI. From bb0edc622da188592dd5257445affac9d2f0442b Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:32:01 +0100 Subject: [PATCH 10/16] typo --- ch11-hyperview-a-mobile-hypermedia.typ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch11-hyperview-a-mobile-hypermedia.typ b/ch11-hyperview-a-mobile-hypermedia.typ index b51bf2d..dc9f11f 100644 --- a/ch11-hyperview-a-mobile-hypermedia.typ +++ b/ch11-hyperview-a-mobile-hypermedia.typ @@ -1216,7 +1216,7 @@ child elements to represent the behavior of each button. action="alert" <2> alert:title="Continue to next screen?" <3> alert:message= - "Are you sure you want to navigateto the next screen?" <4> + "Are you sure you want to navigate to the next screen?" <4> > <5> <6> From dfc0ded728cb838b2511156490eb303fc4c9e20f Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:33:58 +0100 Subject: [PATCH 11/16] cite resources in order they appear in code --- asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc | 2 +- ch12-building-a-contacts-app-with-hyperview.typ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc b/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc index 2c4db84..0396f52 100644 --- a/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc +++ b/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc @@ -196,7 +196,7 @@ It also allows the server to respond with just the `rows.xml` template for inter In the web app, each row in the list showed the contact's name, phone number, and email address. But in a mobile app, we have less real-estate. It would be hard to cram all this information into one line. -Instead, the row just shows the contact's first and last name, and falls back to email or phone if the name is not set. +Instead, the row just shows the contact's first and last name, and falls back to phone or email if the name is not set. To render the row, we again make use of Jinja template syntax to render dynamic text with data passed to the template. We now have templates for the base layout, the contacts screen, and the contact rows. diff --git a/ch12-building-a-contacts-app-with-hyperview.typ b/ch12-building-a-contacts-app-with-hyperview.typ index 44923e9..4e0a751 100644 --- a/ch12-building-a-contacts-app-with-hyperview.typ +++ b/ch12-building-a-contacts-app-with-hyperview.typ @@ -214,7 +214,7 @@ infinite scroll, and pull-to-refresh. In the web app, each row in the list showed the contact’s name, phone number, and email address. But in a mobile app, we have less real-estate. It would be hard to cram all this information into one line. Instead, the row just shows the -contact’s first and last name, and falls back to email or phone if the name is +contact’s first and last name, and falls back to phone or email if the name is not set. To render the row, we again make use of Jinja template syntax to render dynamic text with data passed to the template. From cb8175221beac9aa6aa97dd4a79b5ee63d88f26f Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 14:36:29 +0100 Subject: [PATCH 12/16] typo --- asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc | 2 +- ch12-building-a-contacts-app-with-hyperview.typ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc b/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc index 0396f52..8683a12 100644 --- a/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc +++ b/asciidoc/CH12_BuildingAContactsAppWithHyperview.adoc @@ -1201,7 +1201,7 @@ def render_to_response(template_name, *args, **kwargs): return response ---- -`render_to_response()` renders a template with the given context, and turns it into an Flask response object with the appropriate Hyperview `Content-Type` header. +`render_to_response()` renders a template with the given context, and turns it into a Flask response object with the appropriate Hyperview `Content-Type` header. Obviously, the implementation is highly-specific to serving our Hyperview mobile app. But we can modify the function to do content negotiation based on the request's `Accept` header: diff --git a/ch12-building-a-contacts-app-with-hyperview.typ b/ch12-building-a-contacts-app-with-hyperview.typ index 4e0a751..63401e8 100644 --- a/ch12-building-a-contacts-app-with-hyperview.typ +++ b/ch12-building-a-contacts-app-with-hyperview.typ @@ -1396,7 +1396,7 @@ def render_to_response(template_name, *args, **kwargs): ``` ] `render_to_response()` renders a template with the given context, and turns it -into an Flask response object with the appropriate Hyperview +into a Flask response object with the appropriate Hyperview `Content-Type` header. Obviously, the implementation is highly-specific to serving our Hyperview mobile app. But we can modify the function to do content negotiation based on the request’s `Accept` header: From 84830d798c53ee6828a329e7320f639fea0fdca3 Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 15:06:53 +0100 Subject: [PATCH 13/16] set hx-swap off with backticks, cont. --- asciidoc/CH08_TricksOfThehtmxMasters.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciidoc/CH08_TricksOfThehtmxMasters.adoc b/asciidoc/CH08_TricksOfThehtmxMasters.adoc index 254c996..6286ac2 100644 --- a/asciidoc/CH08_TricksOfThehtmxMasters.adoc +++ b/asciidoc/CH08_TricksOfThehtmxMasters.adoc @@ -49,7 +49,7 @@ Hypermedia-Driven Applications. === hx-swap (((hx-swap))) -We'll start with the hx-swap attribute. This is often not included on elements that issue htmx-driven requests because +We'll start with the `hx-swap` attribute. This is often not included on elements that issue htmx-driven requests because its default behavior -- `innerHTML`, which swaps the inner HTML of the element -- tends to cover most use cases. We earlier saw situations where we wanted to override the default behavior and use `outerHTML`, for example. And, in From cf87aa24786aef39814a09481376c7fbd236618c Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 15:10:39 +0100 Subject: [PATCH 14/16] Comma/word order cont. --- asciidoc/CH06_MorehtmxPatterns.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciidoc/CH06_MorehtmxPatterns.adoc b/asciidoc/CH06_MorehtmxPatterns.adoc index c435d13..278bf97 100644 --- a/asciidoc/CH06_MorehtmxPatterns.adoc +++ b/asciidoc/CH06_MorehtmxPatterns.adoc @@ -60,7 +60,7 @@ So, in addition to the regular form behavior, we _also_ want to issue an HTTP `G to issue this request to the same URL as the normal form submission. Finally, we only want to do this after a small pause in typing has occurred. -As we said, this functionality is very similar to what we needed for email validation. We can, in fact copy +As we said, this functionality is very similar to what we needed for email validation. In fact, we can copy the `hx-trigger` attribute directly from our email validation example, with its small 200-millisecond delay, to allow a user to stop typing before a request is triggered. From 1dc20c93bd1855d2d3e74cf501a811b9d7a2fa08 Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 15:12:35 +0100 Subject: [PATCH 15/16] Word choice, cont --- asciidoc/CH06_MorehtmxPatterns.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asciidoc/CH06_MorehtmxPatterns.adoc b/asciidoc/CH06_MorehtmxPatterns.adoc index 278bf97..01b0a27 100644 --- a/asciidoc/CH06_MorehtmxPatterns.adoc +++ b/asciidoc/CH06_MorehtmxPatterns.adoc @@ -61,7 +61,7 @@ to issue this request to the same URL as the normal form submission. Finally, w pause in typing has occurred. As we said, this functionality is very similar to what we needed for email validation. In fact, we can copy -the `hx-trigger` attribute directly from our email validation example, with its small 200-millisecond delay, to allow a +the `hx-trigger` attribute directly from our email validation example, with its small 200-millisecond delay, to wait for a user to stop typing before a request is triggered. This is another example of how common patterns come up again and again when using htmx. From 0aba0d25ef0fef3dba7a9c630df9fe20dec8329f Mon Sep 17 00:00:00 2001 From: Alexander Morgan Date: Mon, 6 Jan 2025 15:13:35 +0100 Subject: [PATCH 16/16] typo --- asciidoc/CH06_MorehtmxPatterns.adoc | 2 +- ch06-more-htmx-patterns.typ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asciidoc/CH06_MorehtmxPatterns.adoc b/asciidoc/CH06_MorehtmxPatterns.adoc index 01b0a27..d4b8704 100644 --- a/asciidoc/CH06_MorehtmxPatterns.adoc +++ b/asciidoc/CH06_MorehtmxPatterns.adoc @@ -726,7 +726,7 @@ we are just doing it in a second request. You aren't really waiting until the v Fine. Let's make it _lazy_ lazy: we'll only issue the request when the `span` scrolls into view. -To do that, lets recall how we set up the infinite scroll example: we used the `revealed` event for our trigger. That's +To do that, let's recall how we set up the infinite scroll example: we used the `revealed` event for our trigger. That's all we want here, right? When the element is revealed we issue the request? Yep, that's it. Once again, we can mix and match concepts across various UX patterns to come up with solutions to diff --git a/ch06-more-htmx-patterns.typ b/ch06-more-htmx-patterns.typ index ac8b721..efec0b9 100644 --- a/ch06-more-htmx-patterns.typ +++ b/ch06-more-htmx-patterns.typ @@ -838,7 +838,7 @@ You aren’t really waiting until the value is actually needed." Fine. Let’s make it _lazy_ lazy: we’ll only issue the request when the `span` scrolls into view. -To do that, let's recall how we set up the infinite scroll example: we used the `revealed` event +To do that, let’s recall how we set up the infinite scroll example: we used the `revealed` event for our trigger. That’s all we want here, right? When the element is revealed we issue the request?