Thank you and sorry for missing thatā¦
Works like a charm! Really appreciate your time and help!
Everything is working, but:
- On mobile I donāt see the button āTable of Contentsā as shown in the instructions:
- The only way to see it is to add at least a comment/reply (I would expect it to show even if no replies were added?), but even then, what is shown is not the same as what is in the image:
Is it possible to make it show āTable of Contentsā, not just the icon? Iām thinking that maybe itās possible via CSS, but I was wondering if this is a new āfeatureā or something else I can change to show the text?
I even tried to change the default text, in case that was the issue, but no luck:
EDIT: I was able to add the text via CSS in a custom component, but still wondering if this is a bug or something?
@media screen and (max-width: 767px) {
.d-toc-mini button::after {
content: "Table of Contents";
margin-left: 5px;
font-size: 14px;
vertical-align: middle;
}
}
And I still havenāt figure out the issue of it only being visible at the bottom (instead of "sticky) when thereās no replies.
The screenshots in the first post are quite old. You wonāt find any information about the button which allows you to toggle between timeline and toc when there is more than one post, or information about the toc for replies feature, in them.
The problem with the missing button on mobile was reported here:
Maybe you also want to support this feature request: Fully expand table of content, if youād prefer official support instead of custom CSS.
I was able to make it work when it doesnāt have a reply:
I just added my feedback on that topic. Thanks.
I noticed that something is broken.
On mobile, the TOC panel doesnāt slide overlaying the topic. It gets added at the bottom:
I thought it could be an issue with any of the other components, but I disabled them all and just left this one on.
EDIT: I noticed that this issue is only visible is the topic has no replies. I added a testing reply, and now itās working. Even a simple Unlist > List, will work:
Bug�
I installed the DiscoTOC 2.1.0 theme component, but the option to generate a TOC isnāt showing up under the ā+ā in the composer dialog. Iām on Discourse 3.6.0.beta1-dev. In the ā+ā menu I see Quote whole post, Insert table, Hide details, Insert date/time, Add footnote, Build poll, and Blur spoiler.
Are there any other āwonāt work withā scenarios? This site has the āCustom Header Linksā theme component and a several plugins.
So far I tried it on a wiki topic post and a non-wiki topic post.
Test document:
# Top heading
## Second level heading
## Another second level heading
### Whoa, a third level heading
## Yet another second level heading
I guess you added the component to your theme and you have already tried to refresh the site in the browser after that (Just mentioning that because I sometimes forget).
Did you try the preview button of the theme? That can be helpful to check for a conflict with another component (Though I think itās unlikely)
You can also try to add the text that the button in the composer menu adds to the post manually
<div data-theme-toc="true"> </div>
Does that work?
Thank you so much for taking so much time in your response! I apologize, but the problem is with me and Apple. I am using Safari on a new Mac, and the ā+ā menu when it opens does contain the TOC option, but it is not visible in the list, and the menu does not flash the scrollbars at all that I can see (and they do not appear unless you scroll). The vertical alignment of the content just happened to be perfect, as if it contained N-1 items instead of N. Grrrr. I finally noticed when I tried this in Chrome, and by chance the N-1st item was cut in half, so I scrolled ā¦.
Iām glad you found it.
I actually had similar problems once: Last item of reply composer gear menu inaccessible I havenāt tried it in a long time to see if itās better now.