Skip to content

CodeViewer Components (VanillaJS / React)#507

Draft
amadeus wants to merge 66 commits intomainfrom
amadeus/code-viewer
Draft

CodeViewer Components (VanillaJS / React)#507
amadeus wants to merge 66 commits intomainfrom
amadeus/code-viewer

Conversation

@amadeus
Copy link
Copy Markdown
Member

@amadeus amadeus commented Apr 15, 2026

WIP

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pierrejs-diff-demo Ready Ready Preview Apr 23, 2026 11:11pm
pierrejs-docs Ready Ready Preview Apr 23, 2026 11:11pm

Request Review

@amadeus amadeus force-pushed the amadeus/code-viewer branch from 6fa1e6d to f0a2023 Compare April 15, 2026 17:59
@amadeus amadeus force-pushed the amadeus/code-viewer branch 2 times, most recently from 7266b31 to c4fd351 Compare April 15, 2026 21:03
@amadeus amadeus force-pushed the amadeus/code-viewer branch from c4fd351 to 12d2410 Compare April 15, 2026 21:06
@amadeus amadeus force-pushed the amadeus/code-viewer branch from 12d2410 to 12357d6 Compare April 15, 2026 22:11
@amadeus amadeus force-pushed the amadeus/code-viewer branch from 12357d6 to 50c5e6b Compare April 16, 2026 00:14
@amadeus amadeus force-pushed the amadeus/code-viewer branch from 50c5e6b to 9531d44 Compare April 17, 2026 00:03
@amadeus amadeus force-pushed the amadeus/code-viewer branch from 9531d44 to b77f835 Compare April 18, 2026 00:41
@amadeus amadeus force-pushed the amadeus/code-viewer branch from c886f64 to b5ff18a Compare April 18, 2026 23:37
amadeus added 30 commits April 23, 2026 16:08
unclear if this is the right way, but it appears to work for now
There were a bunch of issues unfortunately around fitPerfectly
calculations and also misc problems with scroll anchoring that this
change mostly resolves (I think).
* Ensure a custom tree is only built on fetch (not on annotation change
  like before)
* Hooked up git status to make the list more descriptive
* Misc rebase fixes

file tree refactor fix
Less DOM thrash, better mental model for virtualization, and can work in
noisier situations when animating scroll
A quick algo that will fall back to instant if the distance is more than
10 viewports away
Seems to work great, and requires minimal work... lfgggg
fix a legit bug in scroll anchor

things were falling back to the file/item when a line wasn't fully visible
A mix of a feature request probably and the ability to make CodeViewer
far more elegant in handling of sticky headers
calling instanceChanged on setOptions is probably not worth it since we
control the lifecycle with CodeViewer
* Adds a new stickyHeaders prop to CodeViewer
* Found a ton of issues in the numeric version of scroll anchoring, that
  should hopefully now be resolved.
* Fixed a ton of misc issues related to how different alignments worked
* Fixed tons of bugs with setOptions triggering pendingLayoutAnchor
* Fixed a bug where maxScroll did not include padding
mb fix flakey test?

Actually fix the column out of sync bug

squash me
* Adding paddingTop/Bottom that add flexibility as well remain backwards
  compatible
Along with proper controlled selection 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