-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add zoom & rotate functionality to crash diagrams #1635
Conversation
✅ Deploy Preview for vision-zero-nextjs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great Frank! Love seeing everyone's typescript and i learn a little from each PR i review ✨
I like your UX choices to cut down on the number of reset buttons we have, i think having just one that resets the image completely is perfect.
I noticed that when I click on crashes with an error banner, the zoom/reset tools and the words "crash diagram" will be on the screen for awhile before the banner takes over. Sometimes its for long enough that i can even move around and zoom on the words and then some buggy behavior starts happening. If you could prevent those tools and those words from popping up before the banner shows that would be awesome! I'm also getting the pesky horizontal scroll on the temporary banner when im at 80% page zoom.
Screencast from 01-06-2025 01:10:09 PM.webm
On the other banner, if you could center it horizontally that would scratch a great itch for me too heh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great Frank! Love seeing everyone's typescript and i learn a little from each PR i review ✨
I like your UX choices to cut down on the number of reset buttons we have, i think having just one that resets the image completely is perfect.
I noticed that when I click on crashes with an error banner, the zoom/reset tools and the words "crash diagram" will be on the screen for awhile before the banner takes over. Sometimes its for long enough that i can even move around and zoom on the words and then some buggy behavior starts happening. If you could prevent those tools and those words from popping up before the banner shows that would be awesome! I'm also getting the pesky horizontal scroll on the temporary banner when im at 80% page zoom.
Screencast from 01-06-2025 01:10:09 PM.webm
On the other banner, if you could center it horizontally that would scratch a great itch for me too heh
also i noticed you added helper text to the zoom/reset buttons but i think those could be left as just symbols and if anything its the slide bar that could use some labeling, or those icons like @mateoclarke suggested look great! |
Thanks everyone for the design feedback. @frankhereford here's a summary of where i'd like to go with this feature in scope of this PR.
And here are a few bits of useful JSX i used for the design. First, the card footer, which has the <Card.Footer className="text-center">
<div className="d-flex align-items-center">
<div className="me-3 text-primary fs-5">
<FaRotate />
</div>
<RotateControls rotation={rotation} setRotation={setRotation} />
</div>
</Card.Footer> And a small change to the RotateControl itself—adding <div className="mt-2 w-100">
<Form.Range
min="-180"
max="180"
value={rotation}
id="formControlRange"
onChange={rotate}
title="Rotate Diagram"
/>
</div> Thanks for bearing with all the feedback on this one! |
@johnclary I think this is ready to be handed back to you. I believe I have incorporated the changes you requested, and I am super grateful for the helpful examples. I have used them verbatim where I was able and made only minimal changes where I was not. That was very kind of you to put that much effort into the comment like you did. 🙏 @roseeichelmann I've also asked for your review again because I believe the input you were asking had been incorporated, where applicable, into John's revised request. If you think I have overlooked something you want to see done, please let me know, and I'll be all over it. Thanks so much for all your thoughtful feedback. |
I know @johnclary requested the rotate icon to be in primary, but that made me think it was a button and I tried to click it, thinking it would reset or rotate the image by 90 degrees.
I have noticed that if you rotate the image, the edges fall out of the viewport, which could be why theres the option to zoom out in existing production. Of course, I don't know if VZE users would even miss this change in functionality. @johnclary I looked in the readme todo's and github issues for the download cr3 button, I can't remember if you said it was left off the ACC designs intentionally or not, that was so last year 😬. Just don't want it to fall through the cracks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frankhereford this is looking great and is so so close. for some reason the diagram image is still overflowing the transform component on my display size, causing it to be partly obscured. i spent a few minutes trying to diagnose this and couldn't sort it out.
i am happy to open a follow-up for this if it feels like you want a break from this. The goal being to have the full diagram image displayed on init without having to zoom out.
Here's a screenshot showing the image pushing under the rotate control for some reason 🫠
@johnclary and everyone -- thank you all for your feedback on this. I believe I have incorporated all the requests, and I have been liberal in my use of the The most notable change is now we have a I can't wait to hear what you think -- and thank you again for the chance work on my JS and contribute to the app. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
boom! you did it! thank you, Frank!!!
i requested the tiniest change so as to nix the onload animation. but i'm approving it now 🚢 🚢 🚢 🚢 🚢
Associated issues
This PR hopes to close cityofaustin/atd-data-tech#19967.
Ask forgiveness, not permission
Here's the guiding image:
Building out from the image mentally -- I took some liberties, but have done my best to stay true to the new nextjs visual theme and aesthetic. I'm very 👍 on the VZE style and hope we perfect it.
But to be specific, here's some of the things that are big enough changes from the image to point out. I'm really leaning into only including the elements indicated by the arrows in the guiding image.
primary
color like the 'Edit' buttonbootstrap
. I think it matches really well.Testing
PS: DX experience
I absolutely felt a pang of joy when I could click a link in the CI PR comment and get a build log from Netlify that clearly indicated what the build problem was, like only typescript will do. It was so easy to find and fix where I went sideways. Typescript rocks! 🐐
Ship list