Skip to content

Commit 30b2be7

Browse files
committed
Updates HTMX navigation swap strategy
Changes the HTMX swap method from `morph` to `outerHTML` for all primary navigation links. This ensures a complete and consistent replacement of the main content area, providing more predictable rendering behavior and avoiding potential issues related to partial DOM updates during page transitions.
1 parent 39874a2 commit 30b2be7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/resources/templates/fragments/navigation.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
href="/context"
3030
hx-get="/scope"
3131
hx-target="#main-content"
32-
hx-swap="morph"
32+
hx-swap="outerHTML"
3333
hx-push-url="true">Scope</a>
3434
</li>
3535
<li class="nav-item">
@@ -38,7 +38,7 @@
3838
href="/discovery"
3939
hx-get="/discovery"
4040
hx-target="#main-content"
41-
hx-swap="morph"
41+
hx-swap="outerHTML"
4242
hx-push-url="true">Discovery</a>
4343
</li>
4444
<li class="nav-item">
@@ -47,7 +47,7 @@
4747
href="/constellations"
4848
hx-get="/constellations"
4949
hx-target="#main-content"
50-
hx-swap="morph"
50+
hx-swap="outerHTML"
5151
hx-push-url="true">Constellations</a>
5252
</li>
5353
<li class="nav-item">
@@ -56,7 +56,7 @@
5656
href="/synthesize"
5757
hx-get="/synthesize"
5858
hx-target="#main-content"
59-
hx-swap="morph"
59+
hx-swap="outerHTML"
6060
hx-push-url="true">Synthesize</a>
6161
</li>
6262
<li class="nav-item">
@@ -65,7 +65,7 @@
6565
href="/portal"
6666
hx-get="/portal"
6767
hx-target="#main-content"
68-
hx-swap="morph"
68+
hx-swap="outerHTML"
6969
hx-push-url="true">Portal</a>
7070
</li>
7171
<li class="nav-item">
@@ -74,7 +74,7 @@
7474
href="/query"
7575
hx-get="/query"
7676
hx-target="#main-content"
77-
hx-swap="morph"
77+
hx-swap="outerHTML"
7878
hx-push-url="true">Query</a>
7979
</li>
8080
<li class="nav-item">
@@ -83,7 +83,7 @@
8383
href="/rules"
8484
hx-get="/rules"
8585
hx-target="#main-content"
86-
hx-swap="morph"
86+
hx-swap="outerHTML"
8787
hx-push-url="true">Rules</a>
8888
</li>
8989
</ul>

0 commit comments

Comments
 (0)