GithubHelp home page GithubHelp logo

Comments (6)

Meggin avatar Meggin commented on July 2, 2024

Hey, Renato

I'm not sure I understand this one-- not all links have related pages--
some are just single links and they don't have children.

Is the issue that we can't have both options-- we need to treat all pages
as having the possibility of page groupings?

Can we support both options-- where you can just link to a page, and show
only the table of contents, or you link to a page and show the related
pages and table of contents?

We could use a meta tag of some sort, if this helps...

Meggin

On Fri, Dec 6, 2013 at 9:20 AM, Renato Mangini [email protected]:

An empty TOC top level (no children) doesn't allow clicking on it to jump
to a top level header. Currently, there are many one-level-depth docs.

Removing the "toplevel" class from empty headers works, but the difference
in style between same level headers with (bold) and without children (soft
gray) looks weird.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27
.

from developer.chrome.com.

ebidel avatar ebidel commented on July 2, 2024

This is a tough one and I need help with the right answer.

Renato is talking about the in page TOC for an article, not the related
pages section. In order to make the TOC top level heading expandable (to
see the subheadings) I needed to disable clicks on the top level headings.
That means there is no way to navigate to those top level headings, only to
the subheadings which are clickable. This is a problem for pages that only
have h2 headings. It means clicking on these links doesn't do anything
(because they Don't have subitems).

I think an easy fix is to detect if the top level headings Dont have
children and allow clicks. If they do have subheadings, the behavior
remains the same as it currently Is. Good?
On Dec 6, 2013 9:26 AM, "Meggin Kearney" [email protected] wrote:

Hey, Renato

I'm not sure I understand this one-- not all links have related pages--
some are just single links and they don't have children.

Is the issue that we can't have both options-- we need to treat all pages
as having the possibility of page groupings?

Can we support both options-- where you can just link to a page, and show
only the table of contents, or you link to a page and show the related
pages and table of contents?

We could use a meta tag of some sort, if this helps...

Meggin

On Fri, Dec 6, 2013 at 9:20 AM, Renato Mangini [email protected]:

An empty TOC top level (no children) doesn't allow clicking on it to
jump
to a top level header. Currently, there are many one-level-depth docs.

Removing the "toplevel" class from empty headers works, but the
difference
in style between same level headers with (bold) and without children
(soft
gray) looks weird.


Reply to this email directly or view it on GitHub<
https://github.com/GoogleChrome/developer.chrome.com/issues/27>
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-30012333
.

from developer.chrome.com.

Meggin avatar Meggin commented on July 2, 2024

Ah, I get it now. I see the problem.

The solution sounds good as it's automatic. I'm just 100% how this gets
implemented, particularly for the TOC that is generated for the reference.

Are you putting this logic in the css and applying it post the TOC
rendering logic? That's the safest bet, if it's doable.

Meggin

On Fri, Dec 6, 2013 at 9:32 AM, Eric Bidelman [email protected]:

This is a tough one and I need help with the right answer.

Renato is talking about the in page TOC for an article, not the related
pages section. In order to make the TOC top level heading expandable (to
see the subheadings) I needed to disable clicks on the top level headings.
That means there is no way to navigate to those top level headings, only
to
the subheadings which are clickable. This is a problem for pages that only
have h2 headings. It means clicking on these links doesn't do anything
(because they Don't have subitems).

I think an easy fix is to detect if the top level headings Dont have
children and allow clicks. If they do have subheadings, the behavior
remains the same as it currently Is. Good?
On Dec 6, 2013 9:26 AM, "Meggin Kearney" [email protected]
wrote:

Hey, Renato

I'm not sure I understand this one-- not all links have related pages--
some are just single links and they don't have children.

Is the issue that we can't have both options-- we need to treat all
pages
as having the possibility of page groupings?

Can we support both options-- where you can just link to a page, and
show
only the table of contents, or you link to a page and show the related
pages and table of contents?

We could use a meta tag of some sort, if this helps...

Meggin

On Fri, Dec 6, 2013 at 9:20 AM, Renato Mangini [email protected]:

An empty TOC top level (no children) doesn't allow clicking on it to
jump
to a top level header. Currently, there are many one-level-depth docs.

Removing the "toplevel" class from empty headers works, but the
difference
in style between same level headers with (bold) and without children
(soft
gray) looks weird.


Reply to this email directly or view it on GitHub<
https://github.com/GoogleChrome/developer.chrome.com/issues/27>
.


Reply to this email directly or view it on GitHub<
https://github.com/GoogleChrome/developer.chrome.com/issues/27#issuecomment-30012333>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-30012832
.

from developer.chrome.com.

ebidel avatar ebidel commented on July 2, 2024

It's in JavaScript. If heading has children, we'll treat it as a normal
link and allow the click. Otherwise, it'll open the expander.
On Dec 6, 2013 9:41 AM, "Meggin Kearney" [email protected] wrote:

Ah, I get it now. I see the problem.

The solution sounds good as it's automatic. I'm just 100% how this gets
implemented, particularly for the TOC that is generated for the reference.

Are you putting this logic in the css and applying it post the TOC
rendering logic? That's the safest bet, if it's doable.

Meggin

On Fri, Dec 6, 2013 at 9:32 AM, Eric Bidelman [email protected]:

This is a tough one and I need help with the right answer.

Renato is talking about the in page TOC for an article, not the related
pages section. In order to make the TOC top level heading expandable (to
see the subheadings) I needed to disable clicks on the top level
headings.
That means there is no way to navigate to those top level headings, only
to
the subheadings which are clickable. This is a problem for pages that
only
have h2 headings. It means clicking on these links doesn't do anything
(because they Don't have subitems).

I think an easy fix is to detect if the top level headings Dont have
children and allow clicks. If they do have subheadings, the behavior
remains the same as it currently Is. Good?
On Dec 6, 2013 9:26 AM, "Meggin Kearney" [email protected]
wrote:

Hey, Renato

I'm not sure I understand this one-- not all links have related
pages--
some are just single links and they don't have children.

Is the issue that we can't have both options-- we need to treat all
pages
as having the possibility of page groupings?

Can we support both options-- where you can just link to a page, and
show
only the table of contents, or you link to a page and show the related
pages and table of contents?

We could use a meta tag of some sort, if this helps...

Meggin

On Fri, Dec 6, 2013 at 9:20 AM, Renato Mangini <
[email protected]>wrote:

An empty TOC top level (no children) doesn't allow clicking on it to
jump
to a top level header. Currently, there are many one-level-depth
docs.

Removing the "toplevel" class from empty headers works, but the
difference
in style between same level headers with (bold) and without children
(soft
gray) looks weird.


Reply to this email directly or view it on GitHub<
https://github.com/GoogleChrome/developer.chrome.com/issues/27>
.


Reply to this email directly or view it on GitHub<

https://github.com/GoogleChrome/developer.chrome.com/issues/27#issuecomment-30012333>

.


Reply to this email directly or view it on GitHub<
https://github.com/GoogleChrome/developer.chrome.com/issues/27#issuecomment-30012832>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-30013513
.

from developer.chrome.com.

mangini avatar mangini commented on July 2, 2024

sgtm.

from developer.chrome.com.

Meggin avatar Meggin commented on July 2, 2024

Right, the static js which called from site.html after toc is rendered... I
think.

Just good to be aware of the different toc behaviors when trying to get
them to behave in a certain way.

Meggin

On Fri, Dec 6, 2013 at 10:39 AM, Renato Mangini [email protected]:

sgtm.


Reply to this email directly or view it on GitHubhttps://github.com//issues/27#issuecomment-30017861
.

from developer.chrome.com.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.