Conversation
Increase default handle size from 16px to 24px and core-to-handle ratio from 50% to 65% to match Heptabase-style grip dots. Raise max size slider limit from 28px to 36px. Make CSS left offset dynamic via calc(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
单块拖拽和多块选取时,被选中的行显示可配置颜色的背景光晕。 新增 SelectionHighlightManager 管理高亮状态,通过 CM6 update 周期自动重新应用 class 以应对 DOM 重渲染。点击非手柄区域自动 清除光晕。设置面板新增「选中高亮颜色」配置项。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The .dnd-drop-highlight class was using --dnd-drop-highlight-color which was never set in main.ts. Changed to use --dnd-drop-indicator-color so the indicator color setting actually applies to drop highlights. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Changed default handle color from --interactive-accent to --text-normal so the handle matches the normal text color (black/white based on light/dark theme). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When user selects text in editor (possibly across multiple blocks) and clicks a handle within that selection, all blocks covered by the text selection are automatically selected as complete blocks. New modules: - EditorSelectionBridge: reads CodeMirror text selection and converts to block-aligned line ranges - SmartBlockSelector: evaluates whether smart block selection should be triggered based on clicked block and editor selection Modified: - DragEventHandler: integrated SmartBlockSelector and added startRangeSelectWithPrecomputedRanges method Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When text selection is converted to block selection via handle click, the editor's text selection is now cleared to avoid visual confusion from having both selection states visible simultaneously. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When blocks are selected via text selection + handle click, the vertical link line between handles is now hidden. Only the block highlight is shown, keeping the visual cleaner. - Added showLinks parameter to RangeSelectionVisualManager.render() - Added hideLinks() helper method - Updated startRangeSelectWithPrecomputedRanges to pass showLinks=false Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous fix only hid the link line during initial render, but commitRangeSelection was still showing it. Added showLinks field to MouseRangeSelectState to track whether links should be displayed, and use it consistently throughout the selection lifecycle. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When using text-selection-based block selection, the handles now stay in their normal appearance instead of becoming highlighted. Only the clicked block's handle remains visible in its regular style, while other selected blocks only show background highlight. - Added highlightHandles option to RangeSelectionVisualManager.render() - Added highlightHandles field to MouseRangeSelectState - Smart block selection sets highlightHandles=false Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When using text-selection-based block selection, only the clicked block's handle remains visible. Other selected blocks' handles are hidden to avoid cluttering the UI while their background highlight remains visible. - Added setHiddenRangesForSelection/clearHiddenRangesForSelection to HandleVisibilityController - Modified resolveVisibleHandleFromTarget and resolveVisibleHandleFromPointerWhenLineNumbersHidden to skip handles in hidden ranges - Connected DragEventHandler to HandleVisibilityController via new deps callbacks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Disable CSS :hover rule when block selection is active by adding dnd-block-selection-active body class. This prevents handles from appearing on hover when the user has selected blocks via smart selection or single-handle click. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Apply the same handle hiding logic to regular single-click range selection that was already working for smart text-selection based block selection. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- For mouse clicks, commit block selection immediately without requiring long press (touch still requires long press) - Keep handle appearance normal (not highlighted) when selection is committed, matching smart selection behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…blocks - Capture editor selection snapshot at pointerdown start before browser clears it - Pass snapshot to SmartBlockSelector.evaluate() for reliable multi-block detection - Fix syncSelectionElements to check DOM class existence instead of Set identity - Prevent default/stop propagation in smart selection to avoid event conflicts - Remove link bar (vertical line) from selection visuals per user preference - Improve CSS color fallback chain for selection highlight Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Don't preventDefault/stopPropagation for mouse events in smart selection - Keep draggable attribute enabled for mouse to allow native drag - Touch events still use pointer capture approach Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @14743768433, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求全面实现了“文本选区 -> 块选中 -> 直接拖拽”的工作流,显著提升了点击、拖拽、放下和刷新等交互过程中选中状态的稳定性。它还改进了多段选区在拖放后的恢复逻辑,并清理了调试日志以提供更流畅的用户体验。同时,视觉和交互元素也得到了优化,以提供更清晰的反馈和更好的可用性。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
这个 PR 引入了一个重要的智能文本到块选区拖拽的新功能,并包含了大量的稳定性改进和错误修复。代码改动范围很广,但实现质量很高,特别是处理复杂选区状态和增强 UI 对 CodeMirror DOM 更新的鲁棒性方面的逻辑。此外,全面的测试覆盖也值得称赞。
我发现了一些可以改进的地方:
- 一个构建配置中的硬编码本地路径,这是一个关键问题。
- 几个中等严重性的建议,旨在通过移除未使用代码和重命名文件来提高代码的清晰度和可维护性。
总的来说,这是一个高质量的贡献。在解决了关键问题后,这个 PR 就可以合并了。
|
|
||
| const prod = process.argv[2] === "production"; | ||
| const pluginDir = "C:/Users/19411_4bs7lzt/OneDrive/obsidian/.obsidian/plugins/dragger"; | ||
| const pluginDir = "/Users/jinyujia/Downloads/test/.obsidian/plugins/dragger"; |
| readonly pointer: PointerSessionController; | ||
| private readonly smartSelector: SmartBlockSelector; | ||
| // Selection snapshot captured at pointerdown start, before browser might clear it | ||
| private selectionSnapshotAtPointerDown: SmartSelectionResult | null = null; |
| * Tracks the highlighted line range so the class can be re-applied | ||
| * after CM6 DOM updates (which may reset element classes). | ||
| */ | ||
| export class SelectionHighlightManager { |
|
其实背景高亮我也实现了一份,这个更改可以不需要,其他可以合并 |
|
另外不要一次提交这么大的pr,如果有多种功能修改可以分多次pr |
|
好,我没提交过pr,第一次。。。
…---原始邮件---
发件人: ***@***.***>
发送时间: 2026年2月16日(周一) 中午12:46
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [Ariestar/obsidian-dragger] 单击块选中和多文本选中后点击手柄进行多块选中 (PR #12)
Ariestar left a comment (Ariestar/obsidian-dragger#12)
另外不要一次提交这么大的pr,如果有多种功能修改可以分多次pr
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
标题
feat: 智能文本选区块拖拽 + 选中态稳定恢复 + 交互与日志清理描述