Skip to content

Commit 5be939a

Browse files
esethnanickmisasicwarnermm
authored
Integrations guide update (#8383)
* Update jira.rst * Update popular-integrations.rst * Update integrations-guide-index.rst * Update integrations-guide-index.rst * prebuilt integrations image * rewrite integrations-guide-index.rst * fix typos * fix typo * Update source/integrations-guide/integrations-guide-index.rst Co-authored-by: Nick Misasi <[email protected]> * Update source/integrations-guide/integrations-guide-index.rst Co-authored-by: Nick Misasi <[email protected]> * Update source/integrations-guide/integrations-guide-index.rst Co-authored-by: Nick Misasi <[email protected]> * Update source/integrations-guide/integrations-guide-index.rst Co-authored-by: Nick Misasi <[email protected]> * Update integrations-guide-index.rst * Update integrations-guide-index.rst * Update integrations-guide-index.rst * Update source/integrations-guide/integrations-guide-index.rst Co-authored-by: Carrie Warner (Mattermost) <[email protected]> * Update integrations-guide-index.rst * Update integrations-guide-index.rst * Update integrations-guide-index.rst * Corrected build errors * Adjusted tabbed content right pane logic --------- Co-authored-by: Nick Misasi <[email protected]> Co-authored-by: Carrie Warner (Mattermost) <[email protected]>
1 parent d717720 commit 5be939a

File tree

6 files changed

+333
-138
lines changed

6 files changed

+333
-138
lines changed

extensions/sphinx_inline_tabs/events.py

Lines changed: 1 addition & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -87,51 +87,7 @@ def doctree_read(app: Sphinx, doctree: nodes.document):
8787
if len(app.env.tocs[app.env.docname][0]) == 1:
8888
app.env.tocs[app.env.docname][0].append(updated_tocs)
8989
else:
90-
# SAFE FIX: Check if the original structure has toctree nodes
91-
# If it does, leave it completely unchanged to preserve left navigation
92-
original_toc_item = app.env.tocs[app.env.docname][0][1]
93-
has_toctree = False
94-
95-
if hasattr(original_toc_item, 'children') and original_toc_item.children:
96-
for child in original_toc_item.children:
97-
if isinstance(child, addnodes.toctree):
98-
has_toctree = True
99-
break
100-
101-
if has_toctree:
102-
# Merge tab headings into the existing right-pane TOC while preserving
103-
# the original toctree (left navigation) structure.
104-
try:
105-
# Find the bullet list in the original toc item (holds section entries)
106-
original_bullets = None
107-
for child in getattr(original_toc_item, "children", []) or []:
108-
if isinstance(child, nodes.bullet_list):
109-
original_bullets = child
110-
break
111-
112-
# Find the bullet list produced by our updated tab-aware TOC
113-
updated_bullets = None
114-
for child in getattr(updated_tocs, "children", []) or []:
115-
if isinstance(child, nodes.bullet_list):
116-
updated_bullets = child
117-
break
118-
119-
# If we have tab headings to merge
120-
if updated_bullets is not None:
121-
if original_bullets is None:
122-
# No existing bullets: attach updated list directly
123-
original_toc_item.append(updated_bullets)
124-
else:
125-
# Append each new tab heading item to existing bullets
126-
for li in list(updated_bullets.children):
127-
original_bullets.append(li)
128-
except Exception as e:
129-
logger.warning(
130-
f"{LOG_PREFIX} doctree_read({app.env.docname}): failed merging tab headings into TOC: {e}"
131-
)
132-
else:
133-
# Only apply tab modifications if no toctree nodes are present
134-
app.env.tocs[app.env.docname][0][1] = updated_tocs
90+
app.env.tocs[app.env.docname][0][1] = updated_tocs
13591

13692

13793
def html_page_context(
123 KB
Loading

0 commit comments

Comments
 (0)