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

Ag grid theme major - support v31 #3195

Merged
merged 30 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9f955d2
add delay to chromatic snapshots (#2599)
alycrys Oct 12, 2023
8819cb4
Bump ag grid to v31.2
origami-z Apr 3, 2024
5a8c914
Convert cypress snapshot to Chromatic interaction tests
origami-z Apr 29, 2024
2912702
Update font so filter icon matches prev version
origami-z Apr 29, 2024
cb8afbc
Add filter and/or snapshot
origami-z Apr 29, 2024
b962cdb
Add status bar custom divider example
origami-z Apr 29, 2024
bc3ec91
Fix HD icon size
origami-z Apr 29, 2024
0f5b139
Regression of additional container class name
origami-z May 3, 2024
cd5ddf2
Fix build
origami-z May 3, 2024
1cb67da
Update examples
origami-z May 9, 2024
41ae708
Dedupe @types/react to fix typecheck
origami-z May 13, 2024
e495199
Add theme peerDep to ag grid theme
origami-z May 17, 2024
f3037c2
Update examples
origami-z May 21, 2024
938586d
Update pagination example
origami-z May 21, 2024
b4a1977
update wrapped header
origami-z May 21, 2024
64adb66
Update site examples
origami-z May 22, 2024
5657df0
Update usage
origami-z May 22, 2024
ea532c6
Remove individual chromatic story parameter
origami-z May 22, 2024
b5b64c5
header column separator to tertiary
origami-z May 22, 2024
b96de63
Update kitchen sink ag grid style css import
origami-z May 22, 2024
c4e5915
Try fix build
origami-z May 22, 2024
fd07301
Update based on review
origami-z May 23, 2024
0b695be
Bump to ag grid ^31.3
origami-z May 23, 2024
b1d6620
Fix styles with 31.3
origami-z May 23, 2024
3f3cd93
Fix pinned top rows data
origami-z May 23, 2024
80e747c
Replace palette token with container token
origami-z May 23, 2024
0880439
Lint ag grid theme and fix errors
origami-z May 23, 2024
60c4923
Fix lint command
origami-z May 23, 2024
73c71c9
Add overlayable shadow to menu
origami-z May 24, 2024
8ff3ec8
- tool panel vert tabs size
origami-z May 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/stupid-coats-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@salt-ds/theme": minor
---

Added new `--salt-overlayable-rangeSelection` token, which points to new `--salt-palette-neutral-selection` and resolves to black@15% in light mode and white@15% in dark mode.
53 changes: 53 additions & 0 deletions .changeset/tasty-trains-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
"@salt-ds/ag-grid-theme": major
---

Ag grid theme is updated to support ag grid version v31, and it's now driven by [AG grid variables](https://ag-grid.com/react-data-grid/global-style-customisation/) with a big reduction in bundle size. Follow below for upgrade instructions:

1. Update stylesheet import

```diff
- import "ag-grid-community/dist/styles/ag-grid.css";
+ import "ag-grid-community/styles/ag-grid.css";
```

UITK theme is removed, migrate to Salt theme

```diff
- import "@salt-ds/ag-grid-theme/uitk-ag-theme.css";
+ import "@salt-ds/ag-grid-theme/salt-ag-theme.css";
```

2. Update classnames used on the container around `AgGridReact`, which no longer has density portion. If you previously copied `useAgGridHelpers`, you'll need to copy a new version from [here](https://github.com/jpmorganchase/salt-ds/blob/main/site/src/examples/ag-grid-theme/useAgGridHelpers.ts).

In light mode:

```diff
- .ag-theme-salt-high-light
- .ag-theme-salt-medium-light
- .ag-theme-salt-low-light
- .ag-theme-salt-touch-light
+ .ag-theme-salt-light
```

```diff
- .ag-theme-salt-high-compact-light
+ .ag-theme-salt-compact-light
```

In dark mode:

```diff
- .ag-theme-salt-high-dark
- .ag-theme-salt-medium-dark
- .ag-theme-salt-low-dark
- .ag-theme-salt-touch-dark
+ .ag-theme-salt-dark
```

```diff
- .ag-theme-salt-high-compact-dark
+ .ag-theme-salt-compact-dark
```

Closes #2972
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,5 @@ yarn-error.log*
*.iml

# Autogenerated CSS
/packages/ag-grid-theme/uitk-ag-theme.css
/packages/ag-grid-theme/salt-ag-theme.css
/docs/css/salt-core.css
/docs/css/salt-lab.css
11 changes: 10 additions & 1 deletion .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,14 @@
"salt/custom-property-starts-with-component-name": {
"logLevel": "default"
}
}
},
"overrides": [
{
"files": ["**/ag-grid-theme/**/*.css"],
"rules": {
"salt/custom-property-attributes-kebab-case": null,
"salt/custom-property-starts-with-component-name": null
}
}
]
}
1 change: 1 addition & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default defineConfig({
return null;
},
});

return config;
},
devServer: {
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@
"prettier": "pretty-quick --branch main",
"prettier:all": "prettier --write .",
"prettier:ci": "prettier --check .",
"lint:style": "yarn lint:style:core && yarn lint:style:icon && yarn lint:style:lab",
"lint:style": "yarn lint:style:core && yarn lint:style:icon && yarn lint:style:lab && yarn lint:style:ag-theme",
"lint:style:core": "yarn stylelint -f verbose \"packages/core/src/**/*.css\"",
"lint:style:icon": "yarn stylelint -f verbose \"packages/icons/src/**/*.css\"",
"lint:style:lab": "yarn stylelint -f verbose \"packages/lab/src/**/*.css\"",
"lint:style:ag-theme": "yarn stylelint -f verbose \"packages/ag-grid-theme/css/**/*.css\"",
"storybook": "storybook dev -p 6006",
"build-storybook": "yarn build:ag-grid-theme && yarn bundle:css && storybook build",
"typecheck": "tsc --noEmit",
Expand Down Expand Up @@ -82,9 +83,9 @@
"@typescript-eslint/eslint-plugin": "^6.6.0",
"@typescript-eslint/parser": "^6.6.0",
"@vitejs/plugin-react": "^4.1.0",
"ag-grid-community": "^28.2.1",
"ag-grid-enterprise": "^28.2.1",
"ag-grid-react": "^28.2.1",
"ag-grid-community": "^31.3.0",
"ag-grid-enterprise": "^31.3.0",
"ag-grid-react": "^31.3.0",
"axe-core": "^4.9.0",
"chromatic": "^11.3.2",
"ci-info": "^3.3.1",
Expand Down
7 changes: 0 additions & 7 deletions packages/ag-grid-theme/css/_export-salt-icons.module.scss

This file was deleted.

7 changes: 0 additions & 7 deletions packages/ag-grid-theme/css/_export-uitk-icons.module.scss

This file was deleted.

22 changes: 0 additions & 22 deletions packages/ag-grid-theme/css/_salt-ag-theme-default-params.scss

This file was deleted.

120 changes: 0 additions & 120 deletions packages/ag-grid-theme/css/_salt-ag-theme-icon-font.scss

This file was deleted.

Loading
Loading