Commit Graph

1561 Commits

Author SHA1 Message Date
Nikita Galaiko
77c00a0723 fix warnings 2023-06-26 08:59:28 +02:00
Mattias Granlund
782c808233 Fix broken tray 2023-06-25 18:59:47 +03:00
Mattias Granlund
26180b4827 Set nowrap and ellipsis on hunk rows 2023-06-25 18:33:57 +03:00
Mattias Granlund
8b0b79e43a Fix problem where some files don't remain open
We currently need to explicilty exercise the cache for all files to
update the `expanded` variable that affects rendering.
2023-06-25 17:38:05 +03:00
Mattias Granlund
75b086f12b Update branches on commit/new branch 2023-06-25 15:38:25 +03:00
Scott Chacon
a090263b95
Update a branch name (#514)
Way to update a branch name
2023-06-25 13:01:15 +02:00
idonahue
da776b29b1 spelling error in commented out area 2023-06-25 10:09:09 +03:00
Mattias Granlund
6723a21d1f Make branch name an input element 2023-06-25 09:46:23 +03:00
Mattias Granlund
e7902e310c Make drop zone look more like UI design 2023-06-25 07:17:31 +01:00
Scott Chacon
619384405f
Update Target Branch (#510)
This PR implements a way to update an out of date target branch.

This adds logic to see if the target branch is out of date (if say, origin/master has commits that are not on target.sha) and will show in the UI that the frozen target branch is behind. If this happens, it adds a button to update, which will call an update_branch_target function in Rust.

This function will:

* Check that there is in fact a new commit on the target branch
* Try to merge that new head commit into your current working directory, bailing if it cannot
* If that succeeds (the new upstream can merge cleanly with all your vbranch content), it will then update all your virtual branches
* If the vbranch has no commits, it simply updates the head so the diffs work properly again
* If the vbranch has commits, it will merge the new head into the virtual branch head and write the new merge commit to the vbranch commit list. omg.

The patch also:
* Adds some tests for updating the target
* Calculates merge base on setup
* Only assigns stuff to active branches
* Adds a reset command to make all branches inactive for testing
2023-06-24 21:09:03 -07:00
Mattias Granlund
45bfee1a2b Remember expansion per file
Uses localStorage to store whether or not a file is toggled open. This
implementation behaves well wrt to "expand all", but the is never
flushed so this isn't a shippable solution.
2023-06-24 20:32:24 +01:00
Scott Chacon
e46f3be1a4
Virtual Commits (#507)
* add virtual commits to vbranches, return and render them
* remove file changes from status
2023-06-24 05:07:16 -07:00
Mattias Granlund
6651a605c1 Make the commits section look a bit better
Note that button styles must be global to support dark mode.
2023-06-24 08:57:17 +01:00
Mattias Granlund
e8241fd999 Fix weird container overflow
Without overflow-hidden the branch lane becomes scrollable horizontally.
This feels buggy, but it's unclear what's causing it atm.
2023-06-23 08:19:16 +01:00
Mattias Granlund
4772c1a977 Go directly to branches after selecting project 2023-06-23 07:38:29 +01:00
Mattias Granlund
2199b98714 Update dark/light mode color palettes
This commit updates the color palettes and resets most if not all the
colors on the virtual branch page.
2023-06-22 22:02:04 +01:00
Mattias Granlund
f2356e8d7d Revert "Utility classes for light/dark bg text and border"
This reverts commit c654a2aee9.
2023-06-22 21:45:03 +01:00
Nikita Galaiko
fe44d9ae30 fix old way of moving 2023-06-22 15:37:20 +02:00
Nikita Galaiko
c3248bfee4 assert file format 2023-06-22 15:37:20 +02:00
Kiril Videlov
5e4136591a test frontend in ci too 2023-06-22 14:42:44 +02:00
Kiril Videlov
5cdad0beea a little bit of a typescript testing setup 2023-06-22 14:42:44 +02:00
Nikita Galaiko
b49031b2f2 avoid flakiness 2023-06-22 14:16:44 +02:00
Nikita Galaiko
0b00d67e8f cargo fmt 2023-06-22 14:16:44 +02:00
Nikita Galaiko
28383a6a7e allow to move hunks 2023-06-22 14:16:44 +02:00
Nikita Galaiko
6ce2188142 ownerhip math does not split anymore 2023-06-22 14:16:44 +02:00
Scott Chacon
971059e179
Add basic committing to the client (#484)
* move commit to virtual_branches code, add bridge for JS
* actually run commit() from the client
* simple remote branches list, for later
* better remote branches
* adds more data to remote branches
* test file movement
* added move_files test and remove path from all branches that match
* fix move with duplicate entries
2023-06-22 09:29:17 +02:00
Nikita Galaiko
e839000a0b fix butler status 2023-06-22 08:03:09 +02:00
Mattias Granlund
27dd5a6201 Make page load code a bit more succinct 2023-06-21 16:35:26 +01:00
Nikita Galaiko
4722b1ac32 cargo fmt 2023-06-21 16:39:58 +02:00
Nikita Galaiko
17b45c9a8b test file move 2023-06-21 16:39:58 +02:00
Nikita Galaiko
5be88e8913 remove unused code 2023-06-21 16:39:58 +02:00
Nikita Galaiko
de375879c8 minor rename 2023-06-21 16:39:58 +02:00
Nikita Galaiko
16b98c66d1 use range for the hunk id 2023-06-21 16:39:58 +02:00
Nikita Galaiko
b537aa2bc2 add ownersip math 2023-06-21 16:39:58 +02:00
Nikita Galaiko
d7792a2954 use ownership type 2023-06-21 16:39:58 +02:00
Scott Chacon
7d2f6a4932
remove this duplication (#493) 2023-06-21 15:47:29 +02:00
Nikita Galaiko
d64c2b9bef fix hunk calculation 2023-06-21 15:31:29 +02:00
Kiril Videlov
0570679887 default value if theres nothing? 2023-06-21 15:31:29 +02:00
Scott Chacon
40351431c8 fix hunks 2023-06-21 15:31:29 +02:00
Nikita Galaiko
977c70a802 less dev logs 2023-06-21 13:00:36 +02:00
Mattias Granlund
9b7756b5ce Change anonymous functions to real functions
I have two primary reasons for making this change:
- improve readability by knowing immediately if something is a function
- see function names in stacktraces rather than "anon function"
2023-06-21 11:14:36 +01:00
Kiril Videlov
f2dcf71777 add some placeholders for commiting 2023-06-21 11:36:10 +02:00
Nikita Galaiko
7074f735d7 sanity virtual branch tests 2023-06-21 11:10:18 +02:00
Scott Chacon
c109a91dc5
Merge pull request #481 from gitbutlerapp/sc-vbranch-commits
Send mtime with hunk
2023-06-21 10:55:21 +02:00
Scott Chacon
645bef29b6
Merge branch 'master' into sc-vbranch-commits 2023-06-21 10:50:46 +02:00
Scott Chacon
73e9a8ca7c oops. lint 2023-06-21 10:46:58 +02:00
Scott Chacon
da2ffb795d send mtime as hunk modified time (I think) 2023-06-21 10:38:37 +02:00
Kiril Videlov
c24f55939b collapse all hunks 2023-06-21 10:32:17 +02:00
Nikita Galaiko
658df62053 pnpm format 2023-06-21 10:23:07 +02:00
Nikita Galaiko
e3a7c73bfb branch: types for ownership 2023-06-21 10:23:07 +02:00