Skip to content

Align benchmarks page with site layout#275

Merged
NLipatov merged 3 commits into
mainfrom
fix/benchmarks-table-layout
Mar 20, 2026
Merged

Align benchmarks page with site layout#275
NLipatov merged 3 commits into
mainfrom
fix/benchmarks-table-layout

Conversation

@NLipatov

@NLipatov NLipatov commented Mar 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • align the benchmarks page with the site container rhythm used on the landing page
  • unify card spacing, section typography, and mobile density with existing screen patterns
  • simplify benchmark tables so they use the standard theme table behavior with only minimal page-specific overrides

Verification

  • npm run build (passes; existing Docusaurus warnings remain about deprecated onBrokenMarkdownLinks and localized QuickStart broken anchors)

Summary by CodeRabbit

  • Refactor

    • Simplified table component structure and removed redundant table props for cleaner markup and easier maintenance.
  • Style

    • Enhanced responsive design and spacing for mobile/tablet; refined typography, metrics, and chart presentation for clearer hierarchy.
    • Updated table visuals and wrapping behavior to improve readability and horizontal scrolling.
  • Accessibility

    • Improved keyboard/focus behavior and ARIA labeling for better screen reader and keyboard navigation.

@coderabbitai

coderabbitai Bot commented Mar 20, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Refactors the benchmarks page: DataTable component API simplified (removed colgroup and align), markup updated to wrap sections with Docusaurus container via clsx, and a large CSS rewrite introduces custom properties, responsive breakpoints, and revised layouts for hero, metrics, tables, and charts.

Changes

Cohort / File(s) Summary
Benchmarks Page Component
docs/TunGo/src/pages/benchmarks.js
Removed colgroup and align props from DataTable usage and signature; simplified table rendering to a11y-friendly wrapper (role="region", aria-label, tabIndex=0); switched section containers to clsx('container', Styles.<...>).
Benchmarks Styling
docs/TunGo/src/pages/benchmarks.module.css
Large CSS overhaul: added --bench-* custom properties, responsive clamp() sizing, new breakpoints (1100px, 996px, 640px); reworked hero/metrics/cards/sections; simplified table wrapping and table styles (removed old wrappers and border-heavy rules); adjusted chart and legend styles.

Sequence Diagram(s)

(omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Poem

🐰 I nibbled CSS at break of day,
Trimmed table props and tucked rows away,
Containers snug with clsx’s care,
Clamp and vars dance light as air,
Metrics hum — the page hops gay! 🎋

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main objective of the changeset—aligning the benchmarks page with the site's layout system—which is confirmed by the PR description and the substantive CSS/component refactoring throughout both modified files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/benchmarks-table-layout
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Tip

You can validate your CodeRabbit configuration file in your editor.

If your editor has YAML language server, you can enable auto-completion and validation by adding # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json at the top of your CodeRabbit configuration file.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/TunGo/src/pages/benchmarks.js (1)

184-208: ⚠️ Potential issue | 🟠 Major

Make the horizontal scroll region keyboard reachable.

The new wrapper at Line 186 is now the only way to reach overflowing columns on narrow viewports, but a plain <div> cannot receive focus. Keyboard-only users won't be able to scroll these tables horizontally unless the region is focusable.

Suggested patch
 function DataTable({header, rows, ariaLabel, className}) {
   return (
-    <div className={Styles.tableWrap}>
+    <div
+      className={Styles.tableWrap}
+      role="region"
+      aria-label={ariaLabel}
+      tabIndex={0}
+    >
       <table className={`${Styles.dataTable}${className ? ` ${className}` : ''}`} aria-label={ariaLabel}>
         <thead>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/TunGo/src/pages/benchmarks.js` around lines 184 - 208, The table's
horizontal scroll wrapper (Styles.tableWrap) is not keyboard-focusable,
preventing keyboard-only users from reaching overflowing columns; update the
DataTable component so the wrapper div is focusable (add tabIndex={0}) and
include an accessible label (role="region" with aria-label or aria-labelledby)
so keyboard users can focus and scroll the container; ensure the focusable
wrapper is applied where Styles.tableWrap is used inside the DataTable function.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/TunGo/src/pages/benchmarks.module.css`:
- Around line 33-39: The .title rule (and other occurrences using a ch-based cap
like "max-width: 13ch") constrains translated headings to an English character
width and causes wrapping for longer locales; remove the ch-based max-width and
replace it with a locale-agnostic, responsive cap such as max-width: min(45rem,
100%) or simply max-inline-size: 100% so headings can expand naturally within
their container—update the .title rule and the other rules that use "max-width:
13ch" (the occurrences flagged around the other blocks) to use this responsive
alternative or remove the constraint entirely.
- Around line 2-12: Add a blank line separating the custom-property declarations
block from the normal declarations in the .page rule so the custom properties
(e.g., --bench-stack-gap, --bench-card-padding, --ifm-table-border-color, etc.)
are grouped and followed by an empty line before the first non-custom
declaration (background) to satisfy the stylelint declaration-empty-line-before
rule.

---

Outside diff comments:
In `@docs/TunGo/src/pages/benchmarks.js`:
- Around line 184-208: The table's horizontal scroll wrapper (Styles.tableWrap)
is not keyboard-focusable, preventing keyboard-only users from reaching
overflowing columns; update the DataTable component so the wrapper div is
focusable (add tabIndex={0}) and include an accessible label (role="region" with
aria-label or aria-labelledby) so keyboard users can focus and scroll the
container; ensure the focusable wrapper is applied where Styles.tableWrap is
used inside the DataTable function.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 61f9f681-a120-4071-9c08-3eac6ec9ab01

📥 Commits

Reviewing files that changed from the base of the PR and between a8ab54c and 152cb69.

📒 Files selected for processing (2)
  • docs/TunGo/src/pages/benchmarks.js
  • docs/TunGo/src/pages/benchmarks.module.css

Comment thread docs/TunGo/src/pages/benchmarks.module.css
Comment thread docs/TunGo/src/pages/benchmarks.module.css

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
docs/TunGo/src/pages/benchmarks.module.css (2)

397-404: Minor: Table header font-size override appears redundant.

Lines 398-400 set both th and td to 0.82rem, but lines 402-404 immediately override th to 0.83rem. The 0.01rem difference (≈0.16px) is visually imperceptible. Consider consolidating these rules or removing the separate th override if the intent is to have uniform sizing.

♻️ Suggested simplification
   .dataTable th,
   .dataTable td {
-    font-size: 0.82rem;
+    font-size: 0.83rem;
   }
-
-  .dataTable th {
-    font-size: 0.83rem;
-  }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/TunGo/src/pages/benchmarks.module.css` around lines 397 - 404, The CSS
contains a redundant override: .dataTable th, .dataTable td { font-size:
0.82rem; } followed immediately by .dataTable th { font-size: 0.83rem; }; remove
the unnecessary rule or consolidate them so header and cell sizes are defined
once—either delete the .dataTable th override and keep a single .dataTable th,
.dataTable td rule (for uniform sizing) or merge into distinct, intentionally
different sizes if you truly want headers larger; update the .dataTable th and
.dataTable td selectors accordingly.

431-433: Optional: Redundant rule.

Line 432 sets .legendEntry { min-height: 0; } which is already declared in the base rule at line 314. Unless there's a specificity conflict (which doesn't appear to be the case here), this override can be removed.

♻️ Suggested cleanup
 `@media` screen and (max-width: 640px) {
   /* ... */

-  .legendEntry {
-    min-height: 0;
-  }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/TunGo/src/pages/benchmarks.module.css` around lines 431 - 433, Remove
the redundant CSS declaration for .legendEntry { min-height: 0; } that
duplicates the base rule; locate the duplicate .legendEntry rule and delete the
min-height property (or the entire redundant block) so the stylesheet relies on
the existing base rule for min-height, verifying there is no intended
specificity override before removal.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/TunGo/src/pages/benchmarks.module.css`:
- Around line 397-404: The CSS contains a redundant override: .dataTable th,
.dataTable td { font-size: 0.82rem; } followed immediately by .dataTable th {
font-size: 0.83rem; }; remove the unnecessary rule or consolidate them so header
and cell sizes are defined once—either delete the .dataTable th override and
keep a single .dataTable th, .dataTable td rule (for uniform sizing) or merge
into distinct, intentionally different sizes if you truly want headers larger;
update the .dataTable th and .dataTable td selectors accordingly.
- Around line 431-433: Remove the redundant CSS declaration for .legendEntry {
min-height: 0; } that duplicates the base rule; locate the duplicate
.legendEntry rule and delete the min-height property (or the entire redundant
block) so the stylesheet relies on the existing base rule for min-height,
verifying there is no intended specificity override before removal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: aebcb180-989d-42c2-b367-84ebe64da19c

📥 Commits

Reviewing files that changed from the base of the PR and between 152cb69 and c3f85d3.

📒 Files selected for processing (2)
  • docs/TunGo/src/pages/benchmarks.js
  • docs/TunGo/src/pages/benchmarks.module.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/TunGo/src/pages/benchmarks.js

@NLipatov NLipatov merged commit 8583956 into main Mar 20, 2026
2 checks passed
@NLipatov NLipatov deleted the fix/benchmarks-table-layout branch March 27, 2026 14:36
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.

1 participant