Atom-ide-ui: Feature-Request: Collapse Functions by Default in Outline-View

Created on 13 Feb 2018  路  7Comments  路  Source: facebookarchive/atom-ide-ui

Hey,
it would be nice to have an option that by default all functions are collapsed in the outline view. Another way I could imagine is collapsing all functions if otherwise the outline-views height is larger than the viewport-height (outline-view is scrollable).

bildschirmfoto 2018-02-13 um 23 22 20

VS

bildschirmfoto 2018-02-13 um 23 22 04

Dennis

Most helpful comment

What would the convention be for collapsing?

  • everything at top level
  • functions at top level
  • functions at any level
  • objects/classes top/any
  • namespaces/packages top/any

I think given the plethora of languages and code structures one size will not fit all...

All 7 comments

Bonus: A counter on the right of a function could be added to indicate how many items are underneath but maybe another issue should be opened for that one.

Thanks for the request! @wbinnssmith whatcha think?

What would the convention be for collapsing?

  • everything at top level
  • functions at top level
  • functions at any level
  • objects/classes top/any
  • namespaces/packages top/any

I think given the plethora of languages and code structures one size will not fit all...

overall I like the idea.

There are a few cases where collapsing things might be less useful. For example, if there's a single top-level function with a number of useful locals defined, collapsing would leave us with a single visible node in the tree with a bunch of useful stuff underneath it.

I think though there won't be any kind of heuristic that will be globally useful across languages. What we might consider is adding a default 'is expanded' property on each node in the outline and let individual packages determine the right level of initial expansion.

One option here might be to have a drop-down next to the filter box that allows people to check on/off the kinds they want displayed in the list. I know somebody people don't even want to see variables which might eliminate the need for functions to be collapsed at all.

Yes please. I almost never want to navigate by variable definitions and it's just wasting vertical space. I'd vote for having them always collapsed by default.

Was this page helpful?
0 / 5 - 0 ratings