Your career: hide the order number, keep it as an accessibility preference under Appearance, and make the arrows actually move an entry past its neighbour #203
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#203
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?
The change
On Your career, every entry's form carries an order number. The arrows on the
overview already move an entry up and down, so the number is a second control for the
same thing and a strange one — a person editing a job is asked for an integer that means
"lower first". Hide it. Offer it back as a preference under Settings → Appearance, for
somebody who cannot use the arrows or would rather type a number, which is an
accessibility choice and belongs beside the others there.
What is there today
ResumeItem.order(resume/models.py:34) is on every kind of entry — experience,education, project, skill group, skill, certification, language, link — with the help
text Lower numbers appear first, and all seven forms in
resume/forms.pylist it infields(:37, :66, :78, :90, :96, :105, :112, :118).resume/item_form.html:21drawsevery field of the form in a loop, so it appears on every entry's page as a plain number
box.
The arrows:
resume:item_move(resume/views.py:264) does— it nudges the number by one and swaps with nothing. Two consequences worth knowing
before the number is hidden, because they are what the number has been covering for:
once puts it at 1, behind every other entry at 0, wherever it was. Two entries at 3 and
5 with nothing between them need two presses to pass each other, and the second press
is invisible. The arrows nudge a number; they do not move an entry past its
neighbour, which is what an arrow says it does.
Meta.ordering = ("-start_date", "order"),:80;("-end_date", "order"),:107;("-issued_on", "order"),:176), and the wiki says so (Your career record →Ordering: "Order breaks ties"). In those three sections the arrows change nothing a
person can see unless two entries share a date. Only skills, skill groups, projects,
languages and links (
("order", "pk"),:49) are ordered by the number alone.So today the number box is the only control that reliably does anything, and hiding it
without fixing the arrows would take the working control away and leave the broken one.
What a fix has to settle
it in that section, down with the one below, renumbering the section so the numbers
are dense and the order is exactly what the page shows — the model the dashboard's
widgets already follow (
accounts/settings_views.py, #124). The move view's redirectand message stay as they are.
arrow that does nothing is worse than none — or those sections drop the date from
orderingand take the number, seeded from the dates once, so the person owns theorder everywhere. The second matches "we can already define its order using the
arrows"; the first matches the wiki as written. One of them, said in the wiki.
Profilebesidethemeandhidden_nav_items(
accounts/models.py:289-293) — show the order number on career entries — set fromAppearanceForm(accounts/forms.py:388), off by default. The seven forms droporderfromfieldsunless the preference is on;item_form.html's loop then needsnothing. A model field, so it travels with the export as the other preferences do
(
PROFILE_FIELDS, format 16 if #202 has not already moved it).the number and nothing else. With the number gone, somebody editing an entry and
wanting it higher goes back to the overview — fine, and the page can say so in a
sentence where the box was.
(
tests/test_page_coverage.pyis the only file namingitem_move), which is how thenudge went unnoticed; the swap gets a test per ordering rule, and the preference one
for each side of the switch.
:223-229) describes the number and thenudge; it describes the arrows and the preference.