Company sectors are chosen from a real vocabulary, as labels #141
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.
Depends on
#140 Where the list of areas of activity comes from
Postulo/postulo
Reference
Postulo/postulo#141
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?
Observation
What exists
Two halves, and the complaint lands on both.
The vocabulary.
jobs/industries.pyholds 32 hand-written names offered as suggestions;the real list is
Industry, one vocabulary per person, created on the fly by slug. The modeldocstring says why it is per person: "two people on one instance may describe the same
employer differently, and neither should see the other's words." A company may belong to
several — "a bank that is also an insurer and a software house is all three, and counting it
under one would be a lie the figures repeat."
The control.
CompanyFormoffers those industries as aCheckboxSelectMultiple, with afree-text Other industries box beside it and a
<datalist>of suggestions behind that.Two controls for one idea: tick the ones you have, type the ones you do not.
What this asks for
A vocabulary worth picking from, and a picker made of labels.
Worth being careful about
The two halves are separable and should be done in either order, which is why they are
filed apart. The label control is worth building whatever list is chosen, and it is wanted on
application tags too. The vocabulary decision is worth making whatever the control looks
like.
Two controls become one, and that is most of the interface work. With labels there is no
reason for Other industries to be a separate box: typing a name that does not exist is the
same gesture as choosing one that does. Removing the second field also removes the moment
where somebody ticks three boxes, types a fourth name, and cannot see the four together.
The count on a company is not small. A bank that is also an insurer and a software house
is three labels; a conglomerate is more. The control has to look right at one, at three and
at twelve, and the companies table shows industries in a cell that is already narrow.
Filtering by industry is where a longer list is felt. The companies table filters by
industry as a
choicecolumn; 88 divisions in a select is a different control from 32, andthe Industries page — which lists them, renames them, merges them — becomes a page about a
much longer list.
Merging exists and gets more use, not less. Every company in this industry moves to the
selected one, and this one disappears is already there, and it is exactly the tool somebody
needs after seeding a standard list beside their own words. It should be easy to reach from
wherever the seeding happens.
Nothing should rename what a person already wrote. Their industries are their words; a
new vocabulary is offered beside them, never instead of them, and never silently.
Every widget that counts by industry inherits the change — the industries dashboard
widget, the insights breakdown, the same figures by field on a company. A longer list makes
those sparser, and a company in three of them still counts in three.
Done in
e3a4d9aa, and this is where the two halves meet.You filed them apart and said they could go in either order; they did, and what was left for this issue is the part that only shows up once both are true.
Two controls became one
With labels there is no reason for Other industries to be a separate box, and it is not one any more: typing a name that does not exist is the same gesture as choosing one that does, and all of them are visible together as chips. The moment you named — ticks three boxes, types a fourth name, cannot see the four together — is gone.
With scripts off the two native controls are still there and still work, which is the honest fallback rather than a lesser one.
The count on a company is not small
The table draws industries as labels now: four shown, the rest counted. A bank that is also an insurer and a software house is three; a conglomerate is more; and a cell that grows without limit pushes every other column off the screen. Tested at one, at three, at twelve, and at none.
Filtering, which is where a longer list is felt
You wrote that 88 divisions in a select is a different control from 32 — and it is not a select. The industry column filters as text against the names, which is the same control at thirty-two names and at three hundred and the only one that stays usable at both. That is a decision confirmed and now held by a test, rather than one changed.
The Industries page, at length
And the page does not become long by itself. A row exists only once a company has been given that industry: the classification is a list of suggestions, not a list of rows. That is the property which made it safe to make the suggestions long, and it is a test now rather than an assumption.
The promises kept
Also
tests/test_sectors.py, 16 tests. Suite 4441 passed, 29 skipped; browser suite 72 passed.