Skip to content

Sunbrye/fix azure managed identity tabs#1801

Merged
scottaddie merged 5 commits into
mainfrom
sunbrye/fix-azure-managed-identity-tabs
Jun 26, 2026
Merged

Sunbrye/fix azure managed identity tabs#1801
scottaddie merged 5 commits into
mainfrom
sunbrye/fix-azure-managed-identity-tabs

Conversation

@sunbrye

@sunbrye sunbrye commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Why

The current <details> block structure in azure-managed-identity.md puts headings, prose, and multiple code blocks inside each tab. When the docs-internal normalization pipeline converts these to {% codetabs %}, this structure breaks headings don't render in the TOC, anchor links break, and the tabs contain unequal amounts of content.

This also adds documentation to the style guide so future authors know the correct format.

What's changed

1. Restructured docs/setup/azure-managed-identity.md

  • Moved shared prose ("Install the packages", "Get a token using DefaultAzureCredential") outside the <details> blocks
  • Each <details> block now contains only a code fence no headings, no paragraphs
  • Two groups of consecutive tabs: one for prerequisites (install commands), one for basic usage (full examples)
  • Pulled the Python-only "Token refresh" section out as a standalone section (single-language content doesn't need tabs)

2. Added guidance to .github/instructions/docs-style.instructions.md

New "Multi-language code examples" section documenting:

  • Only code inside <details> blocks
  • Blocks must be consecutive (no content between them)
  • Exact <summary> format required
  • Need 2+ blocks per group
  • Correct and incorrect examples

Preview

Before

image

After

image

cc @scottaddie

sunbrye and others added 2 commits June 25, 2026 13:10
Move shared prose (prerequisites heading, usage description) outside
details blocks. Each details block now contains only code, which
allows the docs-internal normalization pipeline to convert them into
codetabs correctly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Document the correct format for <details> blocks so they convert
cleanly to codetabs in the docs-internal normalization pipeline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sunbrye sunbrye marked this pull request as ready for review June 25, 2026 20:39
@sunbrye sunbrye requested a review from a team as a code owner June 25, 2026 20:39
Copilot AI review requested due to automatic review settings June 25, 2026 20:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Copilot SDK documentation to ensure multi-language examples render correctly after the docs-internal normalization pipeline converts consecutive <details> blocks into tabbed code switchers, and it documents the required authoring pattern in the docs style guide.

Changes:

  • Restructures docs/setup/azure-managed-identity.md so each <details> tab contains only a single code fence and shared prose/headings live outside the tabs.
  • Splits examples into two consecutive-tab groups (prerequisites and basic usage) and pulls the Python-only token refresh guidance out of tabs.
  • Adds a “Multi-language code examples” section to the docs style guide describing the required <details> structure and giving correct/incorrect patterns.
Show a summary per file
File Description
docs/setup/azure-managed-identity.md Refactors multi-language samples into consecutive <details> groups so they normalize into stable code tabs and preserve TOC/anchors.
.github/instructions/docs-style.instructions.md Documents the required <details>-tabs authoring rules for multi-language examples to prevent future normalization breakage.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 4

Comment thread docs/setup/azure-managed-identity.md Outdated
Comment thread docs/setup/azure-managed-identity.md
Comment on lines +180 to +203
```markdown
Install the SDK:

<details open>
<summary><strong>.NET</strong></summary>

<!-- docs-validate: skip -->

```bash
dotnet add package GitHub.Copilot.SDK
```

</details>
<details>
<summary><strong>Python</strong></summary>

<!-- docs-validate: skip -->

```bash
pip install github-copilot-sdk
```

</details>
```
Comment on lines +209 to +226
```markdown
<details>
<summary><strong>Python</strong></summary>

### Prerequisites ← breaks TOC/anchors
Install the packages: ← prose belongs outside

```bash
pip install github-copilot-sdk
```

### Basic usage ← multiple sections in one tab
```python
[code]
```

</details>
```
@sunbrye sunbrye requested a review from scottaddie June 25, 2026 20:45
Co-authored-by: scottaddie <10702007+scottaddie@users.noreply.github.com>
Copilot AI requested a review from scottaddie June 25, 2026 21:56
Shared prose goes above the group, then each `<details>` block contains only code:

```markdown
~~~markdown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Switch back to code fences for the markdown blocks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 81e8bf1. Used 4-backtick outer fences (````markdown) so the inner 3-backtick fences render correctly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot That's wrong. Use 3 instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in d3d38e5.

Co-authored-by: scottaddie <10702007+scottaddie@users.noreply.github.com>
Co-authored-by: scottaddie <10702007+scottaddie@users.noreply.github.com>
@scottaddie scottaddie added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit c638a5e Jun 26, 2026
16 checks passed
@scottaddie scottaddie deleted the sunbrye/fix-azure-managed-identity-tabs branch June 26, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants