Skip to content

fix: stop docs table-cell code breaking mid-token#414

Merged
pratyush618 merged 1 commit into
masterfrom
fix/docs-param-table-code-wrap
Jul 12, 2026
Merged

fix: stop docs table-cell code breaking mid-token#414
pratyush618 merged 1 commit into
masterfrom
fix/docs-param-table-code-wrap

Conversation

@pratyush618

@pratyush618 pratyush618 commented Jul 12, 2026

Copy link
Copy Markdown
Collaborator

Problem

In parameter tables, a narrow Type column (squeezed by a long Description) rendered inline code like str | None broken character-by-character — e.g. st / r | / Non / e stacked vertically.

Cause

The article-wide overflow-wrap: anywhere rule (added for long identifiers on phones) applies to inline code inside table cells too, so a squeezed column breaks short type tokens at every character.

Fix

Scope table-cell inline code to white-space: nowrap; overflow-wrap: normal, so types/defaults/identifiers stay on one line. Genuinely wide tokens fall back to the table wrapper's existing overflow-x: auto horizontal scroll instead of mangling.

Verification

Headless render of the affected table, 760px container: the Type cell height drops from 52px (3 wrapped lines) to 16px (one line). Docs typecheck + lint clean.

Summary by CodeRabbit

  • Style
    • Improved inline code formatting in documentation tables.
    • Long code identifiers now remain on a single line without breaking unexpectedly.

The article-wide `overflow-wrap: anywhere` broke inline code like `str | None`
character-by-character when a param table's type column was squeezed by a long
description. Keep cell code on one line; wide tokens use the wrapper's scroll.
@github-actions github-actions Bot added the docs label Jul 12, 2026
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 54c80149-ac69-4c27-8bbe-9d84db478b22

📥 Commits

Reviewing files that changed from the base of the PR and between 680124a and 5f86912.

📒 Files selected for processing (1)
  • docs/app/styles/docs.css

📝 Walkthrough

Walkthrough

The documentation stylesheet adds a markdown-table-specific rule that keeps inline code on one line and disables arbitrary word breaking within table cells.

Changes

Table Code Wrapping

Layer / File(s) Summary
Markdown table code styling
docs/app/styles/docs.css
Adds .md-table td code declarations for white-space: nowrap and overflow-wrap: normal.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main docs CSS change: preventing inline code in table cells from breaking mid-token.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/docs-param-table-code-wrap

Comment @coderabbitai help to get the list of available commands.

@pratyush618
pratyush618 merged commit e16725e into master Jul 12, 2026
15 checks passed
@pratyush618
pratyush618 deleted the fix/docs-param-table-code-wrap branch July 12, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant