Sebastian Thiel
91a6a3a879
doc: add information on how to use the new error types, and what to consider.
2024-04-01 17:41:31 +02:00
Sebastian Thiel
2aaacdfca7
chore: remove legacy error in favor of new error system
2024-04-01 17:33:14 +02:00
Sebastian Thiel
d0db6a67df
use the new 'app' error type everywhere
2024-04-01 16:19:09 +02:00
Sebastian Thiel
b7b73ec0c9
feat: an application error for use with Tauri, from anyhow
and thiserror
.
2024-04-01 16:14:34 +02:00
Sebastian Thiel
eba6bc1cef
feat: add error::Code
and ways to attach them in anyhow.
2024-04-01 16:14:34 +02:00
Sebastian Thiel
136a998623
chore: cleanup core::error
and app::error
...
* Remove `app` specific portions in core that were unused.
* Remove unused error-context and sentry integration which was unused everywhere.
2024-04-01 16:14:34 +02:00
Mattias Granlund
f614f739ae
Make more type conversion implicit in commands.rs
2024-04-01 15:52:51 +02:00
Mattias Granlund
139d535b36
Fix lint errors in SyncButton
2024-04-01 15:29:12 +02:00
Mattias Granlund
8d2fe6574d
Disable merge button when PR state != 'clean'
...
These parameters don't seem well document, but looks like we should only enable merge button when it's mergeable_state == 'clean'
2024-04-01 15:29:02 +02:00
Mattias Granlund
e93149d9a8
Refactor onwership.ts
...
- replaces a set with a map so we can use hunk hash in api calls
- shortens method names, e.g. `addHunk` -> `add`
2024-04-01 15:22:33 +02:00
Mattias Granlund
402dbf5253
Update ownership when branch updates
...
This likely fixes the empty commit bug experienced by some users. It would be incorrect to create this ownership store once and never update it.
2024-04-01 15:22:33 +02:00
Kiril Videlov
c584312c98
Merge pull request #3387 from gitbutlerapp/add-use-toml-state
...
feature flag for reading vbranch state from the toml file
2024-04-01 00:34:09 +02:00
Kiril Videlov
d94542d0c7
if use_state_handle enabled get state from toml
2024-04-01 00:21:07 +02:00
Kiril Videlov
a1bd1fafea
adds list branches & check file exists for vb state handle
2024-04-01 00:20:11 +02:00
Kiril Videlov
7a4dc32ba7
add toml state to branch and target readers
...
This allows reading to happen from either the meta git repo or the toml file
2024-03-31 23:07:44 +02:00
Kiril Videlov
a57ba4c683
add feature flag for reading vbs from toml
2024-03-31 22:21:04 +02:00
Kiril Videlov
e9b4ef3249
Merge pull request #3384 from gitbutlerapp/virtual-branches-writer-refactor-1
...
refactor: move VirtualBranchesHandle construction out of branch reader/writer
2024-03-31 01:01:32 +01:00
Kiril Videlov
04e6d2d7d7
fix test
2024-03-31 00:43:26 +01:00
Kiril Videlov
3d831c8527
fix: ci for gitbutler-core
...
testing shit
2024-03-31 00:21:13 +01:00
Kiril Videlov
de181f2107
refactor: move VirtualBranchesHandle construction out of branch reader/writer
...
When the migration is complete there will be no branch/target reader/writer. For now, inject the handle
2024-03-30 23:56:33 +01:00
Pavel Laptev
c85c1e9758
Style fixes ( #3383 )
...
* style update: segmented control for `Changes`
* style fix: hunk lines overlap with another class
2024-03-30 23:40:30 +01:00
Kiril Videlov
f5ebbdfc09
Merge pull request #3382 from gitbutlerapp/fix-publishing
...
revert 3378; move lib to `crates/gitbutler-core`
2024-03-30 23:10:49 +01:00
Pavel Laptev
41638f50e8
Refactor: removing tailwind. Part 1 ( #3375 )
...
* Remove: unused component `DiffContext`
* remove: unused component `Stats`
* refactor: remove tailwind
* fix and refactor: Share Issue Modal
- tailwind remove
- fix label id and and close button
- textBox added new props
* remove: unused `RemoteNamePanel`
* refactor: teilwind classes replace
* refactor: new DiffMessage comp + teilwind replace
* refactor: replace tailwind classes
* refactor: replace tailwind + handle MD styles
- added markdown styles for PR previews
- tailwind classes replacement
* refactor: unused comp `NotesTabPanel` removed
+ tailwind classes replaced
2024-03-30 22:55:23 +01:00
Sebastian Thiel
37efc8bc94
Assure CI will build the new core
as well
2024-03-30 22:48:08 +01:00
Sebastian Thiel
72291ce4cb
chore: align 'app' and 'lib' crates imports.
...
This is done one-time (for now) using a nightly feature of cargo-fmt
as defined in `rustfmt-nightly.toml.`
It's planned to make this the default so imports will always be sorted.
For now it can be run manually with:
cargo +nightly fmt -- --config-path rustfmt-nightly.toml
or
pnpm rustfmtTBD
Please enter the message for your patch. Lines starting with
2024-03-30 22:43:16 +01:00
Sebastian Thiel
26c39f2a3f
chore: move library from top-level to gitbutler-core
...
This better expresses what it does, and leaves the `gitbutler-app`
in the top-level where it can serve as visible entrypoint.
2024-03-30 22:39:21 +01:00
Sebastian Thiel
7941db2b2f
Revert "Merge pull request #3378 from gitbutlerapp/crates"
...
This reverts commit 423b27c11a
, reversing
changes made to b39779366f
.
2024-03-30 22:25:36 +01:00
Kiril Videlov
423b27c11a
Merge pull request #3378 from gitbutlerapp/crates
...
establish `crates/` directory
2024-03-30 20:34:46 +01:00
Sebastian Thiel
603652e66b
chore: align 'app' and 'lib' crates imports.
...
This is done one-time (for now) using a nightly feature of cargo-fmt
as defined in `rustfmt-nightly.toml.`
It's planned to make this the default so imports will always be sorted.
For now it can be run manually with:
cargo +nightly fmt -- --config-path rustfmt-nightly.toml
or
pnpm rustfmt
2024-03-30 19:48:48 +01:00
Sebastian Thiel
47e5badbfc
chore(app): move it to crates/
to establish the new structure.
...
It is similar to `nu-shell`, which has a lot of crates by now,
which is something we probably see here as well.
2024-03-30 19:36:27 +01:00
Mattias Granlund
b39779366f
Refactor project service and how its used
...
- we are moving away from using observables inside .svelte files
Refactor project service
- easier to consume with value/error stores instead of observable
2024-03-30 17:33:40 +01:00
Kiril Videlov
86b69064c2
Merge pull request #3373 from gitbutlerapp/lib-in-toplevel
...
extract general library from `app` crate
2024-03-30 17:29:45 +01:00
Mattias Granlund
cf38afffd8
Use svelte component context in even more places
...
The general goal is to make data globally available to components to avoid
prop drilling from the dependency root into leaf nodes. With this commit the code
now uses context for looking up branches, commits, ownership, etc.
Beyond this goal we should as a next step consider separating out pure UI
components from client specific ones. For example, `FileStatusIcons` should
not depend on a list of commits. We should also avoid activating/deactiviating
features since it is prone to breakage. We therefore need to look over how
`selectedOwnership` is made active for virtual branches, but ignored for
previewing remote branches.
Goals accomplished in this commit:
- no more prop-drilling of branch, commits, ownership
- easier to enable e.g. lock tooltip in leaf nodes
- context builder for things that are not unique by type (e.g. commits)
Goals not accomplished in this commit:
- `selectedFiles` is still passed around
- `UserSettings` needs to be changed from interface -> class
2024-03-30 15:28:49 +01:00
Sebastian Thiel
63f75c956e
assure CI runs the new library crate
2024-03-30 15:16:12 +01:00
Sebastian Thiel
8e9133092f
minimize app-crate dependencies
...
After the library was removed, it needs less as well.
2024-03-30 15:16:12 +01:00
Sebastian Thiel
2dbdc6ea99
integrate library into app
...
Note that small `commands` modules are now inlined for ease of use.
2024-03-30 15:16:11 +01:00
Sebastian Thiel
3b89ed50f9
minimize library dependencies
2024-03-30 15:16:11 +01:00
Sebastian Thiel
bc2fff968c
chore(app): move library-portion to top-level src/
folder.
...
This allows the tauri-specific parts to remain in the `app` crate,
which will help to eventually release a `cli` crate as well.
2024-03-30 15:16:06 +01:00
Kiril Videlov
326a5a00b3
Merge pull request #3371 from tobyjwebb/Open-in-vscode-in-new-window
...
Open project in VSCode in new window
2024-03-29 20:33:24 +01:00
Kiril Videlov
4e7a6755a0
Merge pull request #3372 from tobyjwebb/bitbucket-branch-url
...
Fix opening remote branch on BitBucket repos
2024-03-29 20:32:27 +01:00
Caleb Owens
1526058c0e
Merge pull request #3340 from gitbutlerapp/ensure-project-settings-button-goes-to-correct-project
...
Ensure project settings button goes to correct project
2024-03-29 17:15:30 +00:00
Caleb Owens
b35b24eb59
Simplify naming
2024-03-29 17:02:32 +00:00
Caleb Owens
4c24cc1b28
Merged origin/master into ensure-project-settings-button-goes-to-correct-project
2024-03-29 17:00:19 +00:00
GitButler
80efa6c6ac
Freaking whitespaces
2024-03-29 17:10:48 +01:00
GitButler
1516dd1095
Add support for opening a BitBucket branch remotely
2024-03-29 17:04:16 +01:00
GitButler
7eb70236c2
Open project in vscode in new window
2024-03-29 15:12:56 +01:00
Kiril Videlov
fe36d83b8e
Merge pull request #3370 from tobyjwebb/fix_annoying_error_in_dev_console
...
Remove invalid attribute from svg file
2024-03-29 14:59:54 +01:00
tobyjwebb@gmail.com
7740c41463
Remove invalid attribute from svg
2024-03-29 14:34:54 +01:00
Kiril Videlov
4f18369576
Merge pull request #3369 from gitbutlerapp/tempdir-removal
...
auto-remove tempdirs after testrun
2024-03-29 12:30:49 +01:00
Sebastian Thiel
8760973611
Use GITBUTLER_TESTS_NO_CLEANUP
on CI for max performance.
...
Without it, CI would have reduced performance compared to how
it worked previously. As it's wiped at the end of each run,
there is no reason to leave the added performance on the table
by not removing our own files.
2024-03-29 07:56:01 +01:00