-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove Datagrid
dependency
#118
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #118 +/- ##
=======================================
Coverage 92.64% 92.64%
=======================================
Files 85 85
Lines 1481 1481
Branches 222 222
=======================================
Hits 1372 1372
Misses 91 91
Partials 18 18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
docs/guide/providers.md
Outdated
Define a plugin function that integrates DataGrid with Chartlets. | ||
|
||
```typescript | ||
import { DataGrid } from "chartlets/packages/lib/src/plugins/mui/DataGrid"; |
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.
I am just not sure about this import line. When I tested it in xcube-viewer, it was imported like the following:
import { DataGrid } from "../../../chartlets/chartlets.js/packages/lib/src/plugins/mui/DataGrid";
What do you think?
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.
Oh right, overlooked it. This wont work!
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.
Great!
@@ -44,6 +44,11 @@ | |||
"types": "./dist/plugins/vega/index.d.ts", | |||
"module": "./dist/vega-plugin.js", | |||
"require": "./dist/vega-plugin.cjs" | |||
}, | |||
"./datagrid": { |
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.
"./datagrid": { | |
"./mui/datagrid": { |
Define a plugin function that integrates DataGrid with Chartlets. | ||
|
||
```typescript | ||
import { DataGrid } from "chartlets/DataGrid"; |
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.
Components should be default export:
import { DataGrid } from "chartlets/DataGrid"; | |
import DataGrid from "chartlets/DataGrid"; |
@@ -40,6 +40,7 @@ export default defineConfig({ | |||
chartlets: resolve(__dirname, "src/index.ts"), | |||
"mui-plugin": resolve(__dirname, "src/plugins/mui/index.ts"), | |||
"vega-plugin": resolve(__dirname, "src/plugins/vega/index.ts"), | |||
datagrid: resolve(__dirname, "src/plugins/mui/DataGrid.tsx"), |
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.
datagrid: resolve(__dirname, "src/plugins/mui/DataGrid.tsx"), | |
"mui-plugin-datagrid": resolve(__dirname, "src/plugins/mui/DataGrid.tsx"), |
Let's further discuss tomorrow! |
This PR removes the
@mui/x-data-grid
frompeerDependencies
as it is quite large and it can be installed by the user if required as a plugin. The Provider's guide is also updated in this PR showing the user how to use DataGrid.