adobe-research / theseus

A pretty darn cool JavaScript debugger for Brackets
Other
1.34k stars 69 forks source link

Extra padding added to gutter when Find / Quick Open invoked #32

Open peterflynn opened 11 years ago

peterflynn commented 11 years ago
  1. Install Theseus
  2. Open any file (I'm using the 'FindReplace.js' in the Brackets src as my test)
  3. Invoke Find (Ctrl+F) or Quick Open (Ctrl+Shift+O)

Result: The whole editor area shifts to the right, as if extra padding-left has been added to the line number gutter.

alltom commented 11 years ago

It... probably has. I think I have a less rule in there that doesn't kick in all the time. It was also happening when I pressed ⌘0. I'll see if I can track it down.

alltom commented 11 years ago

If I remove the CSS rule .CodeMirror-linenumbers { width: 60px; } the gutter stabilizes, but obviously there's not as much room for call counts. I'm leaning toward keeping that CSS rule, assuming the resizing gutter doesn't cause actual problems...?

I could add a dedicated call count gutter to the CodeMIrror instances, but I think that would take up a lot of space and I haven't checked to see how reliable that would be.

peterflynn commented 11 years ago

@alltom I think the odd part is that the rule jumps into effect suddenly when you take some unrelated action in the UI. If it was in effect all the time, it would feel a lot less weird.

But even better, I think, would be if the gutter grew when Theseus / Live Development was initiated, and shrank back down when the live-debugging session terminated. It's possible to programmatically manipulate CSS stylesheets in JS, so if you injected your own <style> block with just that one rule you might be able to toggle it on and off fairly easily (something like this).

alltom commented 11 years ago

Would it also be okay to add a class to <body> or are there benefits to CSS manipulation I don't know about?

peterflynn commented 11 years ago

Oh good point -- that's an even simpler way to toggle it on and off.

marcelgerber commented 11 years ago

For me, the gutter resizes just after the start (when theseus was injected)... (Win8)