Skip to content

[EuiAutoSizer] AutoSizer wrapper and testenv mock#5278

Merged
thompsongl merged 11 commits intoelastic:masterfrom
thompsongl:4446-virtualized
Oct 28, 2021
Merged

[EuiAutoSizer] AutoSizer wrapper and testenv mock#5278
thompsongl merged 11 commits intoelastic:masterfrom
thompsongl:4446-virtualized

Conversation

@thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Oct 15, 2021

Summary

Resolves #4446 by adding a new component that is a wrapper around AutoSizer (react-virtualized-auto-sizer) that can be mocked using the testnev setup, which allows for ensuring calculable dimensions for react-window virtualized components.

  • New EuiAutoSizer component
    • Provides no additional features to AutoSizer
    • Future potential for replacing AutoSizer completely, if we see opportunity
  • testenvmock for EuiAutoSizer
    • Sets default dimensions for Jest environments
    • Default dimensions are arbitrary and open for discussion

As we start to use EuiSelectable in more places, it's important to have better testing output from its underlying components.

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile

  • Checked in Chrome, Safari, Edge, and Firefox
  • Props have proper autodocs and playground toggles
  • Added documentation
  • Checked Code Sandbox works for any docs examples
  • Added or updated jest and cypress tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@thompsongl thompsongl changed the title [EuiAutoSizer] AutoSizer wrapper and testenv mock [EuiAutoSizer] AutoSizer wrapper and testenv mock Oct 15, 2021
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

@thompsongl thompsongl marked this pull request as ready for review October 18, 2021 15:55
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

@thompsongl
Copy link
Contributor Author

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

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

LGTM! Tested component additions/changes in the new docs example

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5278/

@thompsongl thompsongl enabled auto-merge (squash) October 28, 2021 17:16
@thompsongl thompsongl merged commit 932671c into elastic:master Oct 28, 2021
ym pushed a commit to ym/eui that referenced this pull request Oct 29, 2021
* add euiautosizer

* use euiautosizer

* use euiautosizer testenv mock

* CL

* docs

* props table

* simplify wrapper

* add data-eui attr to testenv mock
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.

[EuiSelectable] Testing virtualized options

3 participants