-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat: add 2 more nesting levels for toc #1931
Conversation
This should be configurable in the admin. Not everyone want to see H3 items in the TOC (myself included). |
Sure will add it soon |
Added level control - can be between 1-4: |
@NGPixel did you have a chance to look at this PR? |
@NGPixel can you CR this for the next version? |
Looking forward to this feature. 👍 |
@NGPixel this PR is ready for review as far as I understand |
I pulled this into a localhost build. Just a couple of UX comments. TyposFirst, there are some minor text issues in the configuration menu:
DocumentationThe text could be more clearly written like so (or something like this):
UII would change the input box to either a horizontal radial menu or a dropdown menu. As you said in a previous comment, there is a constraint ("can be between 1-4"), so there is no sense in allowing the user to manually enter a value because the possible options are fixed. I also think Horizontal Radio GroupHere's a horizontal radio group: v-radio-group(
row
outlined
prepend-icon='mdi-serial-port'
v-model='config.tocLevel'
label='Max Heading Level'
persistent-hint
hint='The table of contents will show headings up to the selected level. By default, only heading levels up to H2 are shown.'
)
v-radio(
label='H1'
v-bind:value='1'
)
v-radio(
label='H2'
v-bind:value='2'
)
v-radio(
label='H3'
v-bind:value='3'
)
v-radio(
label='H4'
v-bind:value='4'
) With a SupportFinally, to avoid future requests related to supporting more headings, I think you might as well add support for |
Thanks @fireundubh will fix it soon |
Thanks @fireundubh for the suggestions. Frontend is not my strong suite so I expected some comments on that side :-) I want to add a page control level for the toc level as well and will finish it soon |
I also added toc level control per page: @NGPixel can you please CR it. I'm not sure about the migration scripts versioning so please let me know what should I do about it. |
e0404ba
to
90b5e2e
Compare
I also added the page toc level to the metadata when storing it. |
I will try to also add to this PR the ability to collapse the toc and make it configurable from what level of toc will it happen. |
a549af8
to
0ac10ec
Compare
Just worked a few hours to improve the feature. To sum up the feature:
@NGPixel and @fireundubh I would love to get any comments on the UI/UX as it is not my strong suite. |
Change target branch to |
Whats the status on this PR? Id really love to use this feature. H1 and H2 only for TOC just doesnt cut it for longer pages. Ah i see, planned for 3.0 #2189 |
Is it possible to mannually add this now by ourselves manually? |
Is there any chance of this feature getting implemented? It looks like it got pretty far in the design. |
fix: #1216
feature request: https://requarks.canny.io/wiki/p/allow-to-select-toc-depth-level (20 votes)
Added 2 more levels of table of contents.
If you think that by default it is too much, please let me know I will add a configuration for it