Skip to content

Commit

Permalink
Merge pull request #167 from plotly/v2.0-facade
Browse files Browse the repository at this point in the history
V2.0 facade
  • Loading branch information
alexcjohnson authored May 2, 2023
2 parents a6e2cf2 + a75e701 commit 2eb6882
Show file tree
Hide file tree
Showing 8 changed files with 451 additions and 162 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NAMESPACE
Project.toml
src/*.jl
src/jl/*.jl
lib/

# Created by .ignore support plugin (hsz.mobi)
### VisualStudioCode template
Expand Down
125 changes: 56 additions & 69 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@ All notable changes to `dash-ag-grid` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).
Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source Dash AG Grid repo

## [2.0.0]
## [2.0.0] - 2023-05-02

### Removed

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

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

### Added

- [Overhaul commit](https://github.com/plotly/dash-ag-grid/commit/b888d6ab4fcb4afac187492e8b6c9cf0d0f8842b)
- Add `className` prop for css customization native to ag-grid
- Add `className` prop for css customization native to AG Grid
- Add `enable*` props for easier user / dash manipulation, for creating buttons
- 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)
- Add `data_previous` and `data_previous_timestamp` props to allow easier change tracking in callbacks
Expand All @@ -33,47 +32,38 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D
- Allow for `null` to be passed to `columnSize`, to prevent the fit to width or autosize being the only options

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

- [#39](https://github.com/plotly/dash-ag-grid/pull/39)
- Allowed for `defaultColDef` to be iterated through for functions
- Added `tooltipComponent` to be altered if it was list as a function object
- Added tests for `custom_components.py`, and made it so the stock data is pulled from a csv instead of live.

- [#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`.
- Allow for `defaultColDef` to be iterated through for functions
- Add `tooltipComponent` to be altered if it was list as a function object

- [#67](https://github.com/plotly/dash-ag-grid/pull/67) Function parsing recursvie columndefs
- adding more functions to be available for parsing
- allowed for recursively going through `columnDefs` -> `children` and master detail info
- added various tests for functionality
- [#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`
- Column attributes `cellClass`, `cellStyle`, and `cellClassRules`

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

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

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

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

- [#145](https://github.com/plotly/dash-ag-grid/pull/145)
- added support for `alignedGrids`
- added ability for functions with `tooltipComponentParams`
- added `paginationInfo` for read-only info from the grid's pagination
- added `paginationGoTo` to navigate to different pages
- Support `alignedGrids`
- Support functions with `tooltipComponentParams`
- Add `paginationInfo` for read-only info from the grid's pagination
- Add `paginationGoTo` to navigate to different pages

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

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

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

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

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

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

- [#145](https://github.com/plotly/dash-ag-grid/pull/145) and [#159](https://github.com/plotly/dash-ag-grid/pull/159)
- updated AG Grid `29.1.0` -> `29.3.3`
- [#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`

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

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

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

- [#6](https://github.com/plotly/dash-ag-grid/pull/6) Fix props issue for `enableAddRows`

- [#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)

- [#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`.

- [#47](https://github.com/plotly/dash-ag-grid/pull/47) Fix `virtualRowData` by setting the default `rowModelType='clientSide'`
- [#81](https://github.com/plotly/dash-ag-grid/pull/81) Fixing syncing issue with `rowData`, `virtualRowData` when cell edits and async `rowTransactions` occur
- [#90](https://github.com/plotly/dash-ag-grid/pull/90) Fixing `columnState` to be populated once `gridReady`
- [#92](https://github.com/plotly/dash-ag-grid/pull/92) Fixing `defaultStyle` when no `styleConditions` is in `cellStyle`

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

- [#132](https://github.com/plotly/dash-ag-grid/pull/132)
- fixed `columnSize` to update upon interaction
- [#90](https://github.com/plotly/dash-ag-grid/pull/90) Fix `columnState` to be populated once `gridReady`

- [#92](https://github.com/plotly/dash-ag-grid/pull/92) Fix `defaultStyle` when no `styleConditions` is in `cellStyle`

- [#111](https://github.com/plotly/dash-ag-grid/pull/111) Fix templates to only populate when `dangerously_allow_code=True`

- [#132](https://github.com/plotly/dash-ag-grid/pull/132) Fix `columnSize` to update upon interaction

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

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

- [#161](https://github.com/plotly/dash-ag-grid/pull/161)
- 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
- [#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.

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

## [1.3.2] - 2023-01-13

Expand Down
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,39 @@
# Dash AG Grid

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.
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.

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.
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.


## v2.0.0 Release

## Dash AG Grid is currently a prerelease

We've completed all planned breaking changes, and we're now doing the final review before the full 2.0.0 release!

If you have tried previous alpha releases, please see our [Migration Guide.](https://dashaggrid.pythonanywhere.com/getting-started/migration-guide)

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)).


### Getting Started

`pip install dash-ag-grid==2.0.0rc2`

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.
2. See the live [stock portfolio demo app](https://sales-demo.plotly.com/dash-ag-grid) from the webinar hosted by Plotly.
3. Get the code for the demo app in [GitHub](https://github.com/plotly/dash-ag-grid/blob/dev/docs/demo_stock_portfolio.py)
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.
`pip install dash-ag-grid`

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.
2. See the live [stock portfolio demo app](https://sales-demo.plotly.com/dash-ag-grid) from the webinar hosted by Plotly.
3. Get the code for the demo app in [GitHub](https://github.com/plotly/dash-ag-grid/blob/dev/docs/demo_stock_portfolio.py)
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.



### See the docs app live
https://dashaggrid.pythonanywhere.com/
### Documentation
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.
In the meantime you can find them all here: https://dashaggrid.pythonanywhere.com/

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


## Contributing

Dash AG Grid welcomes community contributions!

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.
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.

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.
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/).

### Running the docs app locally
```
Expand All @@ -48,7 +44,6 @@ Then you can run the apps there:
- `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.
- `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.


### Developing in this repo

Make sure you have Dash installed with dev and testing extras:
Expand Down
Loading

0 comments on commit 2eb6882

Please sign in to comment.