Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @amanmahajan7 @nstepien
* @grafana/dataviz-squad
74 changes: 57 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ on:
- main
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false

- uses: actions/setup-node@v7
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version-file: 'package.json'
check-latest: true
Expand Down Expand Up @@ -48,7 +53,7 @@ jobs:

- name: Upload test failure artifacts
if: failure()
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: test-artifacts
path: |
Expand All @@ -58,21 +63,56 @@ jobs:
if-no-files-found: ignore

- name: Upload coverage
uses: codecov/codecov-action@v7
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Deploy gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
publish:
name: Publish to NPM
runs-on: ubuntu-latest
needs: [test]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
contents: write # push the release tag
id-token: write # npm trusted publishing
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0

# only publish when package.json version changes - https://github.com/EndBug/version-check
- name: Check version changes
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425 # 2.1.5
id: version_check
with:
diff-search: true

- name: Setup Node for npm registry
if: steps.version_check.outputs.changed == 'true'
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version-file: 'package.json'
check-latest: true
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
if: steps.version_check.outputs.changed == 'true'
run: npm ci

- name: Bundle
if: steps.version_check.outputs.changed == 'true'
run: node --run build

- name: Publish to npm
if: steps.version_check.outputs.changed == 'true'
run: npm publish --tag latest

- name: Push tag and create GitHub release
if: steps.version_check.outputs.changed == 'true'
env:
GH_TOKEN: ${{ github.token }}
NEW_VERSION: ${{ steps.version_check.outputs.version }}
run: |
git config --global user.email 'action@github.com'
git config --global user.name 'GitHub Action'
git fetch origin gh-pages
git worktree add gh-pages gh-pages
cd gh-pages
git rm -r .
mv ../dist/* .
touch .nojekyll
git add .
git commit -m "gh-pages deployment" || echo "Nothing to commit"
git push -f https://comcast:${{secrets.GITHUB_TOKEN}}@github.com/Comcast/react-data-grid.git
git tag "v${NEW_VERSION}"
git push origin "v${NEW_VERSION}"
gh release create "v${NEW_VERSION}" --title "v${NEW_VERSION}" --generate-notes
75 changes: 0 additions & 75 deletions .github/workflows/publish.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/update-screenshots.yml

This file was deleted.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
[![codecov-badge]][codecov-url]
[![ci-badge]][ci-url]

_Note: This package is a Grafana-maintained fork of [react-data-grid](https://github.com/Comcast/react-data-grid), published as `@grafana/react-data-grid`. It adds auto-height support for non-virtualized rendering and a few accessibility improvements on top of upstream._

The DataGrid component is designed to handle large datasets efficiently while offering a rich set of features for customization and interactivity.

## Table of contents
Expand Down Expand Up @@ -881,7 +883,7 @@ function MyGrid() {

Function to generate unique IDs for group rows. If not provided, a default implementation is used that concatenates parent and group keys with `__`.

###### `rowHeight?: Maybe<number | ((args: RowHeightArgs<R>) => number)>`
###### `rowHeight?: Maybe<number | string | ((args: RowHeightArgs<R>) => number)>`

**Note:** Unlike `DataGrid`, the `rowHeight` function receives [`RowHeightArgs<R>`](#rowheightargstrow) which includes a `type` property to distinguish between regular rows and group rows:

Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "react-data-grid",
"version": "7.0.0-beta.60",
"name": "@grafana/react-data-grid",
"version": "7.0.0-beta.59",
"description": "Feature-rich and customizable data grid React component",
"keywords": [
"data grid",
"react"
],
"homepage": "https://github.com/Comcast/react-data-grid#readme",
"bugs": "https://github.com/Comcast/react-data-grid/issues",
"homepage": "https://github.com/grafana/react-data-grid#readme",
"bugs": "https://github.com/grafana/react-data-grid/issues",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/Comcast/react-data-grid.git"
"url": "git+https://github.com/grafana/react-data-grid.git"
},
"files": [
"lib"
Expand All @@ -31,6 +31,9 @@
"default": "./lib/index.js"
}
},
"publishConfig": {
"access": "public"
},
"scripts": {
"start": "vite serve --clearScreen false",
"preview": "vite preview",
Expand Down
Loading