feat: add a modern design for the result image - #833
Conversation
PR Summary by QodoRedesign shared result PNG to match modern dark UI
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
46b1144 to
80f50ff
Compare
Code Review by Qodo
1. Polygon call incompatible
|
80f50ff to
c9606ae
Compare
|
I like the design. |
0102d48 to
c01e7fe
Compare
|
Oh, okay! :) Should be done. |
| * | ||
| * @return string | ||
| */ | ||
| function resultImageStyle() |
There was a problem hiding this comment.
I don't think that will work. The style parameter is only set on redirect page. @BKPepe
The shared result image had one look, and it no longer matched the modern frontend. The renderer can now draw either design. The image follows the same useNewDesign setting as the frontend, so a deployment has one switch rather than two that can disagree, and classic remains the fallback. - An explicit style query parameter overrides it, which is how the modern frontend asks for the design it matches. - The modern design reuses the frontend palette and shows the client, address family and timestamp already present in the result data.
c01e7fe to
3d1118b
Compare
The shared result image had one look, black on white in the classic style,
while
index-modern.htmlandfrontend/styling/describe a dark interface.Sharing a result from the modern frontend posted an image that did not look
like the site it came from.
The result image now follows the same
useNewDesignsetting as the frontend,while an explicit
stylequery parameter can override it. Classic remains thefallback, and
DESIGN_SWITCH.mddocuments both.Colours are taken from
frontend/styling/colors.cssrather than invented, sothe two stay in step. Three things the image already carried but never showed
are drawn in the modern design, all from columns the query selects today: the
client, the address family, and a timestamp split into a date and a time.
Rendered at 3x and scaled down, because GD antialiases nothing it fills and
circles and rounded corners would otherwise come out stepped. No new
dependency, and the same two fonts already in
results/.Edge cases, rendered: a browser user agent, which is shortened to fit, a long
provider name, and
redact_ip_addresseson, where the family is dropped ratherthan reporting the stored placeholder as IPv4.
The panels carry a gradient rather than a sparkline on purpose: a curve inside
a result reads as measured data, and no per-second samples are kept for a
shared result, so it would be invented.
Rebased onto 6.2.1.