Conversation
…ixes PlatformNetwork/bounty-challenge#21919) The 'help:docs' event handler in CortexDesktopLayout was opening an external URL (https://docs.cortex.dev) instead of switching the sidebar to the 'docs' tab. This caused clicking the Documentation button in the Activity Bar to open the sidebar but render an empty panel, because: 1. The Activity Bar's onItemClick handler correctly set sidebarTab to 'docs' (CortexActivityBar.tsx:43 defines id: 'docs') 2. The SidebarTab type already includes 'docs' (types.tsx:1) 3. CortexSidebarContainer already has a <Show when='docs'> block that renders CortexDocumentationPanel (lines 160-164) 4. But the Help > Documentation menu item dispatched 'help:docs' which opened window.open() instead of switching the sidebar tab Fix: Change the 'help:docs' event handler to set sidebarTab('docs') and uncollapse the sidebar, matching the pattern used by view:explorer, view:search, view:git, etc. Also add the Documentation panel to the SidebarNavigation integration test to ensure the docs button correctly renders the panel.
…ixes #21919) - Changed help:docs event handler in CortexDesktopLayout to open the docs sidebar panel (setSidebarTab/setSidebarCollapsed) instead of opening an external URL, making the menu-bar Documentation action consistent with the activity-bar button. - Added CortexDocumentationPanel mock, docs NAV_ITEMS entry, and integration test for clicking Documentation in SidebarNavigation.integration.test.tsx.
Contributor
Author
|
Closing: this fix has already been applied directly to the main branch. The branch is based on an older commit and merging it would regress other fixes. The referenced issue is resolved on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for PlatformNetwork/bounty-challenge#21919: Documentation panel not wired in activity bar
Changes
docstoVALID_SIDEBAR_TABSarray inCortexDesktopLayout.tsxhelp:docsevent handler that sets sidebar tab todocsand opens the sidebarFiles Modified
src/components/cortex/CortexDesktopLayout.tsxsrc/components/cortex/__tests__/SidebarNavigation.integration.test.tsx