fmsouza / wcode

Monaco-based code editor which runs inside a browser.
MIT License
134 stars 11 forks source link

'Close' SVG shrinking fix, added extra click listener to FIleTab div #2

Closed DukeFerdinand closed 7 years ago

DukeFerdinand commented 7 years ago

1. Shrinking Fix

FileTab width was only 100px, and the longer file names were making the 'Close' svg really small, too small to click. Made the .FileTab class width auto instead to compensate. Not quite as uniform in width, but no more svg shrinking.

2. Extra Click Listener

Clicking the FileTab div would do nothing unless you clicked the actual filename text, so added the event listener to a container div also for a little bit larger click target

fmsouza commented 7 years ago

Thanks @DukeFerdinand! I was thinking leaving the width: auto wouldn't look that nice. It's even better than fixed width for all the tabs.

However, the code in the editor is not being changed when you click in other tab. The active tab changes, but the active code still the latest opened.

DukeFerdinand commented 7 years ago

@fmsouza I was hoping I could help! Sublime, VS Code and the like have a nice auto width and I thought they looked pretty good, plus the full file name is easier for navigation when you've got similar naming schemes IMO

Hmmm well crap, I could've sworn it was changing before I committed, I had a weird github permission issue and had to move some code around, so I probably didn't commit something right. I'll give it a look later