Screen "jump" when expanding a value
mtruyens opened this issue · 10 comments
Since the latest version (devtools 0.9.3 / dirac 1.2.4 / Chrome Canary 60.0.3074 on OSX), Dirac often "jumps" when expanding a Clojurescript value — i.e. the screen scrolls down significantly, often in such a significant manner that the value you expanded is no longer visible. You then have to scroll back up to actually see the start of the expanded value.
Perhaps related is a very minor UI glitch, where the little icon at the left side of the current namespace is not a ">", but a very tiny dot instead. When toggling between Clojurescript forms and Javascript forms, the ">" is shown correctly when in Javascript mode.
I just briefly tested my current master version. I was not able to reproduce it here.
Sounds like this commit could be related:
bff9d50
The CSS issue should be fixed in v1.2.5. Not sure about the jumping.
Hi,
I tested again with 1.2.5 and Chrome 60.0.3081.6 (Mac), and the jumping problem is still there.
Elaborate steps to reproduce:
(1) Load the sample page of the dirac-sample demo project
(2) Open Dirac DevTools, and switch to the Clojure mode.
(3) Execute the following two sample commands: (filter odd? (range 100)) and (filter even? (range 100))
(4) Expand both results, so that two lists of 50 items are visible.
(5) Make sure that the Dirac DevTools window is rather small vertically, e.g. shows about 20 rows of numbers.
(5) Scroll up to the first command (filter odd? ...) and collapse its results, so that the 50 items below it get hidden.
(6) Result on my machine: the window jumps towards the very bottom, so that the 20 last items of the second command are visible. (Correct behaviour would be that the collapsed first command would remain visible.)
Turned out that ConsoleView does focus its prompt on any click into the console log area. That includes scrolling down to make the prompt visible.
I have hard-coded this special case when you are expanding/collapsing custom formatter widgets. But it should be properly solved in devtools code in the future.
Big thank you for the quick investigation!
It was just independently fixed upstream by @psybuzz:
https://chromium.googlesource.com/chromium/src/+/c5213f9bd6b6e6e95f40852b56ef62f1307c94ee
Looking at their patch and it turns out that my solution was probably just partial. It worked only for custom formatters, not generally for anything expandable like internal widgets for native js objects.
Hi,
It seems this bug recently got back... (using Dirac 1.2.17, Chrome 64.0.3253.3). The normal (non-Dirac) DevConsole does not show this error.
Any idea whether it can be solved again this time?
The bug was re-introduced by dce30c4.
I'm going to apply my ad-hoc patch, because I don't want to spend more time on this.
Now that I looked at it once with more detail I think dce30c4 actually fixed the regression which was introduced earlier. That is also why you didn't see the problem in internal Canary devtools, there already was fixed situation with dce30c4 patch. Dirac 1.2.17 is older than that and didn't have it.
But my patch won't hurt. Time for a new release.