Skip to content

fix(markdown): unify table border color and fix rounded corner gaps - #545

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
pengfeixx:fix/markdown-table-border
Aug 27, 2026
Merged

fix(markdown): unify table border color and fix rounded corner gaps#545
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
pengfeixx:fix/markdown-table-border

Conversation

@pengfeixx

@pengfeixx pengfeixx commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Use a dedicated --table-border (10% overlay) for the table frame and cell grid, and hide the table's outer left/right/bottom borders so the rounded block border closes cleanly without clipped-line gaps.

表格边框改用专用 --table-border(10% 半透明叠加),外框与单元格网格线
同色;隐藏表格左/右/底外边框,由外层圆角边框封闭,消除转角缺口。

Log: 修复Markdown表格边框颜色不一致及圆角转角缺口
Influence: Markdown预览区表格边框颜色统一、转角渲染完整,深浅色主题均适配。

Summary by Sourcery

Unify Markdown table borders and close rounded corners cleanly across themes.

Bug Fixes:

  • Fix rounded Markdown table corners by letting the outer container provide the side and bottom borders without clipped-line gaps.

Enhancements:

  • Unify Markdown table frame and cell grid colors with a dedicated theme-aware table border color for consistent light and dark mode rendering.

Use a dedicated --table-border (10% overlay) for the table frame and
cell grid, and hide the table's outer left/right/bottom borders so the
rounded block border closes cleanly without clipped-line gaps.

表格边框改用专用 --table-border(10% 半透明叠加),外框与单元格网格线
同色;隐藏表格左/右/底外边框,由外层圆角边框封闭,消除转角缺口。

Log: 修复Markdown表格边框颜色不一致及圆角转角缺口
Influence: Markdown预览区表格边框颜色统一、转角渲染完整,深浅色主题均适配。
@sourcery-ai

sourcery-ai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Reviewer's Guide

Unifies Markdown table frame and cell-grid colors through a light/dark theme-aware --table-border token, and hides conflicting collapsed-table outer edges so the surrounding rounded border renders complete corners without gaps.

File-Level Changes

Change Details Files
Introduces a theme-aware table border token and applies it consistently to the rounded table frame and cell grid.
  • Defines a 10% translucent border variable for light and dark themes.
  • Replaces the frame and cell border colors with the shared table-specific variable.
  • Removes the dark-theme border override so the shared token controls both themes.
src/editor/markdown/web/build/style.css
src/editor/markdown/web/theme.css
Adjusts collapsed table border rendering so the outer rounded container cleanly closes the table edges.
  • Hides the table’s left, right, and bottom outer border styles while retaining the wrapper’s rounded border.
  • Keeps the table flush with the wrapper to avoid duplicate side borders and clipped corner gaps.
src/editor/markdown/web/build/style.css
src/editor/markdown/web/theme.css

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

Choose a reason for hiding this comment

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

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 ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 98 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 总体评分 98 分,大于 70 分通过阈值,代码质量符合要求。本次提交统一了 Markdown 表格边框颜色并修复了圆角缝隙问题,CSS 变量定义合理,注释详尽,无安全漏洞。

🔍 详细分析

1. 语法逻辑 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: CSS 语法正确,变量定义与级联覆盖逻辑清晰,border-collapse 下 hidden 优先级规则运用准确


2. 代码质量 ✅

评价: 优秀 ✅ 通过

潜在问题:

  1. src/editor/markdown/web/build/style.css:1 - build/style.css 为前端编译产物目录下的文件,手动编辑可能导致后续构建时被覆盖,建议确认构建流程是否自动生成此文件

建议: 建议将 build/style.css 纳入构建流程自动生成,避免源文件与编译产物不同步;当前两处文件内容一致,暂无实际问题


3. 代码性能 ✅

评价: 优秀 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: CSS 变量复用有利于浏览器缓存和主题切换性能,无不必要的重绘或回流


4. 代码安全 🔒

评价: 优秀 ✅ 通过

🔐 发现 0 个安全漏洞

漏洞对比统计:

  • 🆕 新增:0 个
  • ✅ 修复:0 个
  • ➡️ 持平:0 个

安全漏洞详情:
✅ 未发现安全漏洞

建议: 纯 CSS 样式变更,无安全风险


💡 改进建议代码示例

/* 建议在构建脚本中添加自动拷贝/编译步骤,避免手动同步两份文件 */
/* 例如在 package.json 或 Makefile 中: */
/* cp src/editor/markdown/web/theme.css src/editor/markdown/web/build/style.css */

/* 或者在 .gitignore 中忽略 build/ 目录,仅保留源文件 */
/* echo 'src/editor/markdown/web/build/' >> .gitignore */

本报告由 AI 代码审查工具自动生成

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, pengfeixx

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@pengfeixx

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot
deepin-bot Bot merged commit fdb817c into linuxdeepin:master Aug 27, 2026
17 checks passed
@pengfeixx
pengfeixx deleted the fix/markdown-table-border branch August 27, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants