[Controls] Clear indicate related panel state when entering/exiting edit mode or flyout#273760
Conversation
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthrough
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Heenawter
left a comment
There was a problem hiding this comment.
Code review + tested locally. Left a few nits, but overall the fix is straightforward
| // Clear related panels indicator ID when closing overlays as well. If the user is editing a panel | ||
| // and selects a control to indicate its related panels, then exits edit mode, they're probably thinking of | ||
| // the indication state to be part of the edit operation and expect it to clear | ||
| setRelatedPanelsIndicatorId(undefined); |
There was a problem hiding this comment.
nit I think this comment is good enough but 🤷
| // Clear related panels indicator ID when closing overlays as well. If the user is editing a panel | |
| // and selects a control to indicate its related panels, then exits edit mode, they're probably thinking of | |
| // the indication state to be part of the edit operation and expect it to clear | |
| setRelatedPanelsIndicatorId(undefined); | |
| // Clear related panels indicator ID when closing overlays as well |
There was a problem hiding this comment.
Maybe worth adding a unit test for the view mode case?
💛 Build succeeded, but was flaky
Failed CI Steps
Test Failures
Metrics [docs]Async chunks
History
|
…dit mode or flyout (elastic#273760) ## Summary Quick UX fix followup to elastic#264426. User reported confusion when: 1. Editing a panel 2. Clicking an ES|QL control to indicate related panels 3. Closing the edit window and seeing all the related panels remain highlighted This is because the `relatedPanelsIndicatorId` is set independently of opening or closing an edit flyout. This PR makes sure to clear the indicator ID when entering or leaving an edit flyout.
Summary
Quick UX fix followup to #264426. User reported confusion when:
This is because the
relatedPanelsIndicatorIdis set independently of opening or closing an edit flyout. This PR makes sure to clear the indicator ID when entering or leaving an edit flyout.