Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Render SZ segment labels properly in Safari #774

Merged
merged 1 commit into from
Jul 16, 2023

Conversation

idreyn
Copy link
Contributor

@idreyn idreyn commented Jul 16, 2023

Motivation

The time labels for Slow Zones map segments were previously rendered with the <foreignobject> SVG element, which doesn't really work in Safari. This change renders them in pure SVG.

Changes

SVG layout is pretty manual work and it was easiest to resort to Unicode characters for the directional arrows. I found that the ones that work best (i.e. have no weird subpixel glitches) are these chevron ones:

On mobile, though, we'll get a slightly different arrow look:

Testing Instructions

Visit /red/slowzones in desktop/mobile Safari and check that these elements render properly.

@idreyn idreyn changed the title fix: Render SZ segmnet labels properly in Safari fix: Render SZ segment labels properly in Safari Jul 16, 2023
@github-actions github-actions bot added the frontend Change to frontend code label Jul 16, 2023
Copy link
Member

@devinmatte devinmatte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Poked around and tested in both Safari (13.4.1 (22F82)) and Chrome (114.0.5735.198) and everything looks good to me

Copy link
Member

@PatrickCleary PatrickCleary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👑

@PatrickCleary PatrickCleary merged commit c6df803 into dashboard-v4 Jul 16, 2023
5 checks passed
@PatrickCleary PatrickCleary deleted the idr/sz-ui-fixes branch July 16, 2023 16:38
@devinmatte devinmatte added this to the Dashboard V4 milestone Jul 17, 2023
@devinmatte devinmatte added the v4 label Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Change to frontend code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants