theseus icon indicating copy to clipboard operation
theseus copied to clipboard

Extra padding added to gutter when Find / Quick Open invoked

Open peterflynn opened this issue 12 years ago • 6 comments

  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.

peterflynn avatar Sep 24 '13 00:09 peterflynn

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 avatar Sep 24 '13 02:09 alltom

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.

alltom avatar Oct 08 '13 16:10 alltom

@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).

peterflynn avatar Oct 08 '13 18:10 peterflynn

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

alltom avatar Oct 08 '13 22:10 alltom

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

peterflynn avatar Oct 08 '13 22:10 peterflynn

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

marcelgerber avatar Oct 09 '13 06:10 marcelgerber