-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update mapping column HLD #1992
Conversation
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
@m-akinc, will you buddy this PR for me? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My primary feedback is that I'd like us to revisit the API (and remove/deprecate the existing elements) rather sticking to names that don't make as much sense anymore.
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
…table-column-mapping.md Co-authored-by: m-akinc <7282195+m-akinc@users.noreply.github.com>
…con-column-hld
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
…table-column-mapping.md Co-authored-by: m-akinc <7282195+m-akinc@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API-wise looks good, just some Qs on naming
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Show resolved
Hide resolved
packages/nimble-components/src/table/specs/table-column-specs/table-column-mapping.md
Outdated
Show resolved
Hide resolved
… their text within a table's cells (#2012) # Pull Request ## 🤨 Rationale This updates the `nimble-mapping-icon` and `nimble-mapping-spinner` elements to be aligned with the changes described in #1992. ## 👩💻 Implementation - Added `text-hidden` to `nimble-mapping-icon` and `nimble-mapping-spinner` - I also added these to Blazor and Angular so that when the change is published clients in any framework can uptake the new package and have the opportunity to add `text-hidden` to mappings in order to keep their existing behavior - Reworked the `MappingIconConfig` and `MappingSpinnerConfig` to be more aligned - They both create the appropriate `ViewTemplate` to render a spinner, icon, or blank - They both add the appropriate `title` and `aria-*` attributes based on the configuration - Neither adds css classes that are styled in the group header styles or cell view styles - Update the templates for the icon column's cell view and group header share code for rendering icons and spinners (enabled because of aligning `MappingIconConfig` and `MappingSpinnerConfig`) and to render the text based on the `text-hidden` attribute ## 🧪 Testing - Updated storybook & matrix tests - Manually tested - Wrote/updated a number of tests for the icon column - To enable this, created a page object for the icon column to encapsulate the logic around finding the icon/spinner and the text ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
# Pull Request ## 🤨 Rationale This adds support to `nimble-table-column-icon`* for text mappings as described in #1992. *`nimble-table-column-icon` will be renamed to `nimble-table-column-mapping` in a future PR ## 👩💻 Implementation I've updated the column validator to allow text mappings and updated the cell-view and group-header-view to render text mappings correctly. ## 🧪 Testing - Updated storybook and matrix tests - New unit tests ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
# 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` 1. Table Update Tracker - Mark `columnWidths` as being changed when `resizingDisabled` changes in `columnInternals` 1. Table Layout Manager - Update to deal with columns that have `resizingDisabled === true` 1. 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` 1. Table Header - Add a boolean attribute of `indicators-hidden` that, when `true`, hides the sorting & grouping indicators in the column header. 1. 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 <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed. --------- Co-authored-by: Jonathan Meyer <26874831+atmgrifter00@users.noreply.github.com> Co-authored-by: Milan Raj <rajsite@users.noreply.github.com>
# Pull Request ## 🤨 Rationale As part of #1992, we decided to create a `nimble-mapping-empty` component that would allow a cell to render as blank for a given mapping while still having text provided for use in group rows. This PR creates that component within `nimble-components`. Support for Blazor and Angular will be added in a subsequent PR. ## 👩💻 Implementation - Create `nimble-mapping-empty` component - Add support for the component in the mapping column - Update tests ## 🧪 Testing - Extended the unit tests for the mapping column to include tests for empty mappings - Add empty mapping to the matrix test for the mapping column ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
Pull Request
🤨 Rationale
As part of #1873, we've decided to make some changes to the mapping columns.
The changes are described in detail in the HLD, but the high-level changes are:
nimble-table-column-enum-text
andnimble-table-column-icon
will be replaced with a single column namednimble-table-column-mapping
👩💻 Implementation
N/A
🧪 Testing
N/A
✅ Checklist