Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
6350ece to
94e8ced
Compare
94e8ced to
86b55ff
Compare
07722dd to
ed0d735
Compare
ed0d735 to
d645a49
Compare
ca7f833 to
0e0e21e
Compare
0e0e21e to
6ff6382
Compare
I tried to get AI to do this, but it really sucked, so I did it myself. The main goal of this commit is to handle the post render reconciliation. So utilizing many of the APIs from the simple virtualizer, with a few tweaks, we can effectively dynamically adjust the offsets to ensure that we are positioned properly. This does not include scroll anchoring yet, which is another issue and it also doesn't manage if things resize between renders, which I think we'll use a resize observer on the sticker container thing to manage that, but still more work to be done. I am noticing pretty heavy render times in some more extreme cases, so there's probably still a lot of work to do in that regard.
This might be the final functional thing required for this shit... Now i need to test if annotations can work...
This reverts commit 6ff6382.
This is step 1 of this new idea I had to productize this into a code viewer component, that can be used to render tons of shit, and virtualize really nicely
Adding some new specs for the how to control layout/padding and how it gets calculated. At a high level basically we are using margins on the overall height container to define padding (this makes it much easier to figure out sticky state). Then we have a new custom property for gap between files/diffs, which utilizes flex gap for layout. This also simplifies a bunch of the math which is quite nice. Next up we need to rename `fileGap` since it's really now more of an internal padding thing
some ai slop, and some ai iteration to get things potentially setup for the react component.
The main goal here was a bit of a sidequest to get CodeViewer more performant by doing a better job of batching various dom operations to hopefully alleviate unneeded layouts in heavy updates. This is not a perfect solution, but I think on it's own it might offer a solid number of improvements.
* optimize cleanup
* The aggressive innerHTML/textContent cleanups are probably not
necessary and can add much unneeded overhead under aggressively
scrolled situations
* apis to allow manager setups to be deferred (to avoid some layout
thrashing)
* enableLineSelection does cause some thrash if there are no
selections, so we should look into muxing that prop in better
instead of applying it as a dom write after the update...
Alright, this one was definitely a doozy, I had to add a lot of stuff to be able to properly support react components, but I think that also it'll really help out with the vanilla JS implementations. I will probably need to eventually add a good testbed for CodeViewer vanilla js as well so we can easily go between. This does not include a more imperative implementation for data right now, forcing user to manually update the entire data structure... which isn't great. That might be the next case that I'll want to utilize
Wasn't matching diffs, lol, what a flub
Also remove a bunch of the deprecated HoverUtility stuff
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.
WIP