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

[EuiDataGrid] Provide row elements to wrap cells #5285

Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3de3ce9
Provide rows for datagrid cells to be owned by
chandlerprall Sep 23, 2021
4594779
Merge branch 'master' into bug/4474-datagrid-row-accessibility
chandlerprall Sep 27, 2021
04d3ab5
changelog
chandlerprall Sep 27, 2021
9a6dc07
Merge branch 'master' into bug/4474-datagrid-row-accessibility
chandlerprall Oct 5, 2021
f786f5f
undoing things
chandlerprall Oct 5, 2021
06ac499
working except virtualized container
chandlerprall Oct 6, 2021
0129ea4
working row wrapper implementation
chandlerprall Oct 7, 2021
c05b457
Create datagrid row elements on-demand and render cells via portals
chandlerprall Oct 19, 2021
179da4a
Provide rows for datagrid cells to be owned by
chandlerprall Sep 23, 2021
24f5c53
changelog
chandlerprall Sep 27, 2021
a2ccb72
undoing things
chandlerprall Oct 5, 2021
eb4344c
working except virtualized container
chandlerprall Oct 6, 2021
535a2a9
working row wrapper implementation
chandlerprall Oct 7, 2021
9151350
Create datagrid row elements on-demand and render cells via portals
chandlerprall Oct 19, 2021
814feb1
Small style cleanup
chandlerprall Oct 19, 2021
95b7008
updated changelog
chandlerprall Oct 19, 2021
0ba3a02
updated changelog
chandlerprall Oct 19, 2021
1569aa0
fixing a bad changelog merge
chandlerprall Oct 19, 2021
9a6df52
oh that style was important
chandlerprall Oct 19, 2021
ae336f9
Update src/components/datagrid/body/data_grid_row_manager.ts
chandlerprall Oct 26, 2021
8dc8ad4
Update src/components/datagrid/data_grid_types.ts
chandlerprall Oct 26, 2021
7633c1b
Ensure unique ID in combobox with prepended or appended labels (#5229)
1Copenut Oct 19, 2021
c3e8b49
update i18ntokens
chandlerprall Oct 19, 2021
5ac481f
40.0.0
chandlerprall Oct 19, 2021
e0dd86e
Updated documentation.
chandlerprall Oct 19, 2021
ca721f2
Add combined Jest+Cypress code coverage reports (#5262)
constancecchen Oct 20, 2021
86af5ba
[EuiMarkdownEditor] Add `remark-breaks` and line break plugin (#5272)
i-a-n Oct 20, 2021
2553d89
[Docs] Separated out Borders to its own page & [EuiTableRowCell] fixe…
cchaos Oct 20, 2021
fdc387e
Fix CL from #5272
cchaos Oct 25, 2021
d468c85
[Docs] Update EuiDatePicker types (#5318)
thompsongl Oct 25, 2021
dea1eb9
[Cypress] Add flakey test retries + harden intermittent context menu …
constancecchen Oct 25, 2021
c995387
[Docs] Fix Colors guidelines (#5316)
thompsongl Oct 26, 2021
a60d734
Update dependency @elastic/charts to ^38.1.0 (#5321)
renovate[bot] Oct 26, 2021
ae515b6
PR feedback
chandlerprall Oct 26, 2021
f5b02ef
Added a cypress test for datagrid row rendering
chandlerprall Nov 1, 2021
82614cf
Merge branch 'master' into bug/4474-datagrid-row-accessibility-alternate
chandlerprall Nov 1, 2021
8336957
Merge branch 'master' into bug/4474-datagrid-row-accessibility-alternate
chandlerprall Nov 1, 2021
baa7b25
Revert changes(?) to docs/
chandlerprall Nov 1, 2021
937403e
revert changelog reformats
chandlerprall Nov 1, 2021
705edad
re-ignore a couple datagrid example pages when running a11y tests
chandlerprall Nov 2, 2021
55a5f95
Alternate way to know if the datagrid cells have rendered
chandlerprall Nov 3, 2021
420b37d
Merge branch 'main' into bug/4474-datagrid-row-accessibility-alternate
chandlerprall Nov 4, 2021
ad5c72b
PR feedback
chandlerprall Nov 4, 2021
6d10f54
changelog
chandlerprall Nov 5, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Fixed styling of `align: center` for mobile version of `EuiTableRowCell` ([#5323](https://github.com/elastic/eui/pull/5323))
- Fixed `endDateControl` `className` in `EuiDatePickerRange` ([#5329](https://github.com/elastic/eui/pull/5329))
- Fixed `EuiMarkdownEditor` intercepting all drop events on the page ([#5340](https://github.com/elastic/eui/pull/5340))
- - Fixed an accessibility issue where `EuiDataGrid` cells weren't owned by `role=row` elements ([#5285](https://github.com/elastic/eui/pull/5285))
chandlerprall marked this conversation as resolved.
Show resolved Hide resolved

**Breaking changes**

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"test-unit": "cross-env NODE_ENV=test jest --config ./scripts/jest/config.json",
"test-a11y": "node ./scripts/a11y-testing",
"test-staged": "yarn lint && node scripts/test-staged.js",
"test-cypress": "cross-env NODE_ENV=cypress_test cypress run-ct",
"test-cypress-dev": "cross-env NODE_ENV=cypress_test cypress open-ct",
"test-cypress": "cross-env BABEL_MODULES=false NODE_ENV=cypress_test cypress run-ct",
"test-cypress-dev": "cross-env BABEL_MODULES=false NODE_ENV=cypress_test cypress open-ct",
"combine-test-coverage": "sh ./scripts/combine-coverage.sh",
"start-test-server": "BABEL_MODULES=false NODE_ENV=puppeteer NODE_OPTIONS=--max-old-space-size=4096 webpack-dev-server --config src-docs/webpack.config.js --port 9999",
"yo-component": "yo ./generator-eui/app/component.js",
Expand Down
6 changes: 0 additions & 6 deletions scripts/a11y-testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@ const docsPages = async (root, page) => {
`${root}#/forms/color-selection`,
`${root}#/forms/date-picker`,
`${root}#/forms/super-date-picker`,
`${root}#/tabular-content/data-grid`,
`${root}#/tabular-content/data-grid-in-memory-settings`,
`${root}#/tabular-content/data-grid-schemas-and-popovers`,
`${root}#/tabular-content/data-grid-focus`,
`${root}#/tabular-content/data-grid-styling-and-control`,
`${root}#/tabular-content/data-grid-control-columns`,
`${root}#/tabular-content/data-grid-footer-row`,
`${root}#/tabular-content/data-grid-virtualization`,
`${root}#/tabular-content/data-grid-row-heights-options`,
];
Expand Down
34 changes: 34 additions & 0 deletions src/components/datagrid/__snapshots__/data_grid.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,7 @@ Array [
tabindex="0"
>
<div
data-test-subj="euiDataGridBody"
style="width:100%;height:100%;overflow:hidden"
>
<div
Expand Down Expand Up @@ -1130,6 +1131,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn"
data-gridcell-id="0,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -1157,6 +1159,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn"
data-gridcell-id="0,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -1184,6 +1187,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--firstColumn"
data-gridcell-id="1,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -1211,6 +1215,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--lastColumn"
data-gridcell-id="1,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -1238,6 +1243,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn"
data-gridcell-id="2,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:68px;height:34px;width:100px"
Expand Down Expand Up @@ -1265,6 +1271,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn"
data-gridcell-id="2,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:68px;height:34px;width:100px"
Expand Down Expand Up @@ -1433,6 +1440,7 @@ Array [
tabindex="0"
>
<div
data-test-subj="euiDataGridBody"
style="width:100%;height:100%;overflow:hidden"
>
<div
Expand Down Expand Up @@ -1556,6 +1564,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn euiDataGridRowCell--controlColumn"
data-gridcell-id="0,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:0px;height:34px;width:50px"
Expand Down Expand Up @@ -1602,6 +1611,7 @@ Array [
</div>
<div
class="euiDataGridRowCell"
data-gridcell-id="0,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:50px;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -1629,6 +1639,7 @@ Array [
</div>
<div
class="euiDataGridRowCell"
data-gridcell-id="0,2"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:150px;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -1656,6 +1667,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn euiDataGridRowCell--controlColumn"
data-gridcell-id="0,3"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:250px;top:0px;height:34px;width:50px"
Expand Down Expand Up @@ -1702,6 +1714,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--firstColumn euiDataGridRowCell--controlColumn"
data-gridcell-id="1,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:34px;height:34px;width:50px"
Expand Down Expand Up @@ -1748,6 +1761,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe"
data-gridcell-id="1,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:50px;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -1775,6 +1789,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe"
data-gridcell-id="1,2"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:150px;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -1802,6 +1817,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--lastColumn euiDataGridRowCell--controlColumn"
data-gridcell-id="1,3"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:250px;top:34px;height:34px;width:50px"
Expand Down Expand Up @@ -1848,6 +1864,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn euiDataGridRowCell--controlColumn"
data-gridcell-id="2,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:68px;height:34px;width:50px"
Expand Down Expand Up @@ -1894,6 +1911,7 @@ Array [
</div>
<div
class="euiDataGridRowCell"
data-gridcell-id="2,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:50px;top:68px;height:34px;width:100px"
Expand Down Expand Up @@ -1921,6 +1939,7 @@ Array [
</div>
<div
class="euiDataGridRowCell"
data-gridcell-id="2,2"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:150px;top:68px;height:34px;width:100px"
Expand Down Expand Up @@ -1948,6 +1967,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn euiDataGridRowCell--controlColumn"
data-gridcell-id="2,3"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:250px;top:68px;height:34px;width:50px"
Expand Down Expand Up @@ -2132,6 +2152,7 @@ Array [
tabindex="0"
>
<div
data-test-subj="euiDataGridBody"
style="width:100%;height:100%;overflow:hidden"
>
<div
Expand Down Expand Up @@ -2227,6 +2248,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn"
data-gridcell-id="0,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -2254,6 +2276,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn"
data-gridcell-id="0,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -2281,6 +2304,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--firstColumn"
data-gridcell-id="1,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -2308,6 +2332,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--lastColumn"
data-gridcell-id="1,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -2335,6 +2360,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn"
data-gridcell-id="2,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:68px;height:34px;width:100px"
Expand Down Expand Up @@ -2362,6 +2388,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn"
data-gridcell-id="2,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:68px;height:34px;width:100px"
Expand Down Expand Up @@ -2527,6 +2554,7 @@ Array [
tabindex="0"
>
<div
data-test-subj="euiDataGridBody"
style="width:100%;height:100%;overflow:hidden"
>
<div
Expand Down Expand Up @@ -2620,6 +2648,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn"
data-gridcell-id="0,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -2647,6 +2676,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn"
data-gridcell-id="0,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:0px;height:34px;width:100px"
Expand Down Expand Up @@ -2674,6 +2704,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--firstColumn"
data-gridcell-id="1,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -2701,6 +2732,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--stripe euiDataGridRowCell--lastColumn"
data-gridcell-id="1,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:34px;height:34px;width:100px"
Expand Down Expand Up @@ -2728,6 +2760,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--firstColumn"
data-gridcell-id="2,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:68px;height:34px;width:100px"
Expand Down Expand Up @@ -2755,6 +2788,7 @@ Array [
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--lastColumn"
data-gridcell-id="2,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:100px;top:68px;height:34px;width:100px"
Expand Down
1 change: 1 addition & 0 deletions src/components/datagrid/_data_grid_data_row.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.euiDataGridRow {
// needed for footer cells to correctly position
display: flex;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

exports[`EuiDataGridBody renders 1`] = `
<div
data-test-subj="euiDataGridBody"
style="width:100%;height:100%;overflow:hidden"
>
<div
Expand Down Expand Up @@ -89,6 +90,7 @@ exports[`EuiDataGridBody renders 1`] = `
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--boolean euiDataGridRowCell--firstColumn"
data-gridcell-id="0,0"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:0;top:0px;height:34px;width:20px"
Expand Down Expand Up @@ -118,6 +120,7 @@ exports[`EuiDataGridBody renders 1`] = `
</div>
<div
class="euiDataGridRowCell euiDataGridRowCell--string euiDataGridRowCell--lastColumn"
data-gridcell-id="0,1"
data-test-subj="dataGridRowCell"
role="gridcell"
style="position:absolute;left:20px;top:0px;height:34px"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ exports[`EuiDataGridCell renders 1`] = `
>
<div
className="euiDataGridRowCell"
data-gridcell-id="0,0"
data-test-subj="dataGridRowCell"
onBlur={[Function]}
onFocus={[Function]}
Expand Down
Loading