-
-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Waste] Remove use of loading wrapper.
As the async code can kick in at any point property is loaded, you had to make sure any subsequent results page had the async loading wrapper div, otherwise you ended up with a blank page. Replace the use of HTMX with a smaller script that replaces the content, which we know will be present, and don't output header/footers that are to be ignored.
- Loading branch information
Showing
22 changed files
with
132 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,16 @@ | ||
[% USE date(format = c.cobrand.bin_day_format) %] | ||
[% USE pounds = format('%.2f'); ~%] | ||
[% PROCESS 'waste/header.html' %] | ||
|
||
<div class="waste__loading_wrapper" | ||
hx-get="[% c.req.uri.path_query %]" | ||
hx-swap="outerHTML" | ||
hx-select=".waste__loading_wrapper" | ||
hx-trigger="every [% page_refresh %]s"> | ||
|
||
[% IF c.cobrand.moniker != 'sutton' %] | ||
[% IF c.cobrand.moniker != 'sutton' %] | ||
<h1 class="govuk-heading-xl">Your bin days</h1> | ||
[% END %] | ||
[% END %] | ||
|
||
<div class="waste__collections"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full text-centered"> | ||
<img id="loading-indicator" aria-hidden="true" src="/i/loading.svg" alt="Loading..."> | ||
<h2>Loading your bin days...</h2> | ||
</div> | ||
</div> | ||
<div class="waste__collections"> | ||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-full text-centered"> | ||
<img id="loading-indicator" aria-hidden="true" src="/i/loading.svg" alt="Loading..."> | ||
<h2>Loading your bin days...</h2> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
[% INCLUDE footer.html %] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
[% SET title = form.title ~%] | ||
[% PROCESS 'waste/header.html' %] | ||
|
||
<div class="waste__loading_wrapper"> | ||
|
||
[% PROCESS 'govuk/fields.html' %] | ||
[% PROCESS back %] | ||
[% PROCESS errors %] | ||
[% PROCESS title %] | ||
[% IF property %] | ||
[% PROCESS 'govuk/fields.html' %] | ||
[% PROCESS back %] | ||
[% PROCESS errors %] | ||
[% PROCESS title %] | ||
[% IF property %] | ||
[% INCLUDE 'waste/_address_display.html' %] | ||
[% END %] | ||
[% END %] | ||
|
||
[% IF form.intro_template %][% PROCESS "waste/${form.intro_template}" %][% END %] | ||
[% IF form.intro_template %][% PROCESS "waste/${form.intro_template}" %][% END %] | ||
|
||
<form class="waste waste--[% form.current_page.name OR form.name %]" method="post" | ||
[% IF form.current_page.name == 'location' %]enctype="multipart/form-data"[% END %]> | ||
[% PROCESS form %] | ||
</form> | ||
|
||
</div> | ||
[% INCLUDE footer.html %] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.