atom-haskell / ide-haskell

Haskell IDE plugin for Atom editor
https://atom.io/packages/ide-haskell
Other
232 stars 30 forks source link

Panel auto hide option, for when there is nothing to show #185

Closed supermario closed 7 years ago

supermario commented 7 years ago

Adds a config option:

screenshot 2017-01-15 12 04 37

Which behaves like so:

auto-hide-hkide

Didn't presume to make it default: true as I'm unsure if this is a generally desired behavior, but I prefer to have the visual space when there are no errors, perhaps someone else would too? 😄

varosi commented 7 years ago

The same will be useful for auto-hiding Completion Hint Panel, too. If it is empty to be hidden.

lierdakil commented 7 years ago

First of, thank you for your work. It's greatly appreciated. I do have some reservations however.

Problem is, there are some control elements on the panel besides check results, f.ex., with ide-haskell-cabal: image

What do you think about hiding only the output messages, but leaving panel header in place? In essence, something similar to this: image

I know it still takes up valuable vertical space, which is a limited resource on smaller 16:9 screens (like a WXGA notebook), but I feel that there needs to be some sort of balance between that and control visibility.

Added complexity: special considerations would be needed in case panel is docked to left or right border.

supermario commented 7 years ago

@lierdakil great point. I think leaving the header panel intact is a great idea, living with a 20px reduction is definitely better than a permanent ~100-200px one IMO!

It would also have the added benefit that you could still see when the plugin is "thinking" on file save – something of which there is no indicator with my current solution.

Happy to give it a bash but unsure if my atom-foo (or js/coffee-foo for that matter) is strong enough 😬 might need some pointers.

lierdakil commented 7 years ago

Turns out, this was more involved than adding a couple lines here and there, so thank you for offering, but I decided it'd be easier if I do this myself. Most notably, some arcane css-foo was required to make this play nice with panel docked to left/right (see 6a9b1159f75fdd605ff6b7705b33770ec8d758ab if interested -- it does some other things besides that, though)

Published as v1.9.0. Please report any issues with output hiding you encounter (it might be a little bit wonky, especially in conjunction with ide-haskell-cabal or ide-haskell-repl). Also it assumes that you have switchTabOnCheck enabled. If you don't, output won't show automatically on new messages -- you'll have to click on tab you want explicitly.

lierdakil commented 7 years ago

@varosi, ac-h implements hiding completion hint panel in v0.7.0, see settings.

varosi commented 7 years ago

@lierdakil, 10x! I'm waiting for 0.7.0 to be available for download!

lierdakil commented 7 years ago

@varosi, it is already, but you need Atom 1.13.

varosi commented 7 years ago

Thanks for the hint! I now updated it from the site, because automatic update was not reporting this new version.

2017-01-16 12:30 GMT+02:00 Nikolay Yakimov notifications@github.com:

@varosi https://github.com/varosi, it is already, but you need Atom 1.13.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom-haskell/ide-haskell/pull/185#issuecomment-272825450, or mute the thread https://github.com/notifications/unsubscribe-auth/AFxXhsUF09_pY7cexM3jecQoLWk7WVPnks5rS0bIgaJpZM4Lj5mI .

varosi commented 7 years ago

Just a small bug report:

  1. Panel output is empty
  2. Go to settings and enable auto-hiding
  3. Output will not hide in this moment even it is empty. I have to click "Build" to hide it.

2017-01-16 12:36 GMT+02:00 Vassil Ognyanov Keremidchiev varosi@gmail.com:

Thanks for the hint! I now updated it from the site, because automatic update was not reporting this new version.

2017-01-16 12:30 GMT+02:00 Nikolay Yakimov notifications@github.com:

@varosi https://github.com/varosi, it is already, but you need Atom 1.13.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom-haskell/ide-haskell/pull/185#issuecomment-272825450, or mute the thread https://github.com/notifications/unsubscribe-auth/AFxXhsUF09_pY7cexM3jecQoLWk7WVPnks5rS0bIgaJpZM4Lj5mI .

lierdakil commented 7 years ago

I don't see this as a bug. You can manually open collapsed output if you click on any tab, and you can also collapse output manually by clicking on current tab again. So generally speaking, empty non-collapsed output is a perfectly valid state. Of course, I could add a hook to collapse output when setting is triggered, but I'd prefer to avoid this additional complexity.

varosi commented 7 years ago

Whatever you decide. It's not a big deal. I have just noticed this.

supermario commented 7 years ago

@lierdakil awesome, works well! 💯