sindresorhus / hide-files-on-github

Chrome extension - Hide nonessential files from the GitHub file browser
https://chrome.google.com/webstore/detail/hide-files-on-github/lpnakhpaodhdkleejaehlapdhbgjbddp
MIT License
320 stars 36 forks source link

Collapse all hidden files to a single item in the list. #33

Closed jamestalmage closed 8 years ago

jamestalmage commented 8 years ago

Rather than the button to show files, what about creating a single expando entry in the list saying "hidden files". It's a gentle reminder that you aren't seeing all the files, and you would find it more intuitively when you've forgotten this extension is installed and are searching for .gitignore in response to some unexpected file making it into a PR.

sindresorhus commented 8 years ago

Something like this, right?

screen shot 2016-05-18 at 11 33 46
jamestalmage commented 8 years ago

Yep!

Maybe a little more obvious in the styling that it's different from the rest (and expandable). maybe just a ... like next to the commit message.

sindresorhus commented 8 years ago

Agreed. PR welcome. (Maybe @radiovisual or @acobbearden would be interested).

radiovisual commented 8 years ago

I like this idea. Something like this is more likely to persist against github's frequent UI updates to the File Navigation Bar.

I don't mind taking this on, so it's just a matter of deciding where we want the injected 'expando' link to be placed. @jamestalmage suggested an ellipses ... next to the commit message, but github already does that (as you can see in @sindresorhus 's screenshot above: there is already an ellipses to right of the commit message which encapsulates the merged PR's various commit messages). So my vote is to put the expando link either at the bottom of the file table (like in sindre's screenshot) or at the top of the file table so that it's immediately obvious if you have the hidden files hidden or shown.

jamestalmage commented 8 years ago

I was suggesting it be similar to the ellipse next to the commit message, not that it should be the location.

Bottom or top. Not sure which would be better.

radiovisual commented 8 years ago

Oh I see. Sorry I misunderstood.

I already started implementing the functionality in PR #34 which puts the button at the bottom (the bottom felt a bit more natural to me), but as for the position and styling of the button, I am totally open to suggestions.