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] regression in displaying Arrays and Objects in expand behavior #4957

Closed
Tracked by #5083
mmourafiq opened this issue Jul 16, 2021 · 4 comments · Fixed by #5087
Closed
Tracked by #5083

[EuiDataGrid] regression in displaying Arrays and Objects in expand behavior #4957

mmourafiq opened this issue Jul 16, 2021 · 4 comments · Fixed by #5087

Comments

@mmourafiq
Copy link

It seems like a regression was introduced to the datagrid expand behavior, it adds Row: 3, Column: 6: which was not the case before.

  • Json objects can be tested on this docs page:

Screenshot 2021-07-16 at 10 01 23

  • Arrays before regression:

Screenshot 2021-07-16 at 10 04 38

  • Arrays after regression:

Screenshot 2021-07-16 at 10 04 05

@cchaos
Copy link
Contributor

cchaos commented Jul 16, 2021

Looks like the screen-reader text is accidentally being displayed. I'm thinking that because it's probably getting included within the EuiCodeBlock, it's screen-reader only classes are getting stripped. I'll take a look. Thanks for the report!

@cchaos
Copy link
Contributor

cchaos commented Jul 16, 2021

Looks like #4853 added some wrappers and screen-reader text directly to the cell contents. This contents is what's passed to the popover content and depending on the schema (for code) it all gets wrapped by EuiCodeBlock.

@VladLasitsa Can you take a look at this? I'm unsure what the extra wrappers and screen-reader text is necessary for / where it can be moved to instead.

@cchaos
Copy link
Contributor

cchaos commented Jul 16, 2021

It also looks like these code blocks were formatted better before that PR as well.

Before
Screen Shot 2021-07-16 at 09 57 57 AM

After
Screen Shot 2021-07-16 at 09 56 59 AM

@snide
Copy link
Contributor

snide commented Aug 25, 2021

Looked at this one some. @cchaos has the problem nailed. This is primarily due to the content using innerText which strips out the selectors from the screenreader. Because innerText removes the indentation, this is why the formatting comes in worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants