-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat(view): Add viewer rewrite to monorepo #104
Conversation
So cool! It's looking great, as always really impressed by the code quality and organization too (makes my projects look like a pile of random source files). Noticed some issues :
|
Thanks @kasbah! Appreciate the testing. Gonna run through more of this when I get home tonight, but for now:
Shoot, I completely forgot to implement that. Thanks for the heads up
I got a little clever with the wheel event throttling, so I'm sure I missed some edge cases. So far I've tested Chrome and Firefox with trackpad and mouse on macOS. Were you using a mouse or a trackpad on Chrome linux? I have both available so will dig into this, too.
That's weird, I'm unable to reproduce in Chrome or Firefox on mac. Maybe a caching issue? Could you try clearing it and/or seeing if it shows up on the dev server? Will also try myself on my Linux vm.
Yeah, I thought about it but I'm also kinda loath to do browser-specific tweaks (scrollbar customization is webkit-only). Might look into it as a follow up though?
Yeah right now it's kinda this weird thing where I want to make it easy to "try an example". Maybe it makes more sense to have that as a separate link rather than take over the URL upload field.
For now I'd rather not deal with setting up any sort of backend infrastructure for this, but I think this definitely should be doing two things:
If it does happen a lot in the wild, then a simple lambda proxy seems definitely worth setting up |
1d77ac4
to
6975483
Compare
Codecov Report
@@ Coverage Diff @@
## next #104 +/- ##
==========================================
- Coverage 88.96% 88.59% -0.37%
==========================================
Files 54 55 +1
Lines 2174 2183 +9
==========================================
Hits 1934 1934
- Misses 240 249 +9
Continue to review full report at Codecov.
|
Alright @kasbah how would you feel if I merged this now? Regarding your feedback:
I just pushed everything above to staging. Todos listed in PR description (or maybe just the CI one) are still gating for the actual release I think |
I feel good about merging in general since it's all brand new! Just starting to read the source to pick up some tricks.
So I am still experiencing the zoom issue on Chrome with my Thinkpad x230 Touchpad on Ubuntu 16.04. On Firefox it's still fine, though it does feel a bit like it's "jumpy" on both actually since there only seem to be a few zoom positions to select from. Is there a reason for that? |
Shoot. I've just pushed another change to the zoom throttling to this branch and staging. I'll also try to spin up a Ubuntu 16.04 VM (My machines are 18.04 currently) to test
Yeah still trying to optimize this. For a while with this I was trying to do a continuous zoom, but even on my relatively powerful machine I was finding the "continuous" experience to be really janky. I think this speaks to a need to really concentrate on simplifying the SVG renders themselves so the browser can do less work (e.g. #80), but for now... The zoom is descretized into 17 ticks. This really simplifies some stuff (because zoom levels, both linear and logarithmic, can be pre-calculated), but I think that the zoom bar needs to do a better job of indicating that the zoom levels are discrete positions. Longer term, I think a combination of increasing the number of ticks and also getting CSS transitions involved for the zoom itself will improve things, and possibly even trick the mind into thinking the zoom is continuous. At the moment though, the aforementioned render performance issues mean zoom transitions are also janky, so I left them out. I figure discrete zoom levels is the least bad option at the moment 🙃 |
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.
Some final cleanup work before merge
@@ -0,0 +1,36 @@ | |||
# tracespace view troubleshooting |
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.
@kasbah definitely want to hear your thoughts on this doc, since you've probably diagnosed more render problems than anyone else
(Also I think that it should eventually be a part of the site itself rather than a random markdown file)
Maybe a future optimization could be to load the SVGs into WebGL (e.g. with three.js)? This could also allow for a 3d view (I noticed I keep wanting to spin the board around in the new tracespace viewer, as I do in the KiCad 3d viewer). |
That's really cool! I haven't kept up with three.js, and I didn't know it could load SVGs now. Definitely down to add a 3D tab |
overview
This PR is part 3 of mcous#1, and adds the new viewer app to the monorepo. It's written in Typescript and still needs tests, but this (I think) is feature-complete enough to launch.
Preview at: https://staging.tracespace.io/view
Still TODO in follow up PR(s):
changelog
Improvements from the code living at tracespace/viewer:
try it out