feat(desktop): add toggle to hide unchanged regions in diff viewer#845
Conversation
Add a fold icon button in the diff viewer toolbar that toggles Monaco's hideUnchangedRegions option. This collapses unchanged code sections to help focus on actual changes. The setting is persisted in the changes store.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request implements a feature to hide unchanged regions in diff views. It introduces a new Changes
Sequence DiagramsequenceDiagram
participant User
participant FileViewerToolbar
participant ChangesStore
participant FileViewerPane
participant FileViewerContent
participant DiffViewer
participant MonacoEditor
User->>FileViewerToolbar: Clicks fold toggle button
FileViewerToolbar->>ChangesStore: onToggleHideUnchangedRegions()
ChangesStore->>ChangesStore: toggleHideUnchangedRegions() updates state
ChangesStore-->>FileViewerPane: state.hideUnchangedRegions updated
FileViewerPane->>FileViewerContent: passes hideUnchangedRegions prop
FileViewerPane->>FileViewerToolbar: passes updated hideUnchangedRegions
FileViewerToolbar-->>User: updates button styling/tooltip
FileViewerContent->>DiffViewer: passes hideUnchangedRegions prop
DiffViewer->>MonacoEditor: configures hideUnchangedRegions option
MonacoEditor-->>User: hides/shows unchanged regions
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Add background and shadow styling to clearly distinguish the active toggle option from inactive ones in the Raw/Diff/Rendered toggle group.
🚀 Preview Deployment🔗 Preview Links
Preview updates automatically with new commits |
Summary
hideUnchangedRegionsoption to focus on actual changesTest plan
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.