[EuiSideNav] Migrate from class to function component#9533
[EuiSideNav] Migrate from class to function component#9533CollegeRideOut wants to merge 2 commits intoelastic:mainfrom
Conversation
|
👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually? |
|
buildkite test this |
There was a problem hiding this comment.
Pull request overview
Migrates EuiSideNav from a stateless class component using withEuiTheme to a function component using hooks, aligning it with modern EUI patterns and closing #9475.
Changes:
- Converted
EuiSideNavfrom class to function component - Replaced
withEuiThemewithuseEuiTheme - Replaced
defaultPropswith default values in props destructuring
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
|
buildkite test this |
💔 Build Failed
Failed CI StepsHistory
|
💔 Build Failed
Failed CI StepsHistory
|
weronikaolejniczak
left a comment
There was a problem hiding this comment.
The CI is failing at the Linting step. It's because there's a syntax issue in packages/eui/src/components/side_nav/side_nav.tsx. @CollegeRideOut could you update it? 🙏🏻
Summary
What: Convert
EuiSideNavfrom a class component to a function component.Why: Closes #9475
How:
Replaced the class component with a function component using hooks
Removed
withEuiThemeHOC and replaced it withuseEuiThemePreserved existing behavior and structure
Replaced
defaultPropswith default values in props destructuringAPI Changes
component / parent | prop / child | change | description -- | -- | -- | -- N/A | | None | No public API changesImpact Assessment
🔴 Breaking changes
💅 Visual changes
🧪 Test impact
🔧 Hard to integrate
Impact level: 🟢 None
QA instructions for reviewer
Verify
EuiSideNavrenders as expectedConfirm navigation items expand/collapse correctly
Ensure no visual or behavioral regressions
Checklist before marking Ready for Review
## SummaryFilled out all sections above
What: Convert
EuiSideNavfrom a class component to a function component.Why: Closes [#9475](#9475)
How:
withEuiThemeHOC and replaced it withuseEuiThemedefaultPropswith default values in props destructuringAPI Changes
Impact level: 🟢 None
QA instructions for reviewer
EuiSideNavrenders as expectedChecklist before marking Ready for Review
This Message was generated by AI. Also I used AI tools when working on this but I did all the changes myself (locally my yarn lint was not working, but I did run prettier before commiting)