Skip to content

feat(slides):update xsd - #2067

Merged
ethan-zhx merged 1 commit into
mainfrom
feat/update_xsd
Jul 28, 2026
Merged

feat(slides):update xsd#2067
ethan-zhx merged 1 commit into
mainfrom
feat/update_xsd

Conversation

@ethan-zhx

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

Copy link
Copy Markdown
Collaborator

Summary

Updates the Slides XML Schema Definition (XSD).

Changes

  • Updated skills/lark-slides/references/slides_xml_schema_definition.xml
  • Added and adjusted XSD element, attribute, and constraint definitions

Test Plan

  • Automated tests were not run because this change only updates the schema definition file.
  • Reviewed the committed diff to confirm the scope is limited to the XSD file.

Related Issues

  • None

Summary by CodeRabbit

  • New Features
    • Added support for fractional font sizes and more flexible text formatting.
    • Added customizable bullets, ordered-list starting numbers, and dynamic text fields.
    • Added LaTeX formula support within text content.
    • Added anchor-based image cropping options.
    • Expanded chart styling with gradients for lines, areas, bars, points, and sectors.
    • Added chart title font family customization.

@github-actions github-actions Bot added the size/L Large or sensitive change across domains or core paths label Jul 27, 2026
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The slides XML schema updates typography, list semantics, inline formulas and fields, image cropping, table documentation, and chart styling. Chart definitions add gradients and separate global configuration from series-level line and area configuration.

Changes

Slides XML schema updates

Layer / File(s) Summary
Text and list contracts
skills/lark-slides/references/slides_xml_schema_definition.xml
Font sizes support floating-point pixels; lists gain bullet customization and counter controls; formulas and dynamic fields are added to inline content.
Cropping and content documentation
skills/lark-slides/references/slides_xml_schema_definition.xml
Image cropping adds anchor-based behavior, and image/table documentation is clarified.
Chart gradients and series styling
skills/lark-slides/references/slides_xml_schema_definition.xml
Gradient types and fill/stroke gradient overrides are added across chart elements, with global and series-specific line and area types wired separately.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

  • larksuite/cli#1916: Updates the same slides schema with related chart gradient support and global-versus-series chart styling.

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and correctly points to the Slides XSD update.
Description check ✅ Passed The description follows the 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 feat/update_xsd

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: 2

🧹 Nitpick comments (1)
skills/lark-slides/references/slides_xml_schema_definition.xml (1)

2691-2717: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Constrain gradientMethod and document the geometry defaults.

gradientMethod is a free-form xs:string in a schema that enumerates every other style option, so nothing prevents unsupported values reaching renderers. Likewise x0/y0/x1/y1 (linear) and r0/r1 (radial) are all optional with no documented default or coordinate space, and XSD 1.0 can't express the conditional requirement — spell out the omitted-value behavior in the documentation so authors and renderers agree.

🤖 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/slides_xml_schema_definition.xml` around lines
2691 - 2717, Update ChartGradientType by replacing the free-form gradientMethod
xs:string with the schema’s existing constrained type for supported gradient
interpolation methods, if available. Expand its xs:documentation to define the
coordinate space and defaults for omitted x0/y0/x1/y1 and r0/r1 values, while
noting which geometry attributes apply to linear versus radial gradients.
🤖 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/slides_xml_schema_definition.xml`:
- Around line 907-911: Escape the four crop example elements within the
surrounding xs:documentation block so they are preserved as literal
documentation text rather than parsed child nodes. Update only the examples
beginning with the default crop usage and the top, left, and rect/presetHandlers
variants, keeping their displayed Chinese descriptions unchanged.
- Around line 1732-1743: Update the field complexType content model to accept
the same inline children as the other updated inline containers, including br,
formula, and field, while preserving its required type attribute. Ensure the p
documentation’s self-nesting statement matches the resulting field support,
either by enabling field self-nesting through the schema or excluding field from
that statement.

---

Nitpick comments:
In `@skills/lark-slides/references/slides_xml_schema_definition.xml`:
- Around line 2691-2717: Update ChartGradientType by replacing the free-form
gradientMethod xs:string with the schema’s existing constrained type for
supported gradient interpolation methods, if available. Expand its
xs:documentation to define the coordinate space and defaults for omitted
x0/y0/x1/y1 and r0/r1 values, while noting which geometry attributes apply to
linear versus radial gradients.
🪄 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 Plus

Run ID: cbb7a803-f9df-406b-8ba7-ccf31948b3f0

📥 Commits

Reviewing files that changed from the base of the PR and between 7abcaa7 and 6503eb4.

📒 Files selected for processing (1)
  • skills/lark-slides/references/slides_xml_schema_definition.xml

Comment thread skills/lark-slides/references/slides_xml_schema_definition.xml
Comment thread skills/lark-slides/references/slides_xml_schema_definition.xml
@github-actions

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

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

🧩 Skill update

npx skills add larksuite/cli#feat/update_xsd -y -g

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.16%. Comparing base (a7865cd) to head (6503eb4).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2067      +/-   ##
==========================================
+ Coverage   75.14%   75.16%   +0.01%     
==========================================
  Files         911      912       +1     
  Lines       96322    96451     +129     
==========================================
+ Hits        72385    72495     +110     
- Misses      18370    18380      +10     
- Partials     5567     5576       +9     

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

@fangshuyu-768 fangshuyu-768 left a comment

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.

I validated the updated XSD with positive and negative instances. The schema is well-formed and compiles, but the inline contract issues below are still reproducible on the current head.

Comment thread skills/lark-slides/references/slides_xml_schema_definition.xml
Comment thread skills/lark-slides/references/slides_xml_schema_definition.xml
Comment thread skills/lark-slides/references/slides_xml_schema_definition.xml
Comment thread skills/lark-slides/references/slides_xml_schema_definition.xml
@ethan-zhx
ethan-zhx merged commit 57db1b3 into main Jul 28, 2026
39 of 50 checks passed
@ethan-zhx
ethan-zhx deleted the feat/update_xsd branch July 28, 2026 06:43
@liangshuo-1 liangshuo-1 mentioned this pull request Jul 28, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Large or sensitive change across domains or core paths

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants