Skip to content

fix(select-left): 移除多余的 ToolTip 偏移量#3345

Open
LuLu-ling wants to merge 1 commit into
devfrom
fix/tooltip-offset-remove
Open

fix(select-left): 移除多余的 ToolTip 偏移量#3345
LuLu-ling wants to merge 1 commit into
devfrom
fix/tooltip-offset-remove

Conversation

@LuLu-ling

@LuLu-ling LuLu-ling commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary by Sourcery

错误修复:

  • 移除选择左侧菜单操作中不必要的水平和垂直工具提示偏移,以防止工具提示位置错位。
Original summary in English

Summary by Sourcery

Bug Fixes:

  • Remove unnecessary horizontal and vertical tooltip offsets from select-left menu actions to prevent misaligned tooltips.

@LuLu-ling LuLu-ling requested a review from a team July 5, 2026 06:32
@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 size: XS PR 大小评估:微型 labels Jul 5, 2026
@sourcery-ai

sourcery-ai Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor
审阅者指南(在小型 PR 上默认折叠)

审阅者指南

此 PR 调整了左侧菜单中多个项目的工具提示行为,改为依赖默认位置偏移,而不是使用自定义的水平/垂直偏移。

左侧菜单项更新后工具提示配置的序列图

sequenceDiagram
    participant PageSelectLeft
    participant ToolTipService

    PageSelectLeft->>ToolTipService: SetPlacement(itemCreate, PlacementMode.Right)
    PageSelectLeft->>ToolTipService: SetPlacement(itemAdd, PlacementMode.Right)
    PageSelectLeft->>ToolTipService: SetPlacement(itemInstall, PlacementMode.Right)
    %% Custom SetHorizontalOffset and SetVerticalOffset calls removed; default offsets now apply
Loading

文件级更改

更改内容 详情 文件
对左侧菜单操作依赖默认 ToolTip 定位,而不是自定义偏移。
  • 移除针对“create”菜单项工具提示的显式 HorizontalOffset 配置。
  • 移除针对“create”菜单项工具提示的显式 VerticalOffset 配置。
  • 移除针对“add”菜单项工具提示的显式 HorizontalOffset 配置。
  • 移除针对“add”菜单项工具提示的显式 VerticalOffset 配置。
  • 移除针对“install”菜单项工具提示的显式 HorizontalOffset 配置。
  • 在保留 PlacementMode.Right 的同时,移除针对“install”菜单项工具提示的显式 VerticalOffset 配置。
Plain Craft Launcher 2/Pages/PageSelectLeft.xaml.cs

可能关联的问题

  • #C#:PR 移除了右侧放置项的手动工具提示偏移,修复了工具提示栏被音乐按钮遮挡的问题。

提示与命令

与 Sourcery 交互

  • 触发新的审阅: 在 pull request 中评论 @sourcery-ai review
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 从审阅评论生成 GitHub issue: 通过回复审阅评论,请求 Sourcery 从该评论创建一个 issue。你也可以回复审阅评论并写上 @sourcery-ai issue 来从该评论创建 issue。
  • 生成 pull request 标题: 在 pull request 标题的任意位置写上 @sourcery-ai,即可随时生成标题。你也可以在 pull request 中评论 @sourcery-ai title,以随时(重新)生成标题。
  • 生成 pull request 摘要: 在 pull request 正文的任意位置写上 @sourcery-ai summary,即可在你希望的位置随时生成 PR 摘要。你也可以在 pull request 中评论 @sourcery-ai summary,以随时(重新)生成摘要。
  • 生成审阅者指南: 在 pull request 中评论 @sourcery-ai guide,即可随时(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在 pull request 中评论 @sourcery-ai resolve,即可将所有 Sourcery 评论标记为已解决。当你已经处理完所有评论且不希望再看到它们时,这会很有用。
  • 撤销所有 Sourcery 审阅: 在 pull request 中评论 @sourcery-ai dismiss,即可撤销所有已有的 Sourcery 审阅。当你希望从一次全新的审阅开始时尤其有用——别忘了评论 @sourcery-ai review 来触发新的审阅!

自定义你的体验

访问你的控制面板 来:

  • 启用或禁用审阅功能,例如 Sourcery 生成的 pull request 摘要、审阅者指南等。
  • 更改审阅语言。
  • 添加、移除或编辑自定义审阅说明。
  • 调整其他审阅设置。

获取帮助

Original review guide in English
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR adjusts the tooltip behavior for several left-side menu items by relying on the default placement offsets instead of custom horizontal/vertical offsets.

Sequence diagram for updated tooltip configuration on left menu items

sequenceDiagram
    participant PageSelectLeft
    participant ToolTipService

    PageSelectLeft->>ToolTipService: SetPlacement(itemCreate, PlacementMode.Right)
    PageSelectLeft->>ToolTipService: SetPlacement(itemAdd, PlacementMode.Right)
    PageSelectLeft->>ToolTipService: SetPlacement(itemInstall, PlacementMode.Right)
    %% Custom SetHorizontalOffset and SetVerticalOffset calls removed; default offsets now apply
Loading

File-Level Changes

Change Details Files
Rely on default ToolTip positioning for left-side menu actions instead of custom offsets.
  • Removed explicit HorizontalOffset configuration for the 'create' menu item tooltip.
  • Removed explicit VerticalOffset configuration for the 'create' menu item tooltip.
  • Removed explicit HorizontalOffset configuration for the 'add' menu item tooltip.
  • Removed explicit VerticalOffset configuration for the 'add' menu item tooltip.
  • Removed explicit HorizontalOffset configuration for the 'install' menu item tooltip.
  • Removed explicit VerticalOffset configuration for the 'install' menu item tooltip while keeping PlacementMode.Right.
Plain Craft Launcher 2/Pages/PageSelectLeft.xaml.cs

Possibly linked issues

  • #C#: PR removes manual tooltip offsets for right-placed items, fixing the tooltip bar being blocked by the music button.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我在这里给出了一些整体性的反馈:

  • 由于现在有多个菜单项依赖默认的 tooltip 偏移量,并且都使用相同的 PlacementMode.Right,建议提取一个通用的工具方法或配置来统一控制 tooltip 的定位,这样以后如果需要修改就不用分别更新每一个菜单项了。
给 AI Agent 的提示
Please address the comments from this code review:

## Overall Comments
- 由于现在有多个菜单项依赖默认的 tooltip 偏移量,并且都使用相同的 `PlacementMode.Right`,建议提取一个通用的工具方法或配置来统一控制 tooltip 的定位,这样以后如果需要修改就不用分别更新每一个菜单项了。

Sourcery 对开源项目免费——如果你觉得我们的代码评审有帮助,欢迎分享 ✨
帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续的评审。
Original comment in English

Hey - I've left some high level feedback:

  • Since multiple menu items now rely on default tooltip offsets with identical PlacementMode.Right, consider extracting a shared helper/config for tooltip placement so future changes don’t require updating each item separately.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since multiple menu items now rely on default tooltip offsets with identical `PlacementMode.Right`, consider extracting a shared helper/config for tooltip placement so future changes don’t require updating each item separately.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS PR 大小评估:微型 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant