guppy icon indicating copy to clipboard operation
guppy copied to clipboard

Flow/Typescript module

Open joshwcomeau opened this issue 5 years ago • 1 comments

Feature Idea

Create a module in the Guppy UI for static-typing. Will use Flow as the example, although we should support TS as well.

If Flow isn't installed in the project, the module will include an "Install Flow" button, which will:

  • add the flow-bin dependency
  • run yarn flow init to generate a config file

Once it's installed, it will work similarly to our Development Server module. It can be toggled on, and when it's on, it logs Flow output.

We might also be able to take advantage of the fact that this is a UI. Some ideas:

  • We can display # of errors in a "condensed" mode, if the module is collapsed
  • Maybe we can list the error locations, and support click-to-open-file-in-IDE?
  • Links to documentation to explain common confusing errors?

Prioritization and Blocking Issues

This isn't a top-priority ticket for me, as it doesn't address the needs of our core user, the true beginner. But, I do think it would be really powerful to have, and there might be things we can do to gently introduce static typing to newer developers.

However, I do think we should avoid adding anything to the UI for new developers; I don't want this to complicate things for them.

This feels like a perfect usecase for the panels idea, discussed in #155. Essentially there would be a Flow module, disabled by default, but it could be toggled on through the application menu, and moved around to create the perfect workspace for each user.

So, I feel like this is probably more of a long-term idea, but a good motivator to work on a new UI pattern that will allow for custom module arrangement.

joshwcomeau avatar Sep 16 '18 11:09 joshwcomeau

Thanks for the idea, @AWolf81! Feel free to edit this issue if it doesn't capture your idea perfectly.

joshwcomeau avatar Sep 16 '18 11:09 joshwcomeau