We have gone a bit back and forth here, but this should be the right way of handling locks wrt to dragging.
- uses dropzone accept call to dynamically block locked hunks/files
There are no doctests and it's unlikely there will be anytime soon
as this library isn't for publishing.
The binaries did try to build unit-tests as well even though these
aren't quite feasible, so they are disabled now to reduce clutter.
* fix: draggable scroll triggered too early
the triggerRange set to fixed number because it was getting triggered too soon on small screens.
* `shaky` animation renamed + deleted unused CSS
The drag cloning selector can be used in different branches, so we can to restrict our dom query to only the parent container of the file being dragged.
- copies most things from `ProblemLoadingRepo`
- `maybeGetContext` function now necessary for project selector
- throw expected error in layout.ts if loading project fails
This commit needlessly entangles two changes, but they are part of the same effort. We replace the use of props for passing selected files and selected ownership with context getters.
Landing this now since it's functionally much better than before, but this code needs more work. We are currently using a store on the `FileSelection` object essentially for retriggering checks, it has a smell to it.
Note that the reason selectedFileIds is separate from selectedFiles is that our file objects mutate with every update from the back end. That's why until now has been clearing quite often.
TODO: Rename `SelectedOwnership` to something more true to its function
- Adds a new configuration key `gitbutler.diffLengthLimit` to allow users to
customize the diff length limit
- Adds a method `getDiffLengthLimitConsideringAPI` to return the diff length
limit with a specified upper bound of characters in order to not inundate the
API
- Updates the `buildClient` and `summarizeCommit`/`summarizeBranch` methods to
use the new `getDiffLengthLimitConsideringAPI` method
feat: Add a `showCountActions` prop to the TextBox component
- Adds a new prop `showCountActions` to the TextBox component to display
character count actions (e.g., min/max length indicators)
Extract repeated config access into separate methods. Introduce
variables to clarify the meaning of complex conditional statements.
The changes make the code easier to understand and maintain without
altering its behavior.