Repository navigation
fix(simple-data-table): SLDS 2 isHeadless and rounded table corners - #3365
Merged
interactivellama merged 2 commits intoNov 24, 2026
Merged
Conversation
…adless SLDS 2 does not ship slds-table_header-hidden. In SLDS 1 the class only removed the table's top border; the thead is hidden by slds-assistive-text, which keeps the header in the accessibility tree and still works in SLDS 2. SLDS 2 draws a bordered table as a rounded box, so the top border is kept: removing it would leave the rounded top corners open. Add a browser regression test against the SLDS 2 stylesheet.
…corners SLDS 2 rounds slds-table_bordered (8px in Cosmos, 0 in Lightning Blue), but the header cells and selected or hovered body cells paint square backgrounds that poke out past the corners. Clipping the table would also clip the row action menus, so the four corner cells take border-*-radius: inherit, and the thead, tbody and corner rows pass the radius down. With a hidden header the first body row takes the top corners. The radius follows the theme, so Lightning Blue stays square. Add browser regression tests against the SLDS 2 stylesheet.
interactivellama
changed the base branch from
chore/release-11.0.0-rc.2
to
chore/slds-linter
November 23, 2026 23:51
interactivellama
force-pushed
the
fix/slds2-sdt-rounded-corners
branch
from
November 23, 2026 23:51
957246d to
1b67eaf
Compare
Niznikr
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #
Additional description
Two SLDS 2 fixes for SimpleDataTable's bordered table.
1.
isHeadlessstops addingslds-table_header-hidden(b614166)SLDS 2 doesn't ship
slds-table_header-hidden. In SLDS 1 the class only removed the table's top border. The thead is hidden byslds-assistive-text, which still works in SLDS 2 and keeps the column headers in the accessibility tree. The top border stays, because SLDS 2 draws a bordered table as a rounded box and removing it would leave the top corners open.2. Cell backgrounds fit the rounded table corners (957246d)
Root cause: SLDS 2 (2.264.1) rounds
.slds-table_borderedwith--_slds-c-datatable-radius-border(8px in Cosmos, 0 in Lightning Blue) but doesn't round or clip its cells. Header cells and selected or hovered body cells paint square backgrounds that stick out past the rounded border.Fix: the four corner cells get
border-*-radius: inherit, using logical properties so RTL works. The thead, tbody and corner rows pass the radius down to them. With a hidden header, the first body row takes the top corners. With no body rows, the header row takes all four. SLDS 2 has no class or hook for corner cells, and this repo has no DSR stylesheet, so the styles are inline.overflow: hidden, because that would also clip the row-action menus.inheritfollows whatever radius the table ends up with.slds-table_header-fixedsets it to 0, so fixed-header cells stay square, and Lightning Blue stays square too.Regression tests: browser tests against the SLDS 2 stylesheet cover both changes. Story snapshots are updated.
Checked in Storybook with Cosmos unless noted:
advanced-single-select-fixed-layout: select the last row. The bottom-left selection cell and the bottom-right row-action cell follow the 8px corner. Without the fix, the square blue background sticks out.basic-fluid-layout-default: the header corners are rounded.basic-fluid-layout-headless: the first body row takes the top corners.fixed-header-story: unchanged.Not checked: the stacked (
slds-max-medium-table_stacked) layout on narrow screens.CONTRIBUTOR checklist (do not remove)
Please complete for every pull request.
Green gate — all of these must pass locally (CI runs the same):
npm run lintpasses with 0 errors and 0 warnings (npm run lint:fixto auto-fix).npm run typecheckis clean (tsc --noEmit).npm test -- --runpasses — this runs both Vitest projects (jsdomunit+ real-browserbrowser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots withnpm test -- --run -uand review the diff.npm run buildsucceeds (type-check + Vite library build +.d.ts+ entry shims).Behavior & docs:
components/button/__tests__). New props and bug fixes should get a regression test. Tests that genuinely need a real browser (focus traversal, layout/measurement, canvas) go in a*.browser.test.jsxfile (thebrowserproject); everything else is jsdom.npm run storybook→ http://localhost:6007/. Confirm the story actually renders and behaves (deprecated Storyshots/Karma are gone; there is no separate browser-tests server).content/visualPickerFigure, render props likerenderItem,iconprops,events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check againstcomponents/<name>/__examples__..d.ts(they're generated by the build); JS consumers rely on them via editor type-acquisition.REVIEWER checklist (do not remove)
CIworkflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).@salesforce/design-system-react/components/<name>and nested paths resolve for ESM, CJS, and types). Removing/renaming a public component or export is a breaking change →feat!:/BREAKING CHANGE:and a major version bump.