Repository navigation
feat(preview): Pass version actions into the comparison banner - #4900
zhirongwang wants to merge 1 commit into
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe versions sidebar registers version actions and state with the comparison preview. The preview selects eligible actions for the compared version, combines them with host banner data, and passes the banner to both panes. It also updates comparison mode and banner props when supported without reloading the preview. ChangesComparison Banner Actions
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant VersionsSidebarContainer
participant ContentPreviewWithComparison
participant selectComparisonBannerActions
participant PreviewPanes
VersionsSidebarContainer->>ContentPreviewWithComparison: register version actions
ContentPreviewWithComparison->>selectComparisonBannerActions: select actions for compared version ID
selectComparisonBannerActions-->>ContentPreviewWithComparison: eligible version actions
ContentPreviewWithComparison->>PreviewPanes: pass combined comparison banner
Suggested reviewers: Merge Risk: ⚪ Minimal · up to
|
The versions sidebar registers download, make current, and delete for the compared version on the existing comparison banner.
2ec8f0c to
b916b80
Compare
|
|
||
| // Sidebar handlers override the host's; a handler the sidebar withholds keeps the host's. | ||
| return { | ||
| ...hostComparisonBanner, |
There was a problem hiding this comment.
Once the sidebar has registered, drop the host's onDownload, onDelete, and onMakeCurrent before applying selectComparisonBannerActions. A withheld action currently leaves the host handler in place, so the compared-pane menu can still download or delete a version the row would not allow.
| ...hostComparisonBanner, | ||
| ...selectComparisonBannerActions(versionActions, comparedVersionId), |
There was a problem hiding this comment.
saw this after leaving my comment above - did we address this? I don't see the changes made in commit d26c70a, they seem to have been removed
Summary
Test Plan
Made with Cursor
Summary by CodeRabbit