Closed jreinlein closed 8 years ago
Whoa, that's crazy. I have no idea why that would happen. Looks like a browser bug almost :-0
On Sat, Nov 26, 2016 at 8:13 PM, James Reinlein notifications@github.com wrote:
Added button that toggles functionality of pointing and clicking directly on the page to select the corresponding element in the tree.
!!! BUG !!! In Chrome, as soon as the button is toggled, it searches for a filters.svg file (that applies a style to show the button is selected). However, even once it's loaded, the browser repeatedly makes requests for that file forever. Does not occur in Firefox.
Any ideas? @gregtatum https://github.com/gregtatum
gif capture http://i.imgur.com/UgGFASu.gifv
You can view, comment on, or merge this pull request online at:
https://github.com/gregtatum/z-index-devtool/pull/76 Commit Summary
- Implement button to toggle element picker
- Removed STRONG tags, added P tags
File Changes
- M docs/lib/css/devtools/toolbars.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-0 (4)
- A docs/lib/css/devtools/toolbox.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-1 (408)
- M docs/lib/css/devtools/tree-view.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-2 (2)
- M docs/lib/css/z-index.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-3 (12)
- A docs/lib/img/command-pick.svg https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-4 (9)
- A docs/lib/img/filters.svg https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-5 (32)
- M src/actions/stacking-context.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-6 (9)
- M src/components/app.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-7 (5)
- M src/components/dom-container.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-8 (23)
- M src/components/main-view.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-9 (2)
- M src/components/stacking-context-node.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-10 (2)
- M src/components/stacking-context-tree-view.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-11 (21)
- M src/constants.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-12 (3)
- M src/reducers/stacking-context.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-13 (9)
- M src/stacking-context/index.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-14 (2)
Patch Links:
- https://github.com/gregtatum/z-index-devtool/pull/76.patch
- https://github.com/gregtatum/z-index-devtool/pull/76.diff
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gregtatum/z-index-devtool/pull/76, or mute the thread https://github.com/notifications/unsubscribe-auth/ABg9qM5T6ShMM6OO5HNft89Wj4XP9U_eks5rCOdngaJpZM4K9Cun .
Haven't looked at the source, but maybe try and apply the SVG via CSS and not img src?
On Sat, Nov 26, 2016 at 8:32 PM, Greg Tatum tatum.creative@gmail.com wrote:
Whoa, that's crazy. I have no idea why that would happen. Looks like a browser bug almost :-0
On Sat, Nov 26, 2016 at 8:13 PM, James Reinlein notifications@github.com wrote:
Added button that toggles functionality of pointing and clicking directly on the page to select the corresponding element in the tree.
!!! BUG !!! In Chrome, as soon as the button is toggled, it searches for a filters.svg file (that applies a style to show the button is selected). However, even once it's loaded, the browser repeatedly makes requests for that file forever. Does not occur in Firefox.
Any ideas? @gregtatum https://github.com/gregtatum
gif capture http://i.imgur.com/UgGFASu.gifv
You can view, comment on, or merge this pull request online at:
https://github.com/gregtatum/z-index-devtool/pull/76 Commit Summary
- Implement button to toggle element picker
- Removed STRONG tags, added P tags
File Changes
- M docs/lib/css/devtools/toolbars.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-0 (4)
- A docs/lib/css/devtools/toolbox.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-1 (408)
- M docs/lib/css/devtools/tree-view.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-2 (2)
- M docs/lib/css/z-index.css https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-3 (12)
- A docs/lib/img/command-pick.svg https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-4 (9)
- A docs/lib/img/filters.svg https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-5 (32)
- M src/actions/stacking-context.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-6 (9)
- M src/components/app.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-7 (5)
- M src/components/dom-container.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-8 (23)
- M src/components/main-view.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-9 (2)
- M src/components/stacking-context-node.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-10 (2)
- M src/components/stacking-context-tree-view.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-11 (21)
- M src/constants.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-12 (3)
- M src/reducers/stacking-context.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-13 (9)
- M src/stacking-context/index.js https://github.com/gregtatum/z-index-devtool/pull/76/files#diff-14 (2)
Patch Links:
- https://github.com/gregtatum/z-index-devtool/pull/76.patch
- https://github.com/gregtatum/z-index-devtool/pull/76.diff
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gregtatum/z-index-devtool/pull/76, or mute the thread https://github.com/notifications/unsubscribe-auth/ABg9qM5T6ShMM6OO5HNft89Wj4XP9U_eks5rCOdngaJpZM4K9Cun .
Thanks for the reply Greg. I didn't think it was possible to apply an SVG filter purely via CSS. I'll give it another go :)
I managed to fix the bug. Here's what I gathered:
FeColorMatrix
which is the one we needed)url(--some-var)
and make infinit network requests. Still unsure as to why.Here's how I went about fixing the issue:
filter: var(--checked-icon-filter);
var()
would go to to the toolbars.css
file--checked-icon-filter: url(/lib/img/filters.svg#checked-icon-state)
(or dark, depending on the theme)var()
which triggered url()
would create infinite requests in Chrome.var()
and hard-coded the url()
into the CSS class. Bug The bug was no longer. By my conclusion, it seems this is where the Chrome bug was found—in the use of var()
var
in url()
. Since there are multiple themes, I had to have different CSS classes (since I could no longer use variables to determine the theme). I made a quick JS hack that would find the applied theme and applied the CSS class accordingly.What is the expected behaviour for this feature when we also have the hover-highlight feature? I'm finding some unexpected behaviours. 1) The selected element highlight goes away when I hover over any node in the stacking context. When I stop hovering over elements, I think it should go back to displaying the previously selected element. 2) Should element selection be turned off after one click/selection? (This is the behaviour for Chrome and Firefox's element selector) 3) That element selector button looks hella cool 👍
@w-jiang I considered some of those points, but we'll definitely need to discuss!
@jreinlein
Looks great! The selector pointer was a lovely touch :D really added to the user experience 10/10 would use again
Added button that toggles functionality of pointing and clicking directly on the page to select the corresponding element in the tree.
!!! BUG !!! In Chrome, as soon as the button is toggled, it searches for a
filters.svg
file (that applies a style to show the button is selected). However, even once it's loaded, the browser repeatedly makes requests for that file forever. Does not occur in Firefox.Any ideas? @gregtatum
gif capture