Skip to content

New styles on Flutter dartdocs are too subdued #1441

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
Hixie opened this issue May 25, 2017 · 13 comments · Fixed by #1581
Closed

New styles on Flutter dartdocs are too subdued #1441

Hixie opened this issue May 25, 2017 · 13 comments · Fixed by #1581
Labels
area-web-design Something a web designer interested in helping could do. customer-flutter Issues originating from important to Flutter P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@Hixie
Copy link
Contributor

Hixie commented May 25, 2017

The new styles are a bit disorienting because the name of the member you're looking at is so subdued.

e.g. https://docs.flutter.io/flutter/rendering/MainAxisAlignment-class.html

The most important thing on that page is the word "center" as far as I can tell, maybe "Constants". It should be "enum MainAxisAlignment", which is there twice but one of them is tiny and one of them is off on the right and grayed out. Actually even better would be for the header to be "MainAxisAlignment enum".

https://docs.flutter.io/flutter/painting/BorderRadius-class.html is another example

The first thing i read is "An immutable set of radii for each corner of a rectangle", which if i'd just landed there (e.g. following a link) would be confusing. When switching through my tabs, I need to know that that is the "BorderRadius class".

I think the solution is to move the <h5> from the right hand column into the first <section> of the main column, change it to an <h1>, and put the identifier before the keyword. The current styles already make that work pretty well. Maybe they could be tweaked a little but I'm not the right person for that.

cc @devoncarew @sethladd

@jcollins-g
Copy link
Contributor

dartdocs outside of flutter also have this general layout, so it is applicable for more than flutter.

@jcollins-g jcollins-g added customer-flutter Issues originating from important to Flutter area-web-design Something a web designer interested in helping could do. P2 A bug or feature request we're likely to work on labels May 25, 2017
@devoncarew
Copy link
Member

devoncarew commented May 25, 2017

From some noodling up here:

screen shot 2017-05-25 at 1 22 04 pm

(which is pretty similar to the idea above, modulo Foo class)

@jcollins-g
Copy link
Contributor

jcollins-g commented May 25, 2017

The <T> is just a sample of course, MaterialButton doesn't have type parameters. (And if it did they would be in the header above too)

Some other options we talked about include reintroducing the small headers on both side columns to make it clear what they are for. Also, we can change the emphasis or lack of same on various parts of the navigation on the top bar, with a mind to not varying too much from flutter.io style.

@sethladd
Copy link
Contributor

FWIW I found the source code sections to be hard to read. I didn't realize I could hover over the source code to make it easier to read. On windows chrome, due to something (??), the source code is a bit blurry even when I hover over it.

@devoncarew
Copy link
Member

Me as well. This looks like a deliberate change though: https://github.com/flutter/flutter/blob/master/dev/docs/styles.html#L136 (/cc @Hixie)

@Hixie
Copy link
Contributor Author

Hixie commented May 31, 2017

It's intentional because some people were considering them to be sample code. I'm open to better ways to remove the emphasis without outright removing or hiding it behind a speed bump. :-)

@devoncarew
Copy link
Member

We could change the title of that section from Source to Implementation:?

@Hixie
Copy link
Contributor Author

Hixie commented Jun 8, 2017

@jcollins-g If you could point me to the file where I would make this change, I'd be happy to do it.

@jcollins-g
Copy link
Contributor

https://github.com/dart-lang/dartdoc/blob/master/lib/templates/_source_code.html#L3

I believe this is the right place. "Implementation" sounds fine to me if you think it would be less confusing.

@Hixie
Copy link
Contributor Author

Hixie commented Jun 9, 2017

I believe the "source code" section is a separate bug, this specific bug is about the title at the top.

@jcollins-g
Copy link
Contributor

Oh, I thought you were asking about the separate bug. Which of the proposals above do you actually want to see implemented?

I think we're mostly waiting on a "yes, do the thing" confirmation here and we can do it for you, too.

@Hixie
Copy link
Contributor Author

Hixie commented Jun 12, 2017

If you want my vote, I vote for what I originally proposed, which is what devon showed in the screenshot above, but with the heading using English grammer (name-category, e.g. "Foo class", "VoidCallback typedef", etc, rather than category-name).

@Hixie
Copy link
Contributor Author

Hixie commented Jan 2, 2018

I'm moving this to P1 based on the number of reports we get of this. (display warts, not widespread P2 -> widespread P1)

@Hixie Hixie added P1 A high priority bug; for example, a single project is unusable or has many test failures and removed P2 A bug or feature request we're likely to work on labels Jan 2, 2018
This was referenced Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-web-design Something a web designer interested in helping could do. customer-flutter Issues originating from important to Flutter P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants