-
Notifications
You must be signed in to change notification settings - Fork 12
Pinning Fixed Width Columns #2964
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
Open
hellovolcano
wants to merge
53
commits into
main
Choose a base branch
from
users/vgleason/pinned-column
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 47 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
6bc89b4
stash
mollykreis dbbb14f
working?
mollykreis 385d887
a few improvements
mollykreis 854200c
mostly working -- styling needs help
mollykreis fc68bfa
merge
hellovolcano 1b99869
only make the pinned column sticky
hellovolcano c9aa786
Merge remote-tracking branch 'origin/main' into users/vgleason/pinned…
hellovolcano 2d16e03
apply cell indent levels to first non-pinned column
hellovolcano 355aa50
fix formatting issues
hellovolcano e2804b0
cleanup styles and stoybook
hellovolcano 26e7717
fix test
hellovolcano a6ce5ba
restore accidental delition
hellovolcano 62527b5
wrappers
hellovolcano e940d60
Change files
hellovolcano f474d84
add tests
hellovolcano 17b823c
fix ordering of pinned column
hellovolcano f322f1c
make pinned an attribute
hellovolcano f5a00a4
fix for styling non-pinned chevron
hellovolcano 4d57bc2
Merge branch 'main' into users/vgleason/pinned-column
hellovolcano 22eedc5
fix hover/sticky group issue
hellovolcano e8ce8b0
Merge branch 'users/vgleason/pinned-column' of https://github.com/ni/…
hellovolcano 9684cad
Merge branch 'main' into users/vgleason/pinned-column
hellovolcano f391277
Merge branch 'main' into users/vgleason/pinned-column
hellovolcano 34444af
pinned to pin-location enum
hellovolcano fc63a79
fix blazor wrapper
hellovolcano 869849d
adjust header layout to fix relative/sticky column position issue
hellovolcano 28b27b2
fix storybook
hellovolcano 5d97744
small storybook tweak
hellovolcano 27807f2
fix storybook and add slight visual style
hellovolcano 4781a66
Merge branch 'main' into users/vgleason/pinned-column
hellovolcano 23de172
add more matrix tests and fix styling
hellovolcano e6aaf93
fix chromatic tests
hellovolcano 0f86d08
breakup table to hopefully help load
hellovolcano a82664a
Change files
hellovolcano 63fea2b
Update packages/storybook/src/nimble/table-column/base/table-column.s…
hellovolcano 311919e
remove sticky position from group row
hellovolcano acb86d9
Merge branch 'users/vgleason/pinned-column' of https://github.com/ni/…
hellovolcano 8abc316
remove not
hellovolcano 9032a0b
rename method and add selection to matrix tests
hellovolcano 0ba59fe
fix storybook
hellovolcano 45390e2
add horizontal scroll tests
hellovolcano 43ef8ad
PR feedback
hellovolcano f87910c
fix focus state for rows with pinned columns
hellovolcano f42d985
create pinnableColumn mixin
hellovolcano ca962bf
fix group row focus style
hellovolcano 2e4d2e9
Change files
hellovolcano f45a930
Merge branch 'main' into users/vgleason/pinned-column
hellovolcano eb1755b
fix mixin implementation
hellovolcano a360a0c
PR feedback
hellovolcano 14c26eb
lint
hellovolcano b9f28ce
PR feedback
hellovolcano 8be620e
doesn't need to be a function
hellovolcano 4e4dee9
Merge branch 'main' into users/vgleason/pinned-column
rajsite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-angular-3b488452-3822-410a-a684-15d5f131dd98.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "add support for pinning table columns", | ||
| "packageName": "@ni/nimble-angular", | ||
| "email": "5265744+hellovolcano@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-blazor-ef211a30-d326-4325-9b2f-40bad3951887.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "add support for pinning table columns", | ||
| "packageName": "@ni/nimble-blazor", | ||
| "email": "5265744+hellovolcano@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-nimble-components-817561ce-db7b-4dc2-866f-c794a24b0428.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
|
hellovolcano marked this conversation as resolved.
|
||
| "type": "minor", | ||
| "comment": "add support for pinning table columns", | ||
| "packageName": "@ni/nimble-components", | ||
| "email": "5265744+hellovolcano@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
7 changes: 7 additions & 0 deletions
7
change/@ni-ok-blazor-c1ed3831-a5b6-49ff-9320-7477a04f462f.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "Add support for pinning the breakpoint column", | ||
| "packageName": "@ni/ok-blazor", | ||
| "email": "5265744+hellovolcano@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@ni-ok-components-f960a940-47e4-4b25-bf07-e86b30b81899.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "minor", | ||
| "comment": "Add support for pinning the breakpoint column", | ||
| "packageName": "@ni/ok-components", | ||
| "email": "5265744+hellovolcano@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
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
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
4 changes: 2 additions & 2 deletions
4
packages/angular-workspace/nimble-angular/table-column/nimble-table-column-base.directive.ts
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
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
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
14 changes: 14 additions & 0 deletions
14
packages/blazor-workspace/NimbleBlazor/Source/Table/TableColumnPinLocation.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| namespace NimbleBlazor; | ||
|
|
||
| public enum TableColumnPinLocation | ||
| { | ||
| None, | ||
| Left | ||
| } | ||
|
|
||
| internal static class TableColumnPinLocationExtensions | ||
| { | ||
| private static readonly Dictionary<TableColumnPinLocation, string> _enumValues = AttributeHelpers.GetEnumNamesAsKebabCaseValues<TableColumnPinLocation>(); | ||
|
|
||
| public static string? ToAttributeValue(this TableColumnPinLocation? value) => (value == null || value == TableColumnPinLocation.None) ? null : _enumValues[value.Value]; | ||
| } |
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
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
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
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
14 changes: 14 additions & 0 deletions
14
packages/blazor-workspace/OkBlazor/Source/Ts/TableColumnBreakpoint/TableColumnPinLocation.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| namespace OkBlazor; | ||
|
|
||
| public enum TableColumnPinLocation | ||
| { | ||
| None, | ||
| Left | ||
| } | ||
|
|
||
| internal static class TableColumnPinLocationExtensions | ||
| { | ||
| private static readonly Dictionary<TableColumnPinLocation, string> _enumValues = AttributeHelpers.GetEnumNamesAsKebabCaseValues<TableColumnPinLocation>(); | ||
|
|
||
| public static string? ToAttributeValue(this TableColumnPinLocation? value) => (value == null || value == TableColumnPinLocation.None) ? null : _enumValues[value.Value]; | ||
| } |
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
39 changes: 39 additions & 0 deletions
39
packages/nimble-components/src/table-column/mixins/pinnable-column.ts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { attr } from '@ni/fast-element'; | ||
| import type { TableColumn } from '../base'; | ||
| import type { TableColumnPinLocation } from '../../table/types'; | ||
|
|
||
| // Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports) | ||
| type PinnableTableColumn = Pick<TableColumn, never>; | ||
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| type PinnableTableColumnConstructor = abstract new (...args: any[]) => PinnableTableColumn; | ||
|
|
||
| export type TableColumnWithPinLocation = TableColumn & { | ||
| pinLocation?: TableColumnPinLocation | ||
| }; | ||
|
|
||
| export function getColumnPinLocation( | ||
| column: TableColumn | ||
| ): TableColumnPinLocation { | ||
| return (column as TableColumnWithPinLocation).pinLocation; | ||
| } | ||
|
hellovolcano marked this conversation as resolved.
Outdated
|
||
|
|
||
| // As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference | ||
| // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type | ||
| export function mixinPinnableColumnAPI< | ||
| TBase extends PinnableTableColumnConstructor | ||
| >(base: TBase) { | ||
| /** | ||
| * The Mixin that provides a concrete column with the API to allow pinning | ||
| * a fixed-width column within a table. | ||
| */ | ||
| abstract class PinnableColumn extends base { | ||
| public pinLocation?: TableColumnPinLocation; | ||
| } | ||
|
|
||
| attr({ attribute: 'pin-location' })( | ||
| PinnableColumn.prototype, | ||
| 'pinLocation' | ||
| ); | ||
|
|
||
| return PinnableColumn; | ||
| } | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.