Recording what happened reloads the whole page, on the one screen somebody uses all day #257
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#257
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
An application's page is where the job search actually gets recorded: the status moves, an
event is added, a reminder is ticked off. Every one of those is a plain form post that
redirects to
get_absolute_url(), so the answer to "I heard back" is a fresh render of a347-line template with its prefetches, and the reader is returned to the top of a page they
were reading the middle of.
The forms are at
application_detail.htmllines 55 (status), 72 (add an event) and 333(complete a reminder), with the interview and document actions beside them.
The server already does this
StatusChangeView.post(applications/views.py:476) branches onrequest.htmxand returnsapplications/partials/application_row.htmlinstead of redirecting. The list view asks forthat and gets a swapped row. The detail page posts the same form to the same view and does
not ask, so it takes the redirect.
There are four
request.htmxbranches in the whole application — two inapplications/views.py, one injobs/views.py, one line of settings. htmx is a dependencythis project already pays for and it appears in seven of 182 templates. This screen is what
it was bought for.
What it should be
The status band, a new timeline entry and a reminder's completion swap in place. The page
does not move, the timeline grows where the eye already is, and the round trip carries a
fragment instead of a record with everything joined to it.
What comes free, and should be stated so it is not rebuilt:
aria-busyon whatever is beingreplaced and renders one
role="alert"region whose words come from the page, so a swapthat answers 500 or never arrives already says so. A new swap inherits that.
focus to what replaces it, or the next Tab starts at the skip link. The reminder tick is
exactly that shape — it removes itself.
What has to be built rather than borrowed: the partials. The one that exists is a row for
the list, which is not what the detail page shows. A timeline entry, the status band and a
reminder row are three small templates, and the views already have the objects.
The forms must still post. Without a script the page has to behave exactly as it does
today — that is the same rule as #134 and #136, and here it costs nothing, because an
hx-poston a real form with a real action is progressive by construction.Related: #247 wants the slow work moved onto
django-tasks-dbwith a "working…" state.These meet at the same place — what a swap shows while the server is still thinking.