Whether a project's full name carries information its short name does not, and so is worth
rendering as a second field.
The comparison is an exact, case-sensitive !== on purpose: two names differing only by case are
genuinely different strings a project deliberately carries, and suppressing one would hide data
the user entered. Callers that render the two names in separate slots (a muted second line, a
toolbar label's secondary field) use this rather than repeating the rule.
Blank is absent, on the same terms as normalizeFullName: a name of spaces is present but
invisible, so treating it as distinct would render a dangling separator. Applying the rule here
rather than asking every caller to pre-normalize is what keeps formatProjectName safe for
a raw value — including one arriving from outside the repo through a public prop.
Whether a project's full name carries information its short name does not, and so is worth rendering as a second field.
The comparison is an exact, case-sensitive
!==on purpose: two names differing only by case are genuinely different strings a project deliberately carries, and suppressing one would hide data the user entered. Callers that render the two names in separate slots (a muted second line, a toolbar label's secondary field) use this rather than repeating the rule.Blank is absent, on the same terms as normalizeFullName: a name of spaces is present but invisible, so treating it as distinct would render a dangling separator. Applying the rule here rather than asking every caller to pre-normalize is what keeps formatProjectName safe for a raw value — including one arriving from outside the repo through a public prop.