Jesse Duffield
a5f3515ad8
Set groundwork for better disabled reasons with range select
...
Something dumb that we're currently doing is expecting list items
to define an ID method which returns a string. We use that when copying
items to clipboard with ctrl+o and when getting a ref name for diffing.
This commit gets us a little deeper into that hole by explicitly requiring
list items to implement that method so that we can easily use the new
helper functions in list_controller_trait.go.
In future we need to just remove the whole ID thing entirely but I'm too
lazy to do that right now.
2024-01-23 13:03:37 +11:00
Stefan Haller
198ead7c14
Extract a ListRenderer struct
...
I'm doing this not so much because it's a great abstraction, but just because it
will make it much easier to write tests for it.
2023-08-28 14:21:06 +02:00
Stefan Haller
061bfce835
Change length parameter of getDisplayStrings to endIdx
...
It's more natural to work with this way, as we will see later in this branch.
2023-08-28 14:21:06 +02:00
Jesse Duffield
06be88aef7
Use fields rather than methods on worktrees
...
I would prefer to use methods to keep things immutable but I'd rather be consistent with the other
models and update them all at once
2023-07-30 18:35:24 +10:00
Jesse Duffield
de57cfd6ff
Remove IO logic from presentation code for worktrees
...
We're doing all the IO in our workers loader method so that we don't need to do any
in our presentation code
2023-07-30 18:35:24 +10:00
Jesse Duffield
277142fc4b
Add worktree integration tests
2023-07-30 18:35:23 +10:00
Jesse Duffield
0604e43813
Move worktrees tab to files window
2023-07-30 18:35:23 +10:00
Jesse Duffield
142f06357f
Fix filtering logic in worktrees view
2023-07-30 18:35:22 +10:00
Jesse Duffield
e8ec41fb0f
Refactor
2023-07-30 18:35:22 +10:00
Joel Baranick
db02c13bf6
Address PR comments
2023-07-30 18:35:21 +10:00
Joel Baranick
c679fd1924
Style missing worktree as red and display better error when trying to switch to them
...
Use a broken link icon for missing worktrees
2023-07-30 18:35:21 +10:00
Joel Baranick
f8ba899b87
Initial addition of support for worktrees
2023-07-30 18:35:21 +10:00