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 35 forks source link

always dim and move toggle button to the top #40

Closed radiovisual closed 8 years ago

radiovisual commented 8 years ago

This moves the toggle button to the top, and simplifies the options page by removing the dim toggle (dim is always on, no matter what mode you are in).

radiovisual commented 8 years ago

The new options page:

image

jamestalmage commented 8 years ago

What if the toggle button was always there, and the option was just "hide by default"

radiovisual commented 8 years ago

Actually, yes, that is a better idea, because up to this point, and even more so now with this PR, we have essentially had two different toggle buttons, one on the UI (the "Show/hide" button), and one in the options.

Your idea simplifies things, and puts all the power into the toggle button. I like it.

radiovisual commented 8 years ago

Ok, I pushed a new commit. I love everything about this idea, because I was able to remove a lot of code (to simplify the codebase), but it also keeps the extension true to its name: hide-files-on-github. So now the toggle button is always there, and the option is to just ''hide by default", which is also better, because it keeps your "showing" or "hiding" encapsulated to the GitHub page you are viewing, instead of using the same global settings across all GitHub pages.

The new options page is now super sleek:

image

jamestalmage commented 8 years ago

Hmm. Does it default to hidden now? My thought was to leave a checkbox in options, that said

When checked, the files would be hidden when you got to the page, and you must click to show them.

When unchecked, the files would be visible, but you could hide them with the button.

radiovisual commented 8 years ago

Yes, it defaults to hidden now. I feel like giving the option for users to "Show by default" defeats the purpose of the extension. I like the simple usability of one button that lets me show or hide the files. No need to add in another show/hide toggle on top of a show/hide toggle.

If we give them the option to "Show by default", then they will always need to visit the options to change the show/hide behavior, but they already have an option to change the show/hide behavior with one simple click of the "show/hide" toggle button on the UI, so adding in another toggle on top of a toggle feels like "too much toggle."

But I am totally open to suggestions, so if the vote goes to the "Hide by default" toggle in the options, then I will happily add it in.

jamestalmage commented 8 years ago

Let's leave it the way you have it now.

sindresorhus commented 8 years ago

I'm ok with this as I never used the Dim option anyways.

fregante commented 8 years ago

Minor note: the extension allows to hide any file with regex, but the copy is Hide dotfiles. I'd do this:

Different clickable label:

screen shot 2016-06-01 at 11 40 22

Just leave them open after:

screen shot 2016-06-01 at 11 40 59