Repository navigation
ux: 标签栏拖动增加视觉反馈 show feedback while dragging repository tabs - #2773
Open
VirgilMing wants to merge 1 commit into
Open
VirgilMing wants to merge 1 commit into
VirgilMing wants to merge 1 commit into
Conversation
Show a title/icon preview, dim the dragged tab, and highlight the destination with an insertion marker matching the existing reorder behavior. Clear feedback when leaving the tab bar, cancelling, dropping, or detaching. Match the tab's Border style key and keep its transparent background in a default style so the drag feedback styles take effect. Constrain preview titles to the available width and ellipsize long names. Clip the preview content to keep it inside the tab-sized border. Keep native drag-and-drop and the current Launcher.MoveTab behavior.
VirgilMing
force-pushed
the
codex/sourcegit-tab-drag-feedback
branch
from
October 12, 2026 13:52
5c007ef to
5c5d9a9
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
现在,鼠标拖动仓库标签,在释放后能够完成标签重排,但拖动过程中缺少视觉反馈。
此改动增加:跟随指针的标题和图标预览、源标签变淡、目标标签高亮,以及与现有重排方向一致的插入标记。
预览标题按可用宽度显示,长仓库名使用省略号,文字限制在预览框内。
离开标签栏时隐藏预览并清除目标提示;取消、释放或控件卸载时清理全部拖动状态。
覆盖层不拦截输入,标签重排继续使用原生拖放和现有的
Launcher.MoveTab。反馈样式匹配标签控件的
Border样式键,默认透明背景也放在样式中,使目标高亮能够正常生效。该 PR 仅包含一个基于最新
develop(61667f1e)的提交,沿用 Avalonia 11.3.22 依赖。本地验证(.NET 10.0.111):
PublishAotUsingRuntimePack=true;发布时会出现来自Avalonia.Controls.DataGrid的IL3053警告。dotnet format --verify-no-changes和git diff --check通过。手动验证步骤:向左、向右拖动标签,离开并重新进入标签栏,再取消或释放,确认中间反馈和最终顺序。
Currently, repository tabs change order on mouse drag drop, but provide no visual cue while dragging.
This adds a title/icon preview that follows the pointer, dims the source tab, and highlights the destination with an insertion marker matching the direction of the existing reorder operation.
Long preview titles are constrained to the available width and ellipsized, with the content clipped to the preview border.
Leaving the tab bar hides the preview and clears the destination feedback; cancellation, drop, and control detachment clear all drag state.
The overlay does not intercept input, and reordering continues to use native drag-and-drop and the existing
Launcher.MoveTab.The feedback styles match the tab's
Borderstyle key; the default transparent background lives in a style so the destination highlight can take precedence.This PR contains one commit based on the latest
develop(61667f1e), using the existing Avalonia 11.3.22 dependencies.Local validation (.NET 10.0.111):
PublishAotUsingRuntimePack=true; the publish emits anIL3053warning forAvalonia.Controls.DataGrid.dotnet format --verify-no-changesandgit diff --checkpassed.Manual verification steps: drag a tab left and right, leave and re-enter the tab bar, then cancel or drop to confirm the feedback and final order.