Closed Alphare closed 1 year ago
Awesome work on this, thanks a lot!
I got it working locally, looks really good so far. I'm adding some comments here and there with some ideas.
As for the context, I think indentation lookup should work, no? That sounds like it'd be the easiest to implement.
If you get a chance, you can check out https://github.com/xfbs/diff.rs/tree/small-context, I've rebased your branch and unified the changes
and the context_ranges
into a FileDiff
type.
Thanks, hopefully I'll get a chance to work on it before tomorrow. :)
I've fought a very nasty use_state
-related bug that turned out to be due to the lack of key
in the diff list. A (late) evening well spent, heh.
I've also fixed a couple of bugs, I'm hoping to get this to an upstream-able state tomorrow, no promises though.
I lied, I cleaned up the PR because it wasn't that much work. I think this can be merged in this state, with improvements to both usability and style (because it's ugly) coming later (as said in the commits), what do you think?
I think this looks really good. I saw that previously it would not show button to expand on files where there weren't any changes, but that's now fixed. I think we're good to merge this one. Awesome work!
This is a draft, I have a working state after a long session and I haven't had time to really polish, clean up the code or make real commits. I wanted to give you a change to give your feedback for the general feel of it.
Should address most of what #7 asked for. It's still not as good as I'd like it to be: we should be able to show fewer lines of context than the entire folded group, as well as provide the most relevant folded line (generally function or struct etc., which requires some language-level semantics, or just plain indentation lookup).
It's way too late to be up, sorry for rambling, I'll get some sleep.