Skip to content

Pinning Fixed Width Columns#2964

Draft
hellovolcano wants to merge 22 commits into
mainfrom
users/vgleason/pinned-column
Draft

Pinning Fixed Width Columns#2964
hellovolcano wants to merge 22 commits into
mainfrom
users/vgleason/pinned-column

Conversation

@hellovolcano
Copy link
Copy Markdown
Contributor

@hellovolcano hellovolcano commented May 21, 2026

Pull Request

🤨 Rationale

This PR adds support for pinning fixed-width table columns to the left side of the Nimble table, with primary support for icon-sized mapping columns.

Works toward addressing #848.

👩‍💻 Implementation

Added a sticky pinned column. When a column is pinned, it is the only thing that is sticky.

  • Implemented pinned-column rendering/layout in the table so pinned columns are separated from scrollable columns, rendered as sticky, and sized from pixel widths.
  • Updated row/group-row behavior so indentation is applied at the first non-pinned column and group rows account for pinned-column offset.
  • Added table validation for pinned-column configuration (invalidPinnedColumnConfiguration) to catch pinned columns without a resolvable fixed width.
  • Updated table update tracking so pinned state changes trigger required layout/focus recalculations.
  • Updated Storybook mapping-column docs/examples to expose pinned property.
  • Added angular and blazor wrappers

🧪 Testing

Added unit tests for pinned columns to table test spec
Manually verified:

  • Pinned column appears correctly when grouping, multi-select, and hierarchy are enabled
  • First non-pinned column has hierarchy indentation applied correctly
  • Pinned column is the only sticky column

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@hellovolcano hellovolcano mentioned this pull request May 21, 2026
1 task
@hellovolcano hellovolcano marked this pull request as ready for review May 29, 2026 16:43
Copy link
Copy Markdown
Contributor

@jattasNI jattasNI left a comment

Choose a reason for hiding this comment

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

I ran out of time to do a full review today. Just pointing out a couple things I noticed when playing with storybook.

@@ -0,0 +1,7 @@
{
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.

Looks like there are still some styling opacity issues with group rows on hover when there is a pinned column. (Note the arrow button lighter grey on the hovered row)

Image

description: widthModeDescription,
table: { category: apiCategory.attributes }
},
pinned: {
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.

I think the right place for these docs is in Table Column Configuration. That's where we describe the common column API and provide examples of each capability in actual use.

@mollykreis
Copy link
Copy Markdown
Contributor

mollykreis commented May 29, 2026

I also ran out of time to review this today, but an additional observation from looking at storybook is that I think the "Collapse All" button in the table header should be pinned so it stays aligned with the "collapse" button on each group row (or at least the rows with the outer-most level of grouping)

image

@@ -73,6 +73,7 @@ interface MappingColumnTableArgs extends SharedTableArgs {
fieldName: string;
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.

We should try to beef up our visual test coverage to validate as many of the corner cases that require custom styling as we can.

Ideally that would involve a matrix test that shows a pinned column along with various states for selection, grouping, hierarchy, hover, and themes. Ideally the content would be scrolled horizontally to make sure the clipping behind the pinned column is working.

There might be some gaps in our infrastructure to achieve all of that. For example: matrix tests may not yet support a Storybook play() function which would be the natural way to perform the horizontal scroll. And it might not be possible to put shadow dom parts like rows in the hover state. If you hit roadblocks like that feel free to reach out to one of us to brainstorm.

visibility: visible;
}

.pinned-columns-header-container {
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.

Molly, Milan, and shared an opinion that the way unpinned columns are clipped behind the pinned column looks a bit abrupt right now. You mentioned you're working with VxD on styling. Could you check if they have ideas how to delineate pinned and unpinned columns with some sort of shadow or divider to avoid sharply clipped content?

Image

">
<div role="rowgroup" class="header-row-container">
<div class="header-row" role="row">
<div class="pinned-columns-header-container">
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.

In Firefox (I saw it on macOS, Molly saw it on Windows), we noticed that the header of the pinned column isn't laying out correctly. It scrolls with the unpinned headers initially. Then if you hover over it, its position refreshes to correctly be pinned.

Screen.Recording.2026-06-01.at.2.06.54.PM.mov

@@ -0,0 +1,7 @@
{
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.

FYI I left some API design feedback in the linked isue: #848 (comment)

Some of it requires changes to the approach in the PR, hopefully not too big though. The main thing is changing the attribute from a boolean to a string enum.

@hellovolcano hellovolcano marked this pull request as draft June 2, 2026 12:11
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.

3 participants