brunosimon / keppler

Real time code sharing for your lectures and presentations.
MIT License
1.93k stars 101 forks source link

Make -i the default #35

Closed JasonEtco closed 6 years ago

JasonEtco commented 6 years ago

Hey folks! This is a really great tool y'all have built ✨

My first attempt at using it was a little rough though; I assumed that running keppler would show my existing files in the browser. After some confusion, my buddy clued me in to the --initial-send flag, and then I was happy 😊

I think it makes sense to have that be the default behavior, then have a flag to flip it to hide files. Or include something about the -i flag in the Getting Started docs.

brunosimon commented 6 years ago

Yes you are right and others had the same issue.

Problem is, if you start keppler on a big project or at the root (as a mistake), there's going to be too much files and keppler will crash. I could add limitations like a maximum depth or a maximum number of files but what should the values be? If the values are wrong, the user wouldn't understand why his files aren't showing.

A solution may be to have questions asked in the terminal when launching keppler to set the config:

What do you think?

JasonEtco commented 6 years ago

Problem is, if you start keppler on a big project or at the root (as a mistake), there's going to be too much files and keppler will crash.

I think that you can do some "smarter defaults" - auto hiding node_modules would be a big win there. Max number of files makes sense to me as well, but it would need a notification in the console or even in the browser, with a banner at the top saying something like "Not all files are shown, edit them to make them show up." That's a better step I think, even if its not perfect.

A solution may be to have questions asked in the terminal when launching keppler to set the config:

I love the simplicity of Keppler as it is now. CLIs that ask question are neat and have their uses for complex CLI tasks, but often they're not as practical as a one line command.

brunosimon commented 6 years ago

Having just a part of the files wouldn't be great.

How about Keppler check the number of files that would be sent at start. If it's bellow the limitation, they are sent. If it's above, an error is shown in the terminal and none are sent.

And I can add a config argument like "--force-initial-files" in case the user want to send all files anyway.

brunosimon commented 6 years ago

By the way, node_modules are excluded by default in the --exclude argument with some other files :)

JasonEtco commented 6 years ago

How about Keppler check the number of files that would be sent at start. If it's bellow the limitation, they are sent. If it's above, an error is shown in the terminal and none are sent.

And I can add a config argument like "--force-initial-files" in case the user want to send all files anyway.

I think that's a great idea!

brunosimon commented 6 years ago

Good news, current files are now sent at start.

The --initial-send argument is gone and replaced by a --limit or -l which defines the number of files that can be sent at start. It's default value is 99 and setting -1 will make it infinit.

If there is too much files, none are sent and a simple error is shown in the terminal.

I really have to work on those arguments names...