Skip to content

sort order for the different sections #607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
devoncarew opened this issue Jun 23, 2015 · 5 comments
Closed

sort order for the different sections #607

devoncarew opened this issue Jun 23, 2015 · 5 comments
Labels
P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug

Comments

@devoncarew
Copy link
Member

I'm used to putting constants at the top of my source files - dartdoc generates the const section after classes. Do we have a sense for the ideal presentation order? Here's what we have currently.

For libraries:

  • classes
  • enums
  • properties
  • constants
  • functions
  • typedefs
  • exceptions

And for classes:

  • constructors
  • constants
  • static properties
  • static methods
  • properties
  • methods
  • operators

I think we should move constants up in the list, and possibly statics above ctors.

@keertip
Copy link
Collaborator

keertip commented Jun 23, 2015

How about

For libraries:

  • constants
  • typedefs
  • properties
  • functions
  • enums
  • classes
  • exceptions

And for classes:

  • constants
  • static properties
  • static methods
  • properties
  • constructors
  • methods
  • operators

@devoncarew
Copy link
Member Author

Like it! Maybe swap methods and operators? Don't know that I have a strong opinion.

@keertip
Copy link
Collaborator

keertip commented Jun 23, 2015

Swapping methods and operators works for me.

@seaneagan
Copy link
Contributor

Technically a constant is a property, so what about combining those two groups, and adding some visual indication on properties that happen to be declared as "const", maybe just the word "const"? Or at least co-locate those two groups (above "typedefs" is listed in between them).

@sethladd
Copy link
Contributor

sethladd commented Jul 6, 2015

@keertip +1 for #607 (comment)

@sethladd sethladd added type-enhancement A request for a change that isn't a bug P2 A bug or feature request we're likely to work on labels Jul 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants