aksd: pass setSelectedTab to project header action components#406
aksd: pass setSelectedTab to project header action components#406illume merged 1 commit intoAzure:headlamp-downstreamfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a DOM-event-based mechanism for external UI components to programmatically change the selected tab on the Project Details page.
Changes:
- Introduces a
windowevent listener (navigate-to-deploy-tab) that reads aCustomEvent.detailvalue as the target tab ID. - Updates the selected tab state when a valid tab ID is received.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
b63050b to
03cfcd0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
illume
left a comment
There was a problem hiding this comment.
I don't know if this is the best way to do this... I asked for a review from @sniok Maybe a separate API would be good here... or maybe it's just fine.
I think it's ok, and doing it via an API might take much longer to implement, so approving.
I don't mind trying it that way too -- this doesn't seem urgent, if you'd prefer a different approach |
03cfcd0 to
25a13c2
Compare
yeah -- this seems much better, glad you said something |
25a13c2 to
ceb2006
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
I'd expose |
Summary
ProjectHeaderActioninterface to passsetSelectedTabas a prop to header action componentsType of Change
Changes Made
projectsSlice.ts— AddedsetSelectedTab?: (tabId: string) => voidtoProjectHeaderAction.componentprops interfaceProjectDetails.tsx— PasssetSelectedTabwhen rendering header action componentsWhy props over DOM events
window.dispatchEventTesting
Test Cases
setSelectedTabpropsetSelectedTab('deploy')switches to the Deploy tabRelated to