Commit Graph

58 Commits

Author SHA1 Message Date
leo
ed496a41fb feature: supports to view image diff when lfs object points to a image
Signed-off-by: leo <longshuang@msn.cn>
2025-06-04 20:53:42 +08:00
leo
06a77502bc fix: crash when clicking Previous Difference without visual lines (#1385)
Always scroll to top when the state of `Show All Lines` changed

Signed-off-by: leo <longshuang@msn.cn>
2025-06-04 13:13:28 +08:00
leo
b0c0c46441 feature: supports to de-initialize a submodule (#1272)
Signed-off-by: leo <longshuang@msn.cn>
2025-05-21 20:34:33 +08:00
leo
224f7a949a fix: since can not been used in HotKey property and ⌘+⌥+D has been used to show Dock, change the hotkey to open external merge tool to Ctrl+Shift+D/⌘+⇧+D
Signed-off-by: leo <longshuang@msn.cn>
2025-05-20 23:01:21 +08:00
leo
6fa454ace8 fix!: same hotkey for opening external diff tool and discard block (#1337)
Signed-off-by: leo <longshuang@msn.cn>
2025-05-20 17:32:06 +08:00
leo
bc5c4670de feature: supports to use Ctrl+D/⌘+D to open in external diff/merge tool (#1312) 2025-05-14 16:01:47 +08:00
leo
95ea0a6ba6 ux: Ignore Whitespace and EOL Changes should always be visible (#1260)
Signed-off-by: leo <longshuang@msn.cn>
2025-04-29 22:21:38 +08:00
leo
03f49ccff0 refactor: text diff view block navigation
Signed-off-by: leo <longshuang@msn.cn>
2025-03-21 17:35:59 +08:00
leo
695db2a319 code_style: run dotnet format
Signed-off-by: leo <longshuang@msn.cn>
2025-03-17 20:57:18 +08:00
Gadfly
66517fd4bf enhance: add tooltips to various UI elements for better accessibility (#1097)
* enhance: add tooltips to various UI elements for better accessibility

* refactor: simplify user string conversion
2025-03-16 11:23:42 +08:00
leo
b75676a7f8 refactor: commit message
- move issue tracker and commit hash links parsing to view models
- parsing links async
- make sure matched hash is a valid commit oid
- disable `CHILDREN` row in submodule info panel

Signed-off-by: leo <longshuang@msn.cn>
2025-03-04 16:04:19 +08:00
leo
a7e254cac6 fix: multiple bindings for IsVisible property of Button
Signed-off-by: leo <longshuang@msn.cn>
2025-02-26 09:50:54 +08:00
Göran W
fa4caa2186 enhance: add first/last buttons for block-nav, no wrapping (#1015) (#1016)
Added 2 new buttons (only visible in block-nav mode), with new icons and new (en_US) strings (First/Last Difference).
Implemented these new buttons, and disabled the automatic wrap-around for the prev/next buttons in block-nav mode.
2025-02-24 09:32:19 +08:00
GadflyFang
92065dee12 fix: Ensure each ImageView instance calculates its own aspect ratio (#929)
* fix: Ensure each ImageView instance calculates its own aspect ratio

- Modified ArrangeOverride methods in ImageView class to independently calculate and apply the aspect ratio based on the instance's image.

Signed-off-by: Gadfly <gadfly@gadfly.vip>

* fix: Make IgnoredWhitespace toggle button visible based on IsTextDiff

---------

Signed-off-by: Gadfly <gadfly@gadfly.vip>
2025-02-06 09:49:45 +08:00
wl2776
6e5626f267 fix: several typos in source code (#895) 2025-01-13 10:11:28 +08:00
leo
26ebd5ae7e feature: add option to only highlight current branch in commit graph (#848)
- add a toggle button to only highlight current branch in commit graph
- re-order buttons in histories toolbar
- remove unused icons and styles
2025-01-06 14:59:27 +08:00
leo
723263d099 fix: wrong binding modes
Signed-off-by: leo <longshuang@msn.cn>
2024-12-08 21:47:20 +08:00
leo
15d3ad355d code_review: PR #703
* change the name of this feature to `Enable Block-Navigation`
* change the icon of the toggle button used to enable this feature
* use a new class `BlockNavigation` to hold all the data about this feature
* create `BlockNavigation` data only when it is enabled

Signed-off-by: leo <longshuang@msn.cn>
2024-12-08 21:02:30 +08:00
Göran W
655d71b0bc Add navigation and highlighting of change-blocks in Text Diff (#616, #717) (#703)
* Corrected misspelled local variable nextHigh(t)light

* Implemented change-block navigation

* Modified behavior of the Prev/Next Change buttons in DiffView toolbar.
* Well-defined change-blocks are pre-calculated and can be navigated between.
* Current change-block is highlighted in the Diff panel(s).
* Prev/next at start/end of range (re-)scrolls to first/last change-block
(I.e when unset, or already at first/last change-block, or at the only one.)
* Current change-block is unset in RefreshContent().

* Added safeguards for edge cases

* Added indicator of current/total change-blocks in DiffView toolbar

* Added new Icon and String (en-US) for Highlighted Diff Navigation

* Added Preference and ToggleButton for diff navigation style
2024-12-08 17:50:33 +08:00
leo
134c71064e feature: add buttons to go to prev/next change in text diff view (#616)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-16 15:17:29 +08:00
leo
6209326fe0 code_review: PR #652
* update localization for zh_CN and zh_TW
* change the icon for `Icons.Lines.All`
* reorder diff view toolbar buttons
* move private methods after protected

Signed-off-by: leo <longshuang@msn.cn>
2024-11-04 16:49:15 +08:00
Göran W
1a8acbf934 feature: diff - toggle show all lines (#615) (#652)
* Renamed 1 of 2 SyncScrollOffset props, for clarity

The property "SyncScrollOffset" in TextDiff is distinct from the one with the same name in TwoSideTextDiff. These two properties are used in separate (though slightly related) ways and are not really connected.

The one in TwoSideTextDiff is mainly used to keep the scroll-pos of the two SingleSideTextDiffPresenter views in sync (aligned), while the one in TextDiff is used only to preserve/reset the scroll-pos in the single CombinedTextDiffPresenter view when (re)loading Diff Content (so not really syncing anything).

To clarify this and to make the two properties more distinguishable, I renamed the one in TextDiff to simply "ScrollOffset".

* Added icon and string for "Show All Lines"

New StreamGeometry "Icons.Lines.All" using SVG path from "text_line_spacing_regular" at https://avaloniaui.github.io/icons.html.
New String "Text.Diff.VisualLines.All" for en_US locale (no translations yet).

* Implemented new TextDiff feature "Show All Lines" (toggle)

* Added new ToggleButton in DiffView toolbar, visible when IsTextDiff, disabling the buttons "Increase/Decrease Number of Visible Lines" when on.

* Added new Preference property "UseFullTextDiff".

* Added StyledProperty "UseFullTextDiffProperty" in TextDiffView, with a DataTemplate binding to the corresponding preference property.

* When changed, UseFullTextDiffProperty is handled identically as UseSideBySideDiffProperty (via new helper method RefreshContent(), for unification with OnDataContextChanged()).

* Added new method DiffContext.ToggleFullTextDiff() for changing the preference property and reloading the diff content.

* Implemented the new feature by overriding the "unified" (number of context lines) for Commands.Diff() with a very high number.

NOTE: The number used (~1 billion) is supposed to be the highest one working on Mac, according to this forum comment: https://stackoverflow.com/questions/28727424/for-git-diff-is-there-a-uinfinity-option-to-show-the-whole-file#comment135202820_28846576
2024-11-04 16:32:51 +08:00
leo
d2a005c532 feature: add a button in diff view to ignore all whitespace changes (--ignore-all-space) 2024-09-30 11:34:09 +08:00
leo
8f7567a060 feature: do NOT save visual diff context lines 2024-08-25 11:33:38 +08:00
leo
34a598d421 feature: add commit web links (#357) 2024-08-13 17:15:17 +08:00
leo
327b8033b6 rename: rename monospace style to primary 2024-07-29 20:48:04 +08:00
leo
15e7df6085 ux: disable WordWrap in side-by-side diff because it may lead to alignment issue between two sides 2024-07-04 14:12:39 +08:00
leo
4fa388501a ux: add a new color Color.BadgeFG for text in badge 2024-06-29 10:47:09 +08:00
leo
faabfd6b80 enhance: save last visual line numbers in diff view (#207) 2024-06-25 18:15:31 +08:00
leo
8e88df92b3 feature: add two view mode for image diff - side-by-side and blend 2024-06-21 17:48:19 +08:00
leo
fec2b402e0 code_review: PR #187
* replace icon with common whitespace icon in other editors
* button tooltip translations
* rename `_showHiddenSymbols` to `_showHiddenSymbolsInDiffView` to make its usage clear
* change the order of this button
2024-06-19 18:15:32 +08:00
Giuseppe Lippolis
9c7ac5b067 feature: Allows you to show space and tab symbols in DiffView 2024-06-19 11:33:34 +02:00
leo
a168b05ac6 ux: re-design submodule preview in revision files 2024-06-19 14:24:49 +08:00
leo
68061f82b1 refactor: rewrite TextDiffView 2024-06-12 21:12:45 +08:00
leo
c3cbb6d895 fix: submodule diff missing commit message 2024-06-08 21:13:59 +08:00
leo
cf02c890bf ux: re-design the image diff view 2024-06-06 11:09:28 +08:00
leo
8b1f28ac95 enhance: show file size change in image diff 2024-06-06 10:36:17 +08:00
leo
54ef9c0bf7 refactor: use bindings instead of sync manually 2024-06-06 10:01:14 +08:00
leo
d1eb9e15ef ux: use TextTrimming="CharacterEllipsis" for diff view title 2024-06-04 20:34:18 +08:00
leo
802b429cc8 enhance: supports word wrap in text diff view 2024-06-04 20:26:47 +08:00
leo
fa3a3b2dad refactor: code cleanup 2024-05-30 15:13:59 +08:00
leo
69f9dceece feature: new way to display changes of submodules 2024-05-29 12:50:26 +08:00
leo
1040bbe4d2 feature: add buttons to increase/decrease visible lines in text diff view (#145) 2024-05-27 10:29:15 +08:00
leo
ab26bb83e9 refactor: re-design toolbar of Views.DiffView 2024-04-14 12:27:09 +08:00
Gadfly
54c9552985 refactor: remove duplicate ObjectConverters, remove unused using 2024-04-13 18:54:46 +08:00
Gadfly
f4e1e0fb6b fix: use TextTrimming alternative PathConverters 2024-04-13 02:05:26 +08:00
Gadfly
f7dd856e49 fix: enhance diff view by truncating long file paths with ellipsis and adding tooltips for full path display 2024-04-13 01:34:08 +08:00
Gadfly
83728c1a5f fix: change file mode status postion to right 2024-04-12 21:58:54 +08:00
Gadfly
a249eed1ac feat: show git file mode change if exist 2024-04-12 21:38:36 +08:00
leo
eea3d2c6c0 feature: enable to use external merge tool for all type of files (#53) 2024-04-03 09:43:17 +08:00