-
-
Notifications
You must be signed in to change notification settings - Fork 243
Conversation
Honestly I think this is all great. I particularly like the differentiation between code and links. The contrast of code text is more subtle in your proposed version, but I think that's a good thing. It's enough to be noticeable but not so much as to be distracting. I also really like the TOC. A nice side-effect is that the text is no longer so wide, which I think was a readability problem anyway (the line length in your baseline 1280px example are way too long). Overall this gets a big 👍 from me. |
Forgot to ask whether it is an intentional for visited links to have same color as unvisited? When I started to use ESLint, not easily seeing which rules I had already read felt confusing. Here is a picture with the inner hexagon color for visited and the outer hexagon color for unvisited. I agree with first impression feedback from @omerbalyali that the contrast is too subtle and so am inviting him to advise on colors compatible with logo which have enough contrast. Glad to get responses for situation when you look for technical information, which links are better for you to be more emphasized versus less emphasized in coloring? I can see two conflicting principles for what to emphasize:
|
Would we need to specify TOC in every file we want it to show up, or will it show up automatically? I think it would be great to add TOC to most of the user guide pages as well as developer guide, but not to rule pages. |
@ilyavolodin Must insert the snippet in every file (EDIT that has a toc) so you can include in some but not others. Assuming we will want to do it in the build to avoid inconsistency.
|
A helpful insight in #256 (comment) that consistency in structure of rule pages implies little useful information in table of content. Except options, maybe. Here are pictures of a subset TOC for rule pages. About half of rules have no Options section, such as generator-star, so omit the TOC: About half of rules have Options section with h3 headings, such as comma-dangle: Only a few rules have Options section with h3 and h4 headings, such as no-shadow: EDIT and here is a picture of no-shadow with contents limited to h2 and h3: |
I actually really like seeing the options in the TOC, I think that's super-helpful to get a sense for the rule options at-a-glance. If there's a way to limit to just h3, I think that would be best. |
@IanVS What do you think about the picture of Command Line Interface in #256 (comment) The only h2 headings are Options at the beginning and Ignoring files from linting at the end Do you think it would make sense to “flatten” the hierarchy: promote the h3 headings like Basic configuraion to h2 and h4 headings like |
Honestly, I think the individual commands in code tags are too much for the TOC as well. I think it would look good with:
|
@pedrottimark This looks better, but maybe a little more blue for unvisited links could be better. But it's already distinctive enough. |
@omerbalyali Here is a picture with the “Netscape defaults” for an ahead-to-the-past look, seriously! https://www.w3.org/wiki/Styling_lists_and_links#Example:_recreating_the_Netscape_defaults
|
efb457c
to
cfd4a67
Compare
cfd4a67
to
806afb6
Compare
Underlining brings in too much visual noise. I don't have any preferences for colors, since I don't find it all that useful for documentation site. Just because I visited that link before doesn't mean much to me. |
bd1d796
to
967e3c7
Compare
@ilyavolodin Thanks for your clear thinking. The most recent commit gets rid of underline and visited color, changes the link color from 3a33d1 and 272296 on hover to outer hexagon blue 4B32C3 always, because underline appears as visual feedback on hover. |
While browsing locally generated site with the proposed format, I noticed about the TOC in rule docs:
Therefore, even a limited table of contents for rule doc pages is on hold. |
Just some additional feedback: it's uncommon to have TOCs on the right of a page. I'd much rather see it on the left or inline. |
In fact, I have seen sometimes TOCs on the right of a page in Japan. For example: I think it's good that it doesn't prevent me reading content because we start to read from top-left. |
I'm also good with having TOC on the right. In my mind if TOC is on the left, it's very important to the flow of the information. If it's on the right, it's just a helper (which is what it is in our case). |
I'm another 👍 for the right side. I really like the way it's done on babeljs.io. It serves to orient the user nicely to the content of the page without being in the way. |
Personal preference: I like #1 better. It's much cleaner to me. If we don't want to use colons, then I would rather put rule names into table column, so that they all align. |
c2a7c46
to
26dd2e4
Compare
I'd like table columns, myself. |
Hmm, that's more difficult to read, IMHO. It's easy to lose your place going from the rule id to its description. I doubt right-aligning the rule IDs would look very good, and I'm not a fan of zebra-striping. Any other thoughts how we could make it easier to track from id to description? |
@IanVS What do you think about a dot leader on odd rows? |
Hm, it's better but it seems a little "odd" to have them on every other row (see what I did there? 😜). I assume it's too cluttered-looking to have them on every row? |
Alternating row background colors helps a lot with this. We can probably get away with a light gray on every other row to guide people's eyes. |
Here are 3 × 3 pictures of a responsive design for the rules index page:
1a) Beginning of index at screen width 1024px for desktop, laptop, or iPad in landscape orientation 1b) Beginning of index at simulated screen width 600px for Nexus 7 in portrait orientation 1c) Beginning of index at simulated screen width 414px for iPhone 6 Plus in portrait orientation 2a) Middle of index (this is the worst case place for my eyes) at screen width 1024px 2b) Middle of index at screen width 600px 2c) Middle of index at screen width 414px 3a) End of index (the section for Removed rules) at screen width 1024px 3b) End of index at screen width 600px 3c) End of index at screen width 414px |
@pedrottimark That looks great! Would it make sense to include the background colors behind the "recommended" and "fix" icons? I think it'd be easier on the eyes for some people to identify which rules the icons belong to. What are your thoughts? |
Alternating backgrounds (zebra stripes) is the most effective solution but I think gray background color would be better than the purple hue. For smartphones and tablets, description lines for the rules can start with new line and there can be more margin/padding at the bottom of the each rule row. By the way, nice work @pedrottimark |
Last iteration looks pretty solid to me. I like the idea of collapsing table in mobile view. Seems like the best use of space. |
Looks nice! Small nitpick would be to give the icons some left/right padding, but otherwise 👍 |
@nzakas Yes, good eyes! Keep bringing the nitpicks. Every little bit helps. After I have tested the updated styles on various browsers for current list format and future table format, I will push the changes and summarize them in a comment. |
3f5a94e
to
58b6ab1
Compare
Prerequisites on the site to changes in Makefile.js which will use rule
The styles are compatible with the current list format. Main goals:
|
@omerbalyali Can you share your expert color advice about the following rare situation? In the original style, there is no color difference between In the new style, I noticed something looked different, so I pointed the mouse, and underline appeared to confirm.
|
Light gray (or a blue tint) background for "code" blocks is well known, so this is the best option in my opinion. Maybe there can be a little more padding inside the code blocks. Also I'm really not sure if users can understand that they are links? (Probably they can, at least they will try but again I'm not really sure about it) At least making the normal, non-link code block grayscale differentiates the links and normal code blocks. Again there should be more padding, like 2px. (and maybe the text inside the non-link code block should be darker than the normal text?) |
58b6ab1
to
88d33e4
Compare
@omerbalyali Brilliant advice. Thank you!
|
88d33e4
to
b207af6
Compare
Last, but not least, add |
@pedrottimark do you think we're ready to merge? |
@nzakas Yes, thank you for your feedback and patience, let’s go for it. There are immediate changes for readability: limited line length and improved typography. |
This pull request adds the styles for a table of contents, which was recommended in #186 (comment).
Goals:
Goals in 4 words: content first, mobile second. Our analytics cannot tell whether it is worth the effort to make the site mobile-friendly until we have gone at least halfway. Chicken and egg. Careful effort to improve readability and navigation works for both mobile (especially tablet) and desktop screen.
Some following comments have explanations and pictures. Several pictures show what the proposed table of contents will look like for critique. It will require changes to the Makefile.js build file.
Here is the notation that kramdown uses, see http://kramdown.gettalong.org/converter/html.html#toc
Set
toc_levels: 2..4
in _config.yml see http://kramdown.gettalong.org/options.html#option-toc-levels