Thanks to visit codestin.com
Credit goes to github.com

Skip to content

style: clean up diff viewer modal and add markdown scroll sync#26

Merged
wesbillman merged 4 commits intomainfrom
baxen/diff-style
Feb 11, 2026
Merged

style: clean up diff viewer modal and add markdown scroll sync#26
wesbillman merged 4 commits intomainfrom
baxen/diff-style

Conversation

@baxen
Copy link
Collaborator

@baxen baxen commented Feb 11, 2026

Summary

Polishes the diff viewer modal UI and adds scroll synchronization for markdown preview mode.

Changes

Modal styling (DiffModal.svelte)

  • Remove the header bar; float the close button in the top-right corner instead
  • Make the modal flush with the top of the viewport (no gap above)
  • Remove rounded corners and inner borders for a cleaner full-screen feel
  • Register keydown listener via onMount for reliable Esc handling

Diff viewer styling (DiffViewer.svelte)

  • Replace emoji/text icons (📄, { }) with Lucide FileText / Code icons for the markdown preview toggle
  • Remove several subtle borders (pane headers, annotation overlays, sidebar) to reduce visual noise

Markdown scroll sync (new: markdownScrollSync.ts)

  • Proportional scroll sync between the before/after markdown preview panes
  • When one pane scrolls to X% of its content, the other follows
  • Uses a syncing guard + requestAnimationFrame to prevent feedback loops
  • Wired up via a Svelte $effect that activates only in markdown preview mode

baxen and others added 4 commits February 10, 2026 21:14
Remove border outlines from modal, sidebar, pane headers, and toolbars
(background colors handle visual separation). Restyle modal as full-width
banner with top padding to clear window controls. Replace header bar with
floating close button in top-right corner. Remove redundant "N files
changed" count (already shown in sidebar). Add Escape key listener via
onMount for reliable modal dismissal.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Replace emoji (📄) and text ({ }) with proper Lucide FileText and Code
icons in the markdown preview toggle buttons, consistent with the rest
of the app's icon usage.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Reduce modal backdrop top padding from 52px to 40px to match the actual
top bar height, eliminating the awkward gap that exposed a sliver of the
main page. Remove top border-radius so the modal sits flush against the
top bar.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Implement proportional scroll sync between the before/after panes in
markdown rich preview mode. When one pane scrolls to X% of its content,
the other follows to the same proportion. The algorithm is standalone in
markdownScrollSync.ts with a feedback-loop guard via rAF.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@wesbillman wesbillman merged commit 6a47261 into main Feb 11, 2026
2 checks passed
@wesbillman wesbillman deleted the baxen/diff-style branch February 11, 2026 06:44
loganj added a commit that referenced this pull request Feb 26, 2026
Refine In Review UI rendering and sidebar behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants