Skip to content

Commit 371595e

Browse files
committed
cherrypick: Add TOC expand-collapse icons (#664)
1 parent f0cd660 commit 371595e

File tree

22 files changed

+364
-200
lines changed

22 files changed

+364
-200
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ dist
2121
eggs
2222
node_modules*
2323
yarn-error.log
24+
_*

docs/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ The legacy feature gallery exclusively uses reStructuredText.
5757
.. toctree::
5858
:maxdepth: 1
5959

60+
headings
6061
admonitions
6162
codesnippets
62-
diagrams
63-
glossary
64-
headings
65-
images
6663
lists
67-
projects
68-
subpage
6964
tables
65+
images
66+
diagrams
7067
typography
68+
subpage
69+
projects
70+
tests/index
7171

7272

7373

File renamed without changes.

docs/tests/index.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.. _tests:
2+
3+
#########################
4+
Navigation bar test pages
5+
#########################
6+
7+
1. Clicking the title should expand the section and navigate to the section page
8+
2. Clicking just the icon should expand but not navigate to the section
9+
3. Clicking just the icon for an expanded section should collapse that section and leave other expanded sections expanded
10+
4. Hovering the mouse over an icon should show a fade background behind the icon
11+
5. Hovering the mouse over the title should show a fade background behind the title and the icon
12+
6. The current page should be highlighted in the navigation bar as the user navigates through the pages below.
13+
14+
15+
**Pages:**
16+
17+
.. toctree::
18+
:titlesonly:
19+
:glob:
20+
21+
section1/index
22+
section2/index
23+
*

docs/tests/section1/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#########
2+
Section 1
3+
#########
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
subpage1
9+
subpage2

docs/tests/section1/subpage1.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
##########
2+
Subpage 1
3+
##########
4+
5+
Test subpage 1.

docs/tests/section1/subpage2.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
##########
2+
Subpage 2
3+
##########
4+
5+
Test subpage 2.

docs/tests/section2/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
############
2+
Section 2
3+
############
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
section21/index
9+
subpage1
10+
subpage2
11+
12+
Hi
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
############
2+
Section 2.1
3+
############
4+
5+
.. toctree::
6+
:maxdepth: 1
7+
8+
subpage1
9+
subpage2
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
##########
2+
Subpage 1
3+
##########
4+
5+
Test subpage 1.

0 commit comments

Comments
 (0)