christianalfoni / webpack-bin

A webpack code sandbox
http://www.webpackbin.com
MIT License
710 stars 75 forks source link

Feature Request: ability to re-order files #227

Open faceyspacey opened 7 years ago

faceyspacey commented 7 years ago

With a lot of files, the ones you want to be visible may get pushed out of visibility without scrolling. So that leaves your only option being re-making the webpackin with the files you want users to see at the front.

I know drag-n-drop is likely not high priority, but I wonder if there is another easier way to configure it? Perhaps an array you can supply in the configure menu.

bfitch commented 7 years ago

Haven't had a chance yet, but I'd like to add a file browser (to the left) with tabs representing active files. That should help, I think.

faceyspacey commented 7 years ago

most definitely.

christianalfoni commented 7 years ago

Hey, that sounds like a good idea @bfitch. The mobile version already has something similar, but yeah... this could work for both mobile and desktop :)

man. 6. mar. 2017 kl. 16:54 skrev James Gillmore notifications@github.com:

most definitely.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/christianalfoni/webpack-bin/issues/227#issuecomment-284437790, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxgweLZ3ZHe66qcy4kfz7jSbSVsfJTlks5rjCwdgaJpZM4MUT8t .

faceyspacey commented 7 years ago

I love the left file browser by the way. I think it should just be the default and the files row removed so that there is more vertical space. I personally have a few demos that really need that vertical space since the app's are made to be non-vertically-scrollable on purpose.

File ordering is far less important with a tall sidebar as we have now because a lot more files can be seen at once since each file name's text runs horizontally.

However what is now important is the ability to make folders. That way what you build here can actually become your app. Couple that with the ability to upload apps (even if the webpack config can't be used), and you have huge marketing potential: now anyone can upload their pre-existing app without having to remake it from scratch. This is especially important for package creators that want to demonstrate capabilities, as they likely already built boilerplate examples and if they could click one button to upload their code, webpackbin now has a bunch more high-traffic examples. Those package creators are far less likely to recreate everything on webpackbin. I mean you could also simply allow pasting the URL to a github URL and it will extract its files. Imagine how many package creators will do that. Imagine how many users of packages will do that for them and post the link back to their Github issues, which the creator will then see and perhaps post in a readme, all without having to even think about doing it themselves.

Basically the way React Storybook became popular for package maintainers to showoff their packages in use is what could happen for webpackbin. It does not matter for most packages that we can't bring along our webpack config--we can easily figure out how to replicate what we need in webpackbin. But if you want to take it farther, obviously build a way to specify custom webpack configs. At least part of it: e.g. loaders, plugins. I get that you don't want arbitrary code running on your server where these packages are built. So whitelist some plugins and loaders, etc.

Anyway, I know it's a lot of work. I'm grateful for the sidebar you recently added. My suggestion is that the next step is folders. And then the next step after that is a feature to upload or paste a link to a repo to extract files from. Those 2 features don't seem outlandish, and perhaps are low-hanging fruit. Just add a button next to the files in the drawer to designate which file is the entry, rather than only allowing that on file creation.