Skip to content

docs(slides): document table dimensions#1920

Open
ethan-zhx wants to merge 1 commit into
mainfrom
docs/slide-table-dimensions
Open

docs(slides): document table dimensions#1920
ethan-zhx wants to merge 1 commit into
mainfrom
docs/slide-table-dimensions

Conversation

@ethan-zhx

@ethan-zhx ethan-zhx commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Documents table sizing dimensions in the Slides XML schema reference and XML format guide.

Changes

  • Adds width and height dimension examples and schema detail
  • Clarifies table dimension guidance for Slides XML authors

Test Plan

  • Unit tests pass (not run; documentation-only change)
  • Manual local verification confirms the lark-cli flow (not run; documentation-only change)

Related Issues

  • None

Summary by CodeRabbit

  • New Features

    • Added optional table width and height settings for slide layouts.
    • Tables now support predictable distribution of remaining space across unspecified columns and rows.
    • Explicit column widths and row heights are preserved when possible, with clear behavior when the target size is insufficient.
  • Documentation

    • Expanded table formatting guidance, including sizing priorities and content-height considerations.

@github-actions github-actions Bot added the size/M Single-domain feat or fix with limited business impact label Jul 16, 2026
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The Slides XML schema now exposes optional table width and height attributes and documents deterministic allocation for columns and rows. The XML format guide adds matching rules and an example covering explicit sizes, remaining space, insufficient dimensions, and content-driven row height requirements.

Changes

Table sizing behavior

Layer / File(s) Summary
Table sizing contract and documentation
skills/lark-slides/references/slides_xml_schema_definition.xml, skills/lark-slides/references/xml-format-guide.md
The schema adds optional table.width and table.height attributes, documents allocation and fallback rules for columns and rows, and the format guide adds matching guidance with an XML example.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • larksuite/cli#389: Updates the same Slides XML schema and format-guide documentation set.

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately reflects the documentation-focused update to table sizing dimensions.
Description check ✅ Passed The description matches the required template and covers summary, changes, test plan, and related issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/slide-table-dimensions

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.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@skills/lark-slides/references/xml-format-guide.md`:
- Around line 266-269: Update the allocation rules section in the XML format
guide to include redistribution of extra space by current-size weights when all
dimensions are explicitly set, and specify that unset columns and rows use
defaults of 110 and 37 respectively when remaining space is insufficient.
Preserve the existing rules while documenting that the final total is determined
after these fallbacks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee6fab80-306d-4b69-bc94-93f6ca4a5aea

📥 Commits

Reviewing files that changed from the base of the PR and between 7081960 and dae3e55.

📒 Files selected for processing (2)
  • skills/lark-slides/references/slides_xml_schema_definition.xml
  • skills/lark-slides/references/xml-format-guide.md

Comment on lines +266 to +269
- 已设置的列宽和行高优先保留;未设置的列宽、行高优先使用目标总宽度或总高度分配剩余空间。
- 如果所有列宽或行高都未设置,则目标总宽度或总高度会在各列或各行之间分配。
- 如果目标尺寸不足以容纳已设置的尺寸,则保留已设置值,并以最终列宽或行高总和为准。
- 行高低于单元格内容高度时,需要手动增大行高。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Mirror the schema’s complete allocation contract here.

These bullets omit two important rules: extra space is redistributed by current-size weights when every dimension is explicit, and insufficient remaining space causes unset entries to fall back to defaults (110 for columns, 37 for rows) before the final total is determined. Without those details, guide users may implement behavior that differs from the schema.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/lark-slides/references/xml-format-guide.md` around lines 266 - 269,
Update the allocation rules section in the XML format guide to include
redistribution of extra space by current-size weights when all dimensions are
explicitly set, and specify that unset columns and rows use defaults of 110 and
37 respectively when remaining space is insufficient. Preserve the existing
rules while documenting that the final total is determined after these
fallbacks.

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.96%. Comparing base (7081960) to head (dae3e55).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1920   +/-   ##
=======================================
  Coverage   74.96%   74.96%           
=======================================
  Files         892      892           
  Lines       94058    94058           
=======================================
  Hits        70506    70506           
  Misses      18139    18139           
  Partials     5413     5413           

☔ View full report in Codecov by Harness.
📢 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.

@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@dae3e5501db7238a6bf59efd278f8f781257d30d

🧩 Skill update

npx skills add larksuite/cli#docs/slide-table-dimensions -y -g

</table>
```

- 已设置的列宽和行高优先保留;未设置的列宽、行高优先使用目标总宽度或总高度分配剩余空间。

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

好复杂的逻辑,有种把复杂度都给模型的感觉

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

Labels

size/M Single-domain feat or fix with limited business impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants