cortesi / devd

A local webserver for developers
MIT License
3.43k stars 145 forks source link

option to ignore hidden files #77

Closed maphew closed 7 years ago

maphew commented 7 years ago

It would be nice if the server could be instructed to not display hidden files when serving a directory.

2016-12-01 12_53_44-mozilla firefox

cortesi commented 7 years ago

Hmm... let's think about this. If we added this, it would have to be controlled through a command-line option, and would also have to default to "off", so we don't confuse users. I think this would have a low incremental benefit, add un-needed complexity, and also be very rarely used. So I'm definitely -1 on this approach.

A better alternative would be to simply improve the directory listing page. One quick win would be to change the sort order so that hidden files appeared last in the list rather than first. That alone would probably effectively remove the usability issue here. There are also more complex things one could do - like hide hidden files by default and then have a "show hidden files" button on the file listing page to display them (I'd have to be convinced this is the right move, though). One could also slightly grey out hidden files to make them less obtrusive.

In summary: let's think about improving the directory listing page rather than adding another option.

maphew commented 7 years ago

Changing the sort order would be help, and handling via directory listing sounds smarter than a command line option.

One idea: allow a stylesheet .cssrc file present in {startup folder} or {exe folder} to override defaults. Dunno if this worth the complication, but would allow further tuning to be in the hands of end users and not devd developers.

cortesi commented 7 years ago

I've just pushed a commit that a) moves hidden files to the end of the listing, and b) greys them out. I think this solves the UX issue here. Providing a style override for directory listings would be really complicated and way overkill for a rare use case.

Please take a look, and re-open this ticket if you think anything else needs to be done.