Skip to content

fix(download): 修复卡片底部留白 - #3786

Merged
LuLu-ling merged 1 commit into
PCL-Community:devfrom
CerikoSky:fix-3764-download-card-bottom-padding
Nov 7, 2026
Merged

LuLu-ling merged 1 commit into
PCL-Community:devfrom
CerikoSky:fix-3764-download-card-bottom-padding

Conversation

@CerikoSky

@CerikoSky CerikoSky commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

变更说明 / Summary

修复卡片底部留白

关联 Issue / Related Issue

验证方式 / Verification

AI 使用情况 / Generative Artificial Intelligence Usage

  • 使用情况 / Usage:未使用(Not used)

提交前检查 / Checklist

  • 我已阅读并遵守 技术规范 和 生成式人工智能使用方针。/ I have read and followed the Technical Guidelines and the Generative Artificial Intelligence Usage Policy.
  • 我能解释本次修改的全部内容,包括关键逻辑、异常处理和已知限制。/ I can explain all changes, including key logic, error handling, and known limitations.
  • 我确认未伪造日志、测试结果、基准数据或其他证据。/ I confirm that no logs, test results, benchmarks, or other evidence have been fabricated.
  • 本次提交不包含与修改无关的文件变更,也未提交临时文件或构建产物。/ The PR contains no unrelated changes, temporary files, or build artifacts.
  • 所有提交均已签名,且提交信息符合提交信息规范。/ All commits are signed and follow the commit message convention.
  • 我确认 PR 描述由本人撰写,未直接提交未经核实的 AI 生成内容。/ I confirm that I wrote this PR description myself and have not submitted unverified AI-generated content.

Sourcery 总结

缺陷修复:

  • 修复下载页面版本卡片底部留白显示异常。
Original summary in English

Sourcery 摘要

错误修复:

  • 修复下载页面版本卡片底部留白显示异常。
Original summary in English

Sourcery 汇总

Bug 修复:

  • 修复下载页面版本卡片底部留白过多的问题。
Original summary in English

Summary by Sourcery

Bug Fixes:

  • Fix excessive bottom whitespace in version cards on the download page.

@pcl-ce-automation pcl-ce-automation Bot added 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 size: XS PR 大小评估:微型 labels Nov 5, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 5, 2026 •

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

审阅者指南

下载版本堆栈现在会追加一个间隔元素,该元素会在卡片宿主完成布局后显示,从而修复底部留白缺失的问题,同时确保在完成尺寸计算前隐藏间距。

下载卡片底部间距的时序图

sequenceDiagram
    participant PageDownloadInstall
    participant CardStack
    participant CardHost
    participant Spacer

    PageDownloadInstall->>CardStack: _CreateVersionStack(versions)
    CardStack->>CardHost: Add card host
    CardStack->>Spacer: Create FrameworkElement(Height=18d, Visibility=Collapsed)
    CardHost-->>Spacer: SizeChanged
    Spacer->>Spacer: Set Visibility=Visible
Loading

文件级变更

变更 详情 文件
在每个下载版本卡片的内容宿主完成尺寸计算后,添加动态底部间距。
  • 创建一个初始状态为折叠的 18 像素间隔元素。
  • 当卡片宿主触发 SizeChanged 时显示该间隔元素,避免布局完成后底部留白缺失。
Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml.cs

提示和命令

与 Sourcery 互动

  • 触发新的审阅: 在拉取请求中评论 @sourcery-ai review。
  • 继续讨论: 直接回复 Sourcery 的审阅评论。
  • 根据审阅评论创建 GitHub issue: 回复审阅评论,请 Sourcery 根据该评论创建 issue。你也可以回复审阅评论并发送 @sourcery-ai issue 来创建 issue。
  • 生成拉取请求标题: 在拉取请求标题的任意位置写入 @sourcery-ai,即可随时生成标题。你也可以在拉取请求中评论 @sourcery-ai title,随时(重新)生成标题。
  • 生成拉取请求摘要: 在拉取请求正文中你希望摘要出现的位置写入 @sourcery-ai summary,即可随时生成 PR 摘要。你也可以在拉取请求中评论 @sourcery-ai summary,随时(重新)生成摘要。
  • 生成审阅者指南: 在拉取请求中评论 @sourcery-ai guide,即可随时(重新)生成审阅者指南。
  • 解决所有 Sourcery 评论: 在拉取请求中评论 @sourcery-ai resolve,即可解决所有 Sourcery 评论。如果你已经处理完所有评论且不想再看到它们,这个功能会很有用。
  • 忽略所有 Sourcery 审阅: 在拉取请求中评论 @sourcery-ai dismiss,即可忽略所有现有的 Sourcery 审阅。如果你想从头开始进行新的审阅,这尤其有用——别忘了评论 @sourcery-ai review 以触发新的审阅!

自定义使用体验

访问你的控制面板,以便:

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

获取帮助

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

Reviewer's Guide

The download version stack now appends a spacer that becomes visible after the card host is laid out, fixing the missing bottom whitespace while keeping the spacing hidden until sizing occurs.

Sequence diagram for download card bottom spacing

sequenceDiagram
    participant PageDownloadInstall
    participant CardStack
    participant CardHost
    participant Spacer

    PageDownloadInstall->>CardStack: _CreateVersionStack(versions)
    CardStack->>CardHost: Add card host
    CardStack->>Spacer: Create FrameworkElement(Height=18d, Visibility=Collapsed)
    CardHost-->>Spacer: SizeChanged
    Spacer->>Spacer: Set Visibility=Visible
Loading

File-Level Changes

Change Details Files
Adds dynamic bottom spacing to each download version card after its content host is sized.
  • Creates an 18-pixel spacer initially collapsed.
  • Shows the spacer when the card host raises SizeChanged, preventing bottom whitespace from being omitted after layout.
Plain Craft Launcher 2/Pages/PageDownload/PageDownloadInstall.xaml.cs

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T00:05:55.128852Z 7848acf New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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.

嗨——我已经审阅了你的更改,整体看起来很棒!


Sourcery 为开源项目免费提供服务——如果你喜欢我们的评审,欢迎分享 ✨
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd4dc17b59

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@CerikoSky
CerikoSky force-pushed the fix-3764-download-card-bottom-padding branch from fd4dc17 to 964afa8 Compare November 5, 2026 23:48
@CerikoSky
CerikoSky force-pushed the fix-3764-download-card-bottom-padding branch from 964afa8 to 7848acf Compare November 6, 2026 00:04
@pcl-ce-automation pcl-ce-automation Bot added 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 and removed 🛠️ 等待审查 Pull Request 已完善,等待维护者或负责人进行代码审查 labels Nov 7, 2026
@LuLu-ling
LuLu-ling merged commit 0e3ab0c into PCL-Community:dev Nov 7, 2026
3 checks passed
@pcl-ce-automation pcl-ce-automation Bot added 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线 and removed 🕑 等待合并 已处理完毕,正在等待代码合并入主分支 labels Nov 7, 2026
@CerikoSky
CerikoSky deleted the fix-3764-download-card-bottom-padding branch November 7, 2026 04:16
github-actions Bot pushed a commit to untained-launcher/PCL-CE that referenced this pull request Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XS PR 大小评估:微型 👌 完成 相关问题已修复或功能已实现,计划在下次版本更新时正式上线

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants