Skip to content

Commit 2eb6882

Browse files
authored
Merge pull request #167 from plotly/v2.0-facade
V2.0 facade
2 parents a6e2cf2 + a75e701 commit 2eb6882

File tree

8 files changed

+451
-162
lines changed

8 files changed

+451
-162
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ NAMESPACE
1313
Project.toml
1414
src/*.jl
1515
src/jl/*.jl
16+
lib/
1617

1718
# Created by .ignore support plugin (hsz.mobi)
1819
### VisualStudioCode template

Diff for: CHANGELOG.md

+56-69
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@ All notable changes to `dash-ag-grid` will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55
Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source Dash AG Grid repo
66

7-
## [2.0.0]
7+
## [2.0.0] - 2023-05-02
88

99
### Removed
1010

1111
- [Overhaul commit](https://github.com/plotly/dash-ag-grid/commit/b888d6ab4fcb4afac187492e8b6c9cf0d0f8842b)
12-
- Remove `agGridColumns` component due to deprecation in AG Grid v29
12+
- Remove `agGridColumns` component due to deprecation in AG Grid v29, use `columnDefs` instead.
1313
- Remove some hardcoded CSS
1414

15-
- [#132](https://github.com/plotly/dash-ag-grid/pull/132)
16-
- removed prop `autoSizeAllColumns`
15+
- [#132](https://github.com/plotly/dash-ag-grid/pull/132) Remove prop `autoSizeAllColumns`, use the `columnSize` prop instead.
1716

1817
### Added
1918

2019
- [Overhaul commit](https://github.com/plotly/dash-ag-grid/commit/b888d6ab4fcb4afac187492e8b6c9cf0d0f8842b)
21-
- Add `className` prop for css customization native to ag-grid
20+
- Add `className` prop for css customization native to AG Grid
2221
- Add `enable*` props for easier user / dash manipulation, for creating buttons
2322
- Add overarching `dangerously_allow_code` prop to grid props only provided at render, to keep `columnDefs` from receiving possible updates to execute malicious JavaScript (originally called `dangerously_allow_html` but renamed later)
2423
- Add `data_previous` and `data_previous_timestamp` props to allow easier change tracking in callbacks
@@ -33,47 +32,38 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D
3332
- Allow for `null` to be passed to `columnSize`, to prevent the fit to width or autosize being the only options
3433

3534
- [#28](https://github.com/plotly/dash-ag-grid/pull/28)
36-
- allowed for other column prop functions to pass without disabling them if `dangerously_allow_code` is not passed
37-
- copying over `columnDef` `dangerously_allow_code` to allow for the prop to be placed only on the grid level
38-
- created a unified function parser to be easier to maintain
39-
- brought the props to iterate through into a separate js `utils/functionVars.js` file
40-
- switched to keeping `params` together instead of splitting into separate keys, to allow for easier transition to using AG Grid docs
41-
- updated `test/test_add_remove_update_rows.py` to apply the new variable configuration
35+
- Allow for other column prop functions to pass without disabling them if `dangerously_allow_code` is not passed
36+
- Copy over `columnDef` `dangerously_allow_code` to allow for the prop to be placed only on the grid level
37+
- Keep `params` together instead of splitting into separate keys, to allow for easier transition to using AG Grid docs
4238

4339
- [#39](https://github.com/plotly/dash-ag-grid/pull/39)
44-
- Allowed for `defaultColDef` to be iterated through for functions
45-
- Added `tooltipComponent` to be altered if it was list as a function object
46-
- Added tests for `custom_components.py`, and made it so the stock data is pulled from a csv instead of live.
47-
48-
- [#49](https://github.com/plotly/dash-ag-grid/pull/49) Safely handle more attributes when `dangerously_allow_code` is disabled: top-level attributes `rowClassRules`, `getRowStyle`, and `getRowClass`; and column attributes `cellClass`, `cellStyle`, and `cellClassRules`.
40+
- Allow for `defaultColDef` to be iterated through for functions
41+
- Add `tooltipComponent` to be altered if it was list as a function object
4942

50-
- [#67](https://github.com/plotly/dash-ag-grid/pull/67) Function parsing recursvie columndefs
51-
- adding more functions to be available for parsing
52-
- allowed for recursively going through `columnDefs` -> `children` and master detail info
53-
- added various tests for functionality
43+
- [#49](https://github.com/plotly/dash-ag-grid/pull/49) Safely handle more attributes when `dangerously_allow_code` is disabled:
44+
- Top-level attributes `rowClassRules`, `getRowStyle`, and `getRowClass`
45+
- Column attributes `cellClass`, `cellStyle`, and `cellClassRules`
5446

55-
- [#76](https://github.com/plotly/dash-ag-grid/pull/76) Adding logging function
56-
- adding logging function available by default, available via `{"function": "log()"}`
47+
- [#67](https://github.com/plotly/dash-ag-grid/pull/67) Function parsing recursive columnDefs
48+
- Add more functions to be available for parsing
49+
- Allow for recursively going through `columnDefs` -> `children` and master detail info
5750

58-
- [#81](https://github.com/plotly/dash-ag-grid/pull/81)
59-
- added tests for `cellClicked` data
51+
- [#76](https://github.com/plotly/dash-ag-grid/pull/76) Add logging function available by default, available via `{"function": "log()"}`
6052

61-
- [#111](https://github.com/plotly/dash-ag-grid/pull/111)
62-
- added `filterModel` prop in order to capture the grid's active filters
53+
- [#111](https://github.com/plotly/dash-ag-grid/pull/111) Add `filterModel` prop in order to capture the grid's active filters
6354

6455
- [#132](https://github.com/plotly/dash-ag-grid/pull/132)
65-
- added new `columnSize` available, `responsiveSizeToFit` which will adjust column sizes based upon grid size and columns added or removed
66-
- added `columnSizeOptions` to take an object that is compatible with AG Grid to perform sizing options as needed
67-
- added ability to push `columnState` back to grid and replay the settings
56+
- Add new `columnSize` option `responsiveSizeToFit`, which will adjust column sizes based upon grid size and columns added or removed
57+
- Add `columnSizeOptions` prop to modify the behavior chosen in `columnSize`
58+
- Add ability to push `columnState` back to grid and replay the settings
6859

6960
- [#145](https://github.com/plotly/dash-ag-grid/pull/145)
70-
- added support for `alignedGrids`
71-
- added ability for functions with `tooltipComponentParams`
72-
- added `paginationInfo` for read-only info from the grid's pagination
73-
- added `paginationGoTo` to navigate to different pages
61+
- Support `alignedGrids`
62+
- Support functions with `tooltipComponentParams`
63+
- Add `paginationInfo` for read-only info from the grid's pagination
64+
- Add `paginationGoTo` to navigate to different pages
7465

75-
-[#164](https://github.com/plotly/dash-ag-grid/pull/164)
76-
- added ability for `selectedRows` to be passed functions or ids for performing selections
66+
-[#164](https://github.com/plotly/dash-ag-grid/pull/164) Support passing `selectedRows` functions or ids for performing selections
7767

7868
### Updated
7969
- [Overhaul commit](https://github.com/plotly/dash-ag-grid/commit/b888d6ab4fcb4afac187492e8b6c9cf0d0f8842b)
@@ -82,66 +72,63 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D
8272
- Update `requirements.txt` (Python dependencies for demos and docs) to allow the latest packages
8373

8474
- [#39](https://github.com/plotly/dash-ag-grid/pull/39)
85-
- Changing `selectionChanged` to `selectedRows` to make props align with AG Grid.
86-
- Document adjustments for `selectionChanged` to `selectedRows`, also allowed for persistence in the `selectedRows`
75+
- Change `selectionChanged` to `selectedRows` to make props align with AG Grid
76+
- Allow `selectedRows` to persist
8777

88-
- [#70](https://github.com/plotly/dash-ag-grid/pull/70)
89-
- Changing `clickData` to `cellRendererData` to more closely line up with what this does
78+
- [#70](https://github.com/plotly/dash-ag-grid/pull/70) Change `clickData` to `cellRendererData` to more closely line up with what this does
9079

9180
- [#81](https://github.com/plotly/dash-ag-grid/pull/81)
92-
- prop clean-up overhaul
93-
- updating testing that broke due to props no longer being on the grid, but in dashGridOptions
94-
- added testing for selection and sizing buttons
95-
- removed `cellStyle` from the grid level, allowing more flexibility in customization, and alignment with AG grid
96-
- allowed for functions, styleConditions and regular dictionaries to be passed to the `cellStyle` on all levels
97-
- added `rowId` to `cellClicked` data
81+
- Prop clean-up overhaul
82+
- Remove `cellStyle` from the grid level, allowing more flexibility in customization, and alignment with AG grid
83+
- Allow for functions, styleConditions and regular dictionaries to be passed to the `cellStyle` on all levels
84+
- Add `rowId` to `cellClicked` data
9885

99-
- [#132](https://github.com/plotly/dash-ag-grid/pull/132)
100-
- updated `columnSize` option of `autoSizeAll` -> `autoSize`
86+
- [#132](https://github.com/plotly/dash-ag-grid/pull/132) Change `columnSize` option of `autoSizeAll` -> `autoSize`
10187

102-
- [#145](https://github.com/plotly/dash-ag-grid/pull/145) and [#159](https://github.com/plotly/dash-ag-grid/pull/159)
103-
- updated AG Grid `29.1.0` -> `29.3.3`
88+
- [#145](https://github.com/plotly/dash-ag-grid/pull/145) and [#159](https://github.com/plotly/dash-ag-grid/pull/159) Update AG Grid `29.1.0` -> `29.3.3`
10489

10590
- [#155](https://github.com/plotly/dash-ag-grid/pull/155)
106-
- update React to `18.2.0`
107-
- updated `material-ui` to `@mui` for `rowMenuRenderer`
91+
- Update React to `18.2.0`
92+
- Update `material-ui` to `@mui` for `rowMenuRenderer`
10893

109-
-[#164](https://github.com/plotly/dash-ag-grid/pull/164)
110-
- updated `selectedRows` to maintain persistence by utilizing `rowIds` if available
94+
-[#164](https://github.com/plotly/dash-ag-grid/pull/164) Update `selectedRows` to maintain persistence by utilizing `rowIds` if available
11195

11296
### Fixed
11397
- [Overhaul commit](https://github.com/plotly/dash-ag-grid/commit/b888d6ab4fcb4afac187492e8b6c9cf0d0f8842b)
114-
- Fix issue where conditional formatting was not applied to nested columns
98+
- Fix conditional formatting for nested columns
11599
- Fix issue where columns would not take edits or adjustments due to becoming static
116100

117101
- [#6](https://github.com/plotly/dash-ag-grid/pull/6) Fix props issue for `enableAddRows`
102+
118103
- [#19](https://github.com/plotly/dash-ag-grid/pull/19) Fixed `cellClicked` as reported in [#17](https://github.com/plotly/dash-ag-grid/issues/17)
104+
119105
- [#45](https://github.com/plotly/dash-ag-grid/pull/45) Fix [#44](https://github.com/plotly/dash-ag-grid/issues/44), markdown ignoring `target="_blank"` to open links in a new tab. Now if `dangerously_use_code` is `false`, markdown cells honor `columnDef.linkTarget`, but if `dangerously_use_code` is `true` you MUST use the HTML syntax `<a target="_blank">` to achieve this, markdown syntax `[text](url)` will ignore `columnDef.linkTarget`.
106+
120107
- [#47](https://github.com/plotly/dash-ag-grid/pull/47) Fix `virtualRowData` by setting the default `rowModelType='clientSide'`
121-
- [#81](https://github.com/plotly/dash-ag-grid/pull/81) Fixing syncing issue with `rowData`, `virtualRowData` when cell edits and async `rowTransactions` occur
122-
- [#90](https://github.com/plotly/dash-ag-grid/pull/90) Fixing `columnState` to be populated once `gridReady`
123-
- [#92](https://github.com/plotly/dash-ag-grid/pull/92) Fixing `defaultStyle` when no `styleConditions` is in `cellStyle`
124108

125-
- [#111](https://github.com/plotly/dash-ag-grid/pull/111)
126-
- fixing templates to only populate when `dangerously_allow_code=True`
109+
- [#81](https://github.com/plotly/dash-ag-grid/pull/81) Fix syncing issue with `rowData`, `virtualRowData` when cell edits and async `rowTransactions` occur
127110

128-
- [#132](https://github.com/plotly/dash-ag-grid/pull/132)
129-
- fixed `columnSize` to update upon interaction
111+
- [#90](https://github.com/plotly/dash-ag-grid/pull/90) Fix `columnState` to be populated once `gridReady`
112+
113+
- [#92](https://github.com/plotly/dash-ag-grid/pull/92) Fix `defaultStyle` when no `styleConditions` is in `cellStyle`
114+
115+
- [#111](https://github.com/plotly/dash-ag-grid/pull/111) Fix templates to only populate when `dangerously_allow_code=True`
116+
117+
- [#132](https://github.com/plotly/dash-ag-grid/pull/132) Fix `columnSize` to update upon interaction
130118

131119
- [#145](https://github.com/plotly/dash-ag-grid/pull/145)
132-
- fixed `onRowDragEnd` to trigger `virtualRowData` update
133-
- fixed all `virtualRowData` updates to take into account the sorting
120+
- Fix `onRowDragEnd` to trigger `virtualRowData` update
121+
- Fix all `virtualRowData` updates to take into account sorting
134122

135123
- [#155](https://github.com/plotly/dash-ag-grid/pull/155) and [#158](https://github.com/plotly/dash-ag-grid/pull/158)
136-
- fixed `openGroups` where clearing out the set would cause issues
137-
- fixed `paginationGoTo` to work with a starting page
124+
- Fix `openGroups` where clearing out the set would cause issues
125+
- Fix `paginationGoTo` to work with a starting page
138126

139-
- [#161](https://github.com/plotly/dash-ag-grid/pull/161)
140-
- fixed the default style to be applied even when a style is given from the developer, `style.height` and `style.width` always exist and can be overridden by the developer if provided
127+
- [#161](https://github.com/plotly/dash-ag-grid/pull/161) Fix the default style to be applied even when a style is given from the developer. `style.height` and `style.width` always exist but can be overridden if other values are provided in the `style` prop.
141128

142129
-[#164](https://github.com/plotly/dash-ag-grid/pull/164)
143-
- fixed `comparator` to not be restricted to just params
144-
- fixed `paginationGoTo` to allow `0` to be passed
130+
- Fix `comparator` to not be restricted to just params
131+
- Fix `paginationGoTo` to allow `0` to be passed
145132

146133
## [1.3.2] - 2023-01-13
147134

Diff for: README.md

+15-20
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,39 @@
11
# Dash AG Grid
22

3-
Dash AG Grid is a Dash component wrapper for the AG Grid Javascript package, enabling you to display AG Grid tables natively in your Dash app.
3+
Dash AG Grid is a Dash component wrapper for the AG Grid JavaScript package, enabling you to display AG Grid components natively in your Dash app.
44

5-
The underlying AG Grid Javascript package is a third-party software component developed by [AG Grid Ltd](http://www.ag-grid.com/). Many AG Grid features are available for free in the AG Grid [Community version](https://github.com/ag-grid/ag-grid). However, some features require a paid subscription to the AG Grid Enterprise version ([more info available here](https://www.ag-grid.com/license-pricing.php)). The demos which use Enterprise features are clearly marked.
5+
The underlying AG Grid JavaScript package is a third-party software component developed by [AG Grid Ltd](http://www.ag-grid.com/). Many features are available for free in the AG Grid [Community version](https://github.com/ag-grid/ag-grid). Some features require a paid subscription to the AG Grid Enterprise version ([more info available here](https://www.ag-grid.com/license-pricing.php)). Both the community and enterprise versions are included in this component, but the enterprise features require you to provide a valid AG Grid license key. The demos which use Enterprise features are clearly marked.
66

77

8+
## v2.0.0 Release
89

9-
## Dash AG Grid is currently a prerelease
10-
11-
We've completed all planned breaking changes, and we're now doing the final review before the full 2.0.0 release!
12-
13-
If you have tried previous alpha releases, please see our [Migration Guide.](https://dashaggrid.pythonanywhere.com/getting-started/migration-guide)
14-
10+
If you have tried v2.0.0 alpha releases, release candidates, or our v1.x enterprise package, please see our [Migration Guide](https://dash.plotly.com/dash-ag-grid/migration-guide) (previously hosted [here](https://dashaggrid.pythonanywhere.com/getting-started/migration-guide)).
1511

1612

1713
### Getting Started
1814

19-
`pip install dash-ag-grid==2.0.0rc2`
20-
21-
1. Read the [Medium article](https://medium.com/plotly/announcing-dash-ag-grid-fbb4a1c83e62#:~:text=Dash%20AG%20Grid%20is%20a,grid%20accessible%20to%20our%20customers) or watch the [webinar](https://www.youtube.com/watch?v=Ggekq7C5pz4?utm_source=Webinar%3A+AG+Grid+1%2F26%2F23&utm_medium=medium_article&utm_content=AnnouncingDashAGGrids) introducing Dash AG Grid.
22-
2. See the live [stock portfolio demo app](https://sales-demo.plotly.com/dash-ag-grid) from the webinar hosted by Plotly.
23-
3. Get the code for the demo app in [GitHub](https://github.com/plotly/dash-ag-grid/blob/dev/docs/demo_stock_portfolio.py)
24-
4. Learn more about [AG Grid](https://www.ag-grid.com/react-data-grid) in the upstream docs, including more information on community features and licensing for the enterprise version.
15+
`pip install dash-ag-grid`
2516

17+
1. Read the [Medium article](https://medium.com/plotly/announcing-dash-ag-grid-fbb4a1c83e62#:~:text=Dash%20AG%20Grid%20is%20a,grid%20accessible%20to%20our%20customers) or watch the [webinar](https://www.youtube.com/watch?v=Ggekq7C5pz4?utm_source=Webinar%3A+AG+Grid+1%2F26%2F23&utm_medium=medium_article&utm_content=AnnouncingDashAGGrids) introducing Dash AG Grid.
18+
2. See the live [stock portfolio demo app](https://sales-demo.plotly.com/dash-ag-grid) from the webinar hosted by Plotly.
19+
3. Get the code for the demo app in [GitHub](https://github.com/plotly/dash-ag-grid/blob/dev/docs/demo_stock_portfolio.py)
20+
4. Learn more about [AG Grid](https://www.ag-grid.com/react-data-grid) in the upstream docs, including more information on community features and licensing for the enterprise version.
2621

2722

28-
29-
### See the docs app live
30-
https://dashaggrid.pythonanywhere.com/
23+
### Documentation
24+
At v2.0.0 release we're still working to move all the Dash AG Grid docs into the official Dash docs, https://dash.plotly.com/dash-ag-grid.
25+
In the meantime you can find them all here: https://dashaggrid.pythonanywhere.com/
3126

3227
![docs_app](https://user-images.githubusercontent.com/72614349/233876110-4a29348c-d8e3-4114-b152-bf97f934eac8.png)
3328

29+
3430
## Contributing
3531

3632
Dash AG Grid welcomes community contributions!
3733

38-
If you have identified a bug or have an idea for a new feature, it's best to start with a GitHub issue. First look at existing issues at https://github.com/plotly/dash-ag-grid/issues to make sure this is not a duplicate issue. Then create a new issue. Bug reports should be accompanied by a small example app that someone else can copy and run to reproduce the problem.
34+
If you have identified a bug or have an idea for a new feature, it's best to start with a GitHub issue. First look at existing issues at https://github.com/plotly/dash-ag-grid/issues to make sure this is not a duplicate. Then create a new issue. Bug reports should be accompanied by a small example app that someone else can copy and run to reproduce the problem.
3935

40-
The docs are under development as well. There are many examples in the official AG Grid docs that have not been included here yet. Please open an issue or do pull requests for edits or to add examples. Or post your question, comments or demo apps on the Dash Community Forum.
36+
The docs are under development as well. There are many examples in the official AG Grid docs that have not been included here yet. Please open an issue or do pull requests for edits or to add examples. Or post your question, comments or demo apps on the [Dash Community Forum](https://community.plotly.com/).
4137

4238
### Running the docs app locally
4339
```
@@ -48,7 +44,6 @@ Then you can run the apps there:
4844
- `demo_stock_portfolio.py` and `demo_stock_portfolio_simple.py` are small apps demonstrating some key features of Dash AG Grid, such as calculated columns, conditional formatting, and connecting its data and selected rows to graphs.
4945
- `app.py` runs a comprehensive documentation app. After we complete the open-source release, this will be merged into the main dash docs at https://dash.plotly.com/ but right now this app is the best way to explore Dash AG Grid.
5046

51-
5247
### Developing in this repo
5348

5449
Make sure you have Dash installed with dev and testing extras:

0 commit comments

Comments
 (0)