The progress bars on Insights have stretched, flattened ends #45
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#45
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 is wrong
Each funnel bar in
insights.htmlis an SVG:preserveAspectRatio="none"stretches a 100-unit-wide viewBox across the whole column, soone horizontal unit becomes several pixels while one vertical unit stays one. The corner
radius is scaled with everything else:
rx="3"renders as a wide, shallow ellipse insteadof a semicircle, which reads as a flattened, faintly pointed end. The narrower the bar, the
more obvious it is.
Why it is an SVG at all matters before changing it. Production sets
style-src 'self'with no
'unsafe-inline'(config/settings/prod.py), sostyle="width: 42%"is refusedby the browser. The width had to come from somewhere the policy allows, and an SVG
attribute was that somewhere.
Shape
Use
<progress value="42" max="100">:aria-labelhas to do by hand;border-radiuson the element,::-webkit-progress-valueand::-moz-progress-bar— uniformly, at any width.If
<progress>proves awkward to style the same way in every browser, the fallback is twodivs and a width taken from a small set of utility classes at five-point steps, safelisted
so Tailwind emits them. A funnel bar does not need one-point fidelity.
Classification
A bug, and a small one. Not breaking.
Depends on
Nothing. #44 must keep the fix rather than rebuilding the stretched SVG.