Closed hchiam closed 2 years ago
played around with your WIP featureset here for the past couple days, there's some cool thinking in it! i'm curious if css sticky would work somehow or if maybe these labels with arrows only show up as additional labels instead of trying to be both the inline and out of view label?
they got really crowded and stacked too when making a big selection and some other small stuff, but i'm sure you're aware of them in this WIP pr 👍🏻
but i like the goal, which i'm understanding as hint to where the label is. it does feel tho like #159 is getting a little left behind as this new hint feature is absorbing lots of the work effort. all in all, seems like a worthy ux exploration. hope it's been fun!
not sure what happened, but when i ran npm ci; npm run extension:build; npm run test:ci
locally, all tests passed even without the last fix
Ready for review again! 😃 Just a max of 8 overflow labels (8 cardinal directions), with counts:
(overflow labels disappear if they have count === 0
)
there's a ton of really great work and ux in here! excited to see it evolve 🙂 most certainly valuable to know that elements are selected out of the viewport.
ux requests / bugs:
feature request
global dismiss (clicking off any of the selected elements) should hide corner labels instead of waiting for a scroll with no selection. they felt sticky.feature request
show these viewport labels even if the current tool isnt showing labels. i think these labels are different, and serve a more global purpose and therefor dont need filtered out to reduce noise. bug
after activating the outside viewport label system, hovering elements increments the top left marker on each hoverfeature request
maybe top left marker should say "body" instead of "1"?bug
sometimes, like when i search .artboard
, it points to elements outside the left viewport? or that there's some in the bottom left? feels like a bug? i'm not sure what it's trying to tell me. 10 down, but 7 to the bottom left?feature request
clicking on one of these new labels scroll the viewport do the closest one? (sounds out of scope but i did try clicking the label to be taken to one)
I wonder if we can simplify things a bit and only show up, down, left and right? or help me understand the corners and the reasoning you had when building the ux?!
thanks for the update, had a blast testing this out!
Thanks! If i understand correctly, here are your thoughts + my thoughts, to-do-list-ified so it's easier for me to keep track:
feature request
"dismiss": make clicking anywhere else on the page hide all these indicator labels?feature request
"always on": make these indicator labels always show up on the page when VisBug is turned on?
bug
"ignore hover elements": prevent hovering from incrementing the counts (false positives)
bug
"ignore body": check whether the top-left indicator of 1 is a false positive on the body. Try fixing 3) first and consider item 6).~ UPDATE: won't fix, because the label on the body is technically outside the body. If we want to do 2), this makes sense.bug
"ignore more false positives": check whether the bottom and bottom-left counts are also false positives too.
feature request
"hover show selector of one culprit in that direction": Users would want to know what element is overflowing, but you might not always be able to scroll to it, like if it's outside the page.
3 here | 5 things overflowing/offscreen here | ↗ |
---|---|---|
← | → | |
↙ | 29 things overflowing/offscreen here | ↘ |
Technically it should be true overflow, not simply offscreen stuff ( see 3) ).
Updated the TODO list above. Addressed most things hopefully.
The tl;dr: this PR currently creates overflow labels that track all the <visbug-label>
s added to the DOM by VisBug (when you /zindex, search, etc.).
For 2), @argyleink, let me know if it still makes sense to go ahead with making these overflow labels show up all the time. I think the drawback is we'd always be watching all elements to check if they're overflowing (perf), instead of only watching all VisBug labels to check if they're overflowing.
Besides that, the only other thing for me to look into is to fix the count logic, if you happen to re-run the same search or re-run /zindex ("5)b" in the TODO list). overflowLabel.element.js
count
nice! lots of great improvements here 🙂
2) i'm thinking this is nice =) did you run into any performance issues from it, it seems to work great for me. 5b) imo this is out of your control as plugins cause side effects on a page, a user running /zindex multiple times is going to get the side effects repeated. but, it does expose how some of the logic works, like implementation details leaking into the front end. but i dunno, seems like a small issue to me, we can track it but it's low priority imo.
Remaining items:
Cool, this is super helpful for multi-select when there's many elements selected across a big page 💯 cool feature addition! thanks for hackin on it 👍🏻
thanks Adam! i found this to be an interesting feature to think about
agreed, the count logic fix is low prio.
I've now filtered out the ↑
labels on the body
so the offscreen logic ignores them, but you'll probably see another ↑
label show up for main
on the test site. You can now hover over the "offscreen" labels to see the text of one of the labels hidden in that direction.
And sorry, it's been a while and i see i misunderstood 2) and thought we're handling overflow. I recall now that this PR is just handling offscreen labels (https://github.com/GoogleChromeLabs/ProjectVisBug/pull/528#discussion_r659899655). The performance LGTM as-is.
For #159, as per one of the suggestions in pr #528
WIP, to look into:
I had to refactor to work with
<visbug-labels>
, which can't directly access their respective parent/container elements since they're direct descendants of thebody