How to order Units
In Onsite, Units are currently ordered automatically. In most cases, this works well, and provides the most user friendly approach.
How Units are automatically ordered
Alphabetical, ignoring symbols and numbers
- First, we remove all non‑letter characters from the unit label (anything that isn’t A–Z) and sort alphabetically on what’s left.
- Example: A-10, A2, and A003 are all treated as starting with A for this step.
Numerical, based on the digits in the label
- Next, we look at the numbers inside the label, strip out everything that isn’t a digit, and sort by that number (as a real number, not text).
- Example: A2 comes before A10 because 2 < 10; Unit 3 comes before Unit 12.
Full label as a tie‑breaker
- If two labels are still equal after the first two steps, we fall back to a normal sort on the full label text to keep the order stable.
In plain terms
Units are ordered alphabetically by their letter part (ignoring punctuation and digits), then by the numeric part of the label, so that A1, A2, A10 appears in a natural, human‑friendly order.
Manual Ordering
Automatic sorting works well in most cases, however we recognise it will not get it right all the time. We plan on adding the ability to manually order units down the line.