Clicking a company's name on the companies page renames it instead of opening it #252
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#252
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?
On Companies, the company's name is the obvious thing to click, and it does the one thing
nobody clicks a name for: it turns into a one-field box for renaming. Everything else about
that company — its identifiers, industries, parent, addresses, contacts, its postings — is
somewhere else, and the row does not say where.
The companies table is the only list in Postulo where a record's name does not open the
record. On Applications the title opens the application and the company beside it opens
the company (
application_row.htmlusesget_absolute_urlfor both). On Companies thename is an editable cell, and the company's own page is not linked from the row at all.
Where it is
templates/jobs/partials/company_row.htmlrenders the name throughpartials/table/cell.htmlwithcell_url = jobs:company_cell <pk> 'name'andform_url = jobs:company_update <pk>. The cell is an<a>whosehrefis the full editform and whose
hx-getswaps in the inline editor, so:record, and is what the table did before inline editing existed (#135).
Company.get_absolute_url()returnsjobs:company_detail, andCompanyDetailViewexistsand is prefetched for exactly this view. Nothing in the row links to it. The only other
links in the row are the parent-company filter and the two external addresses.
Why it is worth fixing rather than explaining
Renaming in place was a deliberate addition (#135) and is worth keeping — a typo in an
employer's name is the commonest correction there is, and a refusal has somewhere to go now.
The mistake is which gesture it took: the name is a record's front door everywhere else in
Postulo, and here it is a text box.
Proposal
The name opens the company. Renaming keeps a way in that is unmistakably a rename:
company_detail, like every other list;edit action already in the row's action column — keeping
company_celland everything#135 built;
the row, and the name says what it does.
Worth deciding at the same time: whether company_detail or company_update is the right
destination. The detail page is the record; the edit form is the record with every field
open at once, which is what somebody who clicked a name expecting to change something may
have wanted. Applications open their detail page, so consistency argues for the detail page
with its own edit button.
A test belongs with it: the companies row links to
company.get_absolute_url(), which isthe assertion that would have caught this and would catch it coming back.