Skip to content

[EuiTable] Fix shadow styles for mobile tables#9115

Merged
mgadewoll merged 3 commits intoelastic:mainfrom
mgadewoll:table/fix-mobile-shadow-styles
Oct 16, 2025
Merged

[EuiTable] Fix shadow styles for mobile tables#9115
mgadewoll merged 3 commits intoelastic:mainfrom
mgadewoll:table/fix-mobile-shadow-styles

Conversation

@mgadewoll
Copy link
Copy Markdown
Contributor

@mgadewoll mgadewoll commented Oct 15, 2025

Summary

This PR is a follow-up to #9088 which introduced changes to the EUI shadow utils.
The automatically added floating border in dark mode does not work as expected for the current table markup, as the pseudo element border won't be applied correctly and additional nesting in tables is not allowed as valid HTML.

Instead, this PR removes the automatic floating border and applies a full border styling.

Additionally it fixes an issue with overlapping shadows of expanded rows. This issue existed previous to the shadow updates, but the new shadows enhance the issue.

Why are we making this change?

💅 UI consistency: Fixes/Prevents visual issues.

Screenshots #

before after
Screenshot 2025-10-15 at 09 52 13 Screenshot 2025-10-15 at 09 52 50
Screenshot 2025-10-15 at 10 40 49 Screenshot 2025-10-15 at 10 40 57

Impact to users

🟢 There are no changes needed on consumer side.

QA

  • verify that mobile tables in dark mode have a full border applied (Story)
  • verify that the shadow of expanded rows doesn't overlap the previous sibling row (Story)
  • verify there is no unexpected regression between production and this PR

General checklist

  • Browser QA
    • Checked in both light and dark modes
    • Checked in both MacOS and Windows high contrast modes
    • Checked in mobile
    • Checked in Chrome, Safari, Edge, and Firefox
    • Checked for accessibility including keyboard-only and screenreader modes
  • Docs site QA
  • Code quality checklist
  • Release checklist
    • A changelog entry exists and is marked appropriately.
    • If applicable, added the breaking change issue label (and filled out the breaking change checklist)
  • Designer checklist
    • If applicable, file an issue to update EUI's Figma library with any corresponding UI changes. (This is an internal repo, if you are external to Elastic, ask a maintainer to submit this request)

@mgadewoll mgadewoll self-assigned this Oct 15, 2025
@mgadewoll mgadewoll force-pushed the table/fix-mobile-shadow-styles branch from 260a926 to 6f51707 Compare October 15, 2025 10:06
@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@elasticmachine
Copy link
Copy Markdown
Collaborator

💚 Build Succeeded

History

cc @mgadewoll

@mgadewoll mgadewoll marked this pull request as ready for review October 15, 2025 14:06
@mgadewoll mgadewoll requested a review from a team as a code owner October 15, 2025 14:06
@tkajtoch tkajtoch self-requested a review October 15, 2025 21:15

/* prevent the shadow from overlapping;
NOTE: we might want to consider refactoring tables to use tbody grouping to apply styles for a row group */
clip-path: polygon(-50% 0, 150% 0, 150% 100vh, -50% 100vh);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

Copy link
Copy Markdown
Member

@tkajtoch tkajtoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look and work great! I compared all EuiBasicTable stories against production and found no regressions in any viewport size

@mgadewoll mgadewoll merged commit d788096 into elastic:main Oct 16, 2025
6 checks passed
@mgadewoll mgadewoll deleted the table/fix-mobile-shadow-styles branch October 16, 2025 16:00
acstll added a commit to elastic/kibana that referenced this pull request Oct 23, 2025
- `@elastic/eui`: `v107.0.0` ⏩ `v107.0.1`
- `@elastic/eslint-plugin-eui`: `v2.4.0` ⏩ `v2.5.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---

## Changes

Related to elastic/eui#9100

- Updated snapshot f90ae29
- Added missing `aria-label` for `EuiBetaBadge`
  - [Reporting] 6d10edd
  - [ML] ce58009
- Added new translation key, ran `node scripts/i18n_check` — is there
anything else that should be done in this regard?

## Package updates

### `@elastic/eui`
[`v107.0.1`](https://github.com/elastic/eui/releases/v107.0.1)

**Bug fixes**

- Fixed `prismjs` theme in `EuiCodeBlock` to improve highlighting for
the `yaml` language ([#9089](elastic/eui#9089))
- Fixed a visual bug on `EuiTable` where the border for rows in dark
mode wasn't applied correctly
([#9115](elastic/eui#9115))

**Dependency updates**

- Updated `@elastic/prismjs-esql` to v1.1.2
([#9102](elastic/eui#9102))

**Accessibility**

- Fixed incorrect role attribute on `EuiIcon` and `EuiBetaBadge`
([#9100](elastic/eui#9100))
- Make `EuiBasicTable` respect user's reduced motion setting by not
animating when in loading state.
([#9095](elastic/eui#9095))

### `@elastic/eslint-plugin-eui`
[`v2.5.0`](https://github.com/elastic/eui/blob/main/packages/eslint-plugin/changelogs/CHANGELOG_2025.md#v250)

- Added new `accessible-interactive-element` rule.
([#9093](elastic/eui#9093))
- Added new `tooltip-focusable-anchor` rule.
([#9051](elastic/eui#9051))
- Excluded `EuiButtonEmpty` from the `no-unnamed-interactive-element`
rule. ([#9046](elastic/eui#9046))

**Bug fixes**

- Fixed `no-css-color` rule to allow CSS keywords like `currentcolor`,
`transparent`, and `inherit`
([#9092](elastic/eui#9092))

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants