Skip to content

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Sep 22, 2025

把内联样式挪到 css 里。

Copy link

vercel bot commented Sep 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
table Ready Ready Preview Comment Sep 22, 2025 9:35am

Copy link

coderabbitai bot commented Sep 22, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/refactor-measure-cell

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Summary of Changes

Hello @afc163, 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!

This pull request focuses on refactoring the styling approach for table measurement rows and cells. It transitions from using inline styles directly in the React components to a more maintainable class-based system defined in Less. This change not only centralizes styling definitions but also improves the semantic structure of the table by using appropriate HTML elements for measurement cells.

Highlights

  • Styling Refactor: Moved inline styles from the MeasureCell and MeasureRow components into dedicated Less CSS classes (-measure-cell and -measure-cell-content) within assets/index.less.
  • Semantic HTML Improvement: Changed the measurement cells from <td> elements to <th> elements in MeasureCell.tsx for improved semantic correctness.
  • Test Updates: Updated test selectors and snapshots across multiple test files (FixedColumn.spec.tsx, ExpandRow.spec.jsx.snap, FixedColumn.spec.tsx.snap, Table.spec.jsx.snap) to align with the DOM and styling changes.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

codecov bot commented Sep 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.69%. Comparing base (d259fa9) to head (a362eef).
⚠️ Report is 1 commits behind head on antd-5.x.

Additional details and impacted files
@@             Coverage Diff              @@
##           antd-5.x    #1365      +/-   ##
============================================
- Coverage     97.75%   97.69%   -0.07%     
============================================
  Files            77       77              
  Lines          7666     7668       +2     
  Branches       1163     1161       -2     
============================================
- Hits           7494     7491       -3     
- Misses          166      171       +5     
  Partials          6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

你好,感谢你的贡献!这次重构将 MeasureRow 中的内联样式移至 CSS 文件,提高了代码的可维护性和可读性,这是一个很好的实践。同时,将 <td> 改为 <th> 在语义上更准确,并且测试和快照都已相应更新。

我只发现一个可以改进的小地方,即为了保证在各种环境下都能准确测量列宽,建议为测量文本显式设置 font-weight: bold

总体来说,这是一个高质量的重构,做得很好!

@afc163 afc163 merged commit 313b619 into antd-5.x Sep 22, 2025
9 of 10 checks passed
@afc163 afc163 deleted the feat/refactor-measure-cell branch September 22, 2025 09:53
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.

1 participant