Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow icon column to be configured as fixed width #1907

Merged
merged 52 commits into from
Apr 30, 2024
Merged

Conversation

mollykreis
Copy link
Contributor

@mollykreis mollykreis commented Mar 6, 2024

Pull Request

🤨 Rationale

This change is part of #1873 and follows the decisions made in #1992

This change adds the ability to configure the width-mode of the icon column. When set to iconSize, the column is a fixed width of 32px, cannot be resized, and hides its sorting & grouping indicators in the header.

👩‍💻 Implementation

There were a number of changes that needed to be made within nimble to facilitate this change.

  1. Column Internals
    • Add boolean properties of resizingDisabled and hideHeaderIndicators
  2. Table Update Tracker
    • Mark columnWidths as being changed when resizingDisabled changes in columnInternals
  3. Table Layout Manager
    • Update to deal with columns that have resizingDisabled === true
  4. Table
    • Add logic to hide column dividers that can never be dragged to the left or to the right. This is accomplished by adding a draggable class to the dividers that can be dragged and making the presence of that class a condition in the CSS for showing the divider.
    • Add logic to set indicators-hidden on table columns where hideHeaderIndicators === true
  5. Table Header
    • Add a boolean attribute of indicators-hidden that, when true, hides the sorting & grouping indicators in the column header.
  6. Icon Column
    • Add width-mode attribute. When the attribute is changed, columnInternals is updated with appropriate values for resizingDisabled, hideHeaderIndicators, minPixelWidth, and pixelWidth.

🧪 Testing

Manually tested in storybook
Updated & added unit tests

✅ Checklist

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

@mollykreis
Copy link
Contributor Author

@atmgrifter00, will you buddy this PR for me?

@mollykreis
Copy link
Contributor Author

@atmgrifter00, can you re-buddy this PR for me now that there has been a significant change in the direction of the feature?

@mollykreis mollykreis changed the title Fixed icon column width Allow icon column to be configured as fixed width Apr 25, 2024
@mollykreis mollykreis marked this pull request as ready for review April 29, 2024 17:09
@mollykreis mollykreis requested a review from rajsite April 30, 2024 17:29
@rajsite rajsite merged commit 6b0f337 into main Apr 30, 2024
11 checks passed
@rajsite rajsite deleted the fixed-icon-column-width branch April 30, 2024 21:10
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.

5 participants