-
Notifications
You must be signed in to change notification settings - Fork 140
feat(aggrid): add optional striped row theme configuration #2713
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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,9 @@ | ||
| --- | ||
| "@siemens/ix-aggrid": minor | ||
| --- | ||
|
|
||
| Add optional theme configuration to `getIxTheme` and `getIxThemeAsync` with `stripedRows` for API-based striped row styling. | ||
|
|
||
| AG Grid now defaults to a uniform row background, while striped rows can be enabled with: | ||
|
|
||
| `getIxTheme(agGridCommunity, { stripedRows: true })` |
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
Binary file modified
BIN
-447 Bytes
(99%)
...tton-in-cell-should-appear-above-other-rows-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-487 Bytes
(99%)
...ton-in-cell-should-appear-above-other-rows-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-319 Bytes
(100%)
...lect-in-cell-should-appear-above-other-rows-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-332 Bytes
(100%)
...ect-in-cell-should-appear-above-other-rows-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-132 Bytes
(99%)
...tests/aggrid.e2e.ts-snapshots/aggrid-editor-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-84 Bytes
(99%)
...ests/aggrid.e2e.ts-snapshots/aggrid-editor-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-5 Bytes
(100%)
...tests/aggrid.e2e.ts-snapshots/aggrid-filter-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+11 Bytes
(100%)
...ests/aggrid.e2e.ts-snapshots/aggrid-filter-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-36 Bytes
(100%)
...ts/aggrid-header-checkbox-should-be-checked-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-39 Bytes
(100%)
...s/aggrid-header-checkbox-should-be-checked-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-79 Bytes
(99%)
...rid-header-checkbox-should-be-indeterminate-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-86 Bytes
(99%)
...id-header-checkbox-should-be-indeterminate-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-650 Bytes
(95%)
.../aggrid-header-checkbox-should-be-unchecked-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-587 Bytes
(96%)
...aggrid-header-checkbox-should-be-unchecked-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.75 KB
(95%)
...s/aggrid.e2e.ts-snapshots/aggrid-pagination-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-728 Bytes
(98%)
.../aggrid.e2e.ts-snapshots/aggrid-pagination-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.4 KB
...aggrid.e2e.ts-snapshots/aggrid-striped-rows-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.2 KB
...ggrid.e2e.ts-snapshots/aggrid-striped-rows-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-236 Bytes
(99%)
...rid.e2e.ts-snapshots/aggrid-tooltip-display-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-139 Bytes
(99%)
...id.e2e.ts-snapshots/aggrid-tooltip-display-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-258 Bytes
(98%)
.../aggrid.e2e.ts-snapshots/aggrid-version-v33-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-177 Bytes
(99%)
...aggrid.e2e.ts-snapshots/aggrid-version-v33-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-259 Bytes
(98%)
.../aggrid.e2e.ts-snapshots/aggrid-version-v34-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-177 Bytes
(99%)
...aggrid.e2e.ts-snapshots/aggrid-version-v34-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-259 Bytes
(98%)
.../aggrid.e2e.ts-snapshots/aggrid-version-v35-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-177 Bytes
(99%)
...aggrid.e2e.ts-snapshots/aggrid-version-v35-1-chromium---classic-light-linux.png
Oops, something went wrong.
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,32 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 Siemens AG | ||
| * | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| import { | ||
| AllCommunityModule, | ||
| createGrid, | ||
| GridOptions, | ||
| ModuleRegistry, | ||
| } from 'ag-grid-community'; | ||
| import '@siemens/ix/dist/siemens-ix/siemens-ix.css'; | ||
| import { getIxTheme } from '@siemens/ix-aggrid'; | ||
| import * as agGridCommunity from 'ag-grid-community'; | ||
| import { COLUMN_DEFS, ROW_DATA } from '../utils/test/basic.const'; | ||
|
|
||
| ModuleRegistry.registerModules([AllCommunityModule]); | ||
|
|
||
| const stripedTheme = getIxTheme(agGridCommunity, { stripedRows: true }); | ||
|
danielleroux marked this conversation as resolved.
|
||
|
|
||
| const gridOptions = { | ||
| columnDefs: COLUMN_DEFS, | ||
| rowData: ROW_DATA, | ||
| suppressCellFocus: true, | ||
| theme: stripedTheme, | ||
| } satisfies GridOptions; | ||
|
|
||
| const gridElement = document.querySelector('#testGrid') as HTMLElement; | ||
| createGrid(gridElement, gridOptions); | ||
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,21 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: 2026 Siemens AG | ||
|
|
||
| SPDX-License-Identifier: MIT | ||
|
|
||
| This source code is licensed under the MIT license found in the | ||
| LICENSE file in the root directory of this source tree. | ||
| --> | ||
| <!DOCTYPE html> | ||
| <html lang="en" data-ix-theme="classic" data-ix-color-schema="dark"> | ||
|
nuke-ellington marked this conversation as resolved.
|
||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>AG Grid striped rows</title> | ||
| </head> | ||
| <body> | ||
| <div style="height: 500px" id="testGrid"></div> | ||
| <script src="../utils/test/runtime/main.ts" type="module"></script> | ||
| <script src="./setup-striped.ts" type="module"></script> | ||
| </body> | ||
| </html> | ||
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
133 changes: 133 additions & 0 deletions
133
packages/angular-standalone-test-app/src/preview-examples/aggrid-striped.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,133 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 Siemens AG | ||
| * | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| import { Component, OnInit } from '@angular/core'; | ||
| import { CommonModule } from '@angular/common'; | ||
| import { getIxTheme } from '@siemens/ix-aggrid'; | ||
| import { AgGridAngular } from 'ag-grid-angular'; | ||
| import { | ||
| GridOptions, | ||
| AllCommunityModule, | ||
| ModuleRegistry, | ||
| } from 'ag-grid-community'; | ||
| import * as agGrid from 'ag-grid-community'; | ||
|
|
||
| ModuleRegistry.registerModules([AllCommunityModule]); | ||
|
|
||
| @Component({ | ||
| selector: 'app-example', | ||
| imports: [AgGridAngular, CommonModule], | ||
| templateUrl: './aggrid.html', | ||
| }) | ||
| export default class AGGridStriped implements OnInit { | ||
| gridOptions: GridOptions | null = null; | ||
|
|
||
| ngOnInit() { | ||
| const ixTheme = getIxTheme(agGrid, { | ||
| stripedRows: true, | ||
| }); | ||
|
|
||
| this.gridOptions = { | ||
| theme: ixTheme, | ||
| rowDragManaged: true, | ||
| tooltipShowDelay: 500, | ||
| rowSelection: { | ||
| mode: 'multiRow', | ||
| checkboxes: true, | ||
| headerCheckbox: true, | ||
| selectAll: 'filtered', | ||
| }, | ||
| columnDefs: [ | ||
| { | ||
| field: 'type', | ||
| headerName: 'Type', | ||
| resizable: true, | ||
| rowDrag: true, | ||
| tooltipField: 'type', | ||
| }, | ||
| { | ||
| field: 'status', | ||
| headerName: 'Status', | ||
| resizable: true, | ||
| sortable: true, | ||
| filter: true, | ||
| tooltipValueGetter: (params) => { | ||
| return `Status: ${params.value} - Type: ${params.data.type}`; | ||
| }, | ||
| }, | ||
| { | ||
| field: 'hwVersion', | ||
| headerName: 'HW version', | ||
| resizable: true, | ||
| tooltipValueGetter: (params) => { | ||
| if (params.value === 'N/A') { | ||
| return 'Hardware version not available'; | ||
| } | ||
| return `Hardware Version ${params.value}`; | ||
| }, | ||
| }, | ||
| ], | ||
| autoSizeStrategy: { | ||
| type: 'fitGridWidth', | ||
| }, | ||
| rowData: [ | ||
| { | ||
| type: 'Equipment', | ||
| status: 'Normal', | ||
| hwVersion: '2.0', | ||
| }, | ||
| { | ||
| type: 'Positioner', | ||
| status: 'Maintenance', | ||
| hwVersion: '1.0', | ||
| }, | ||
| { | ||
| type: 'Pressure sensor', | ||
| status: 'Unknown', | ||
| hwVersion: 'N/A', | ||
| }, | ||
| { | ||
| type: 'Flow meter', | ||
| status: 'Normal', | ||
| hwVersion: '3.1', | ||
| }, | ||
| { | ||
| type: 'Temperature sensor', | ||
| status: 'Warning', | ||
| hwVersion: '2.2', | ||
| }, | ||
| { | ||
| type: 'Valve', | ||
| status: 'Normal', | ||
| hwVersion: '1.5', | ||
| }, | ||
| { | ||
| type: 'Actuator', | ||
| status: 'Maintenance', | ||
| hwVersion: '2.0', | ||
| }, | ||
| { | ||
| type: 'Controller', | ||
| status: 'Normal', | ||
| hwVersion: '4.0', | ||
| }, | ||
| { | ||
| type: 'Safety relay', | ||
| status: 'Unknown', | ||
| hwVersion: 'N/A', | ||
| }, | ||
| { | ||
| type: 'Power supply', | ||
| status: 'Normal', | ||
| hwVersion: '1.8', | ||
| }, | ||
| ], | ||
| suppressCellFocus: true, | ||
| }; | ||
| } | ||
| } |
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
Oops, something went wrong.
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.