facebookarchive / ide-flowtype

Flow support for Atom IDE
Other
178 stars 17 forks source link

Outline Improvements #30

Open wldcordeiro opened 6 years ago

wldcordeiro commented 6 years ago

Seems that the outline view is lacking compared to the ide-typescript package.

Outline with Typescript IDE

screen shot 2017-09-19 at 1 22 53 pm

Same file outline with Flow IDE

screen shot 2017-09-19 at 1 23 25 pm

Also it'd be great if hovering over the icons showed a tooltip that told you what they represent (might be something for the Atom base plugin.)

wbinnssmith commented 6 years ago

@wldcordeiro, which improvements do you have in mind? The primary differences I see here are the top-level module name (something that is determined only by the filename in node-style module resolution -- so I'm not sure it should be part of the outline), and alphabetical sorting of outline items.

We might add alphabetizing and filtering in a later release. Is there anything else you'd like to see?

wldcordeiro commented 6 years ago

@wbinnssmith I'd like to see some more in terms of showing variables within the functions.

screen shot 2017-10-31 at 4 46 23 pm

For example, I have here a ~300 line redux reducer and the only thing the outline found is the reducer itself and an initializer. I would like to see something like this (which neither TS or Flow's server does).

* initState
* byId
  * lastSame
  * case constants.FETCH_ITEMS
  * case ...
yoiang commented 6 years ago

Would React<->Flowtype support be out of the scope of this project? If so is there an appropriate place? Should this be a separate issue?

It would be great to have the outline recognize and display the contents of the objects being passed in as a React.Component's props and state.

Before:

before

After:

after