docs(slides): sync chart gradient fields into slides xsd references#1916
docs(slides): sync chart gradient fields into slides xsd references#1916ethan-zhx wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughChart XML schema declarations add gradient structures and styling support across chart elements, separate global and series line/area configuration, update background and border semantics, and document the resulting XML usage and constraints. ChangesChart styling schema
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 329-335: The global styling guidance incorrectly references
chartStyle; update the documented global layer to chartPlot for chartLines,
chartAreas, chartBars, and chartPoints, while retaining the existing
series-level and single-element-level mounting guidance.
- Around line 326-334: The gradient placement documentation and schema
references must distinguish indexed elements from series-level entries: in
skills/lark-slides/references/xml-format-guide.md at lines 326-334, state that
indexed chartPoint and chartBar elements support only fillGradient, while
strokeGradient applies to series-level chartPoints and chartBars; update the
corresponding definitions in
skills/lark-slides/references/slides_xml_schema_definition.xml at lines
2524-2526 and 2675-2677 to enforce or document the same restriction.
🪄 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: adad7552-952e-4e63-97d1-ac073110d43f
📒 Files selected for processing (2)
skills/lark-slides/references/slides_xml_schema_definition.xmlskills/lark-slides/references/xml-format-guide.md
| **只能挂在系列级或单元素级,不要挂在 `<chartStyle>` 全局层。** transform 链路不消费全局层的渐变(`<chartStyle>` 下的 `<chartLines>` / `<chartAreas>` / `<chartBars>` / `<chartPoints>`),写了没有效果。 | ||
|
|
||
| 可挂载位置: | ||
|
|
||
| - ✅ 系列级:`<chartSeries>` 下的 `<chartLine>` / `<chartArea>` / `<chartBars>` / `<chartPoints>` / `<chartSectors>` | ||
| - ✅ 单元素级:`<chartBar index="…">` / `<chartPoint index="…">` / `<chartSector index="…">` | ||
| - ❌ 全局级:`<chartStyle>` 下的 `<chartLines>` / `<chartAreas>` / `<chartBars>` / `<chartPoints>` |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Use <chartPlot>, not <chartStyle>, for the global styling layer.
The XSD declares chartLines, chartAreas, chartBars, and chartPoints beneath ChartPlotType (Lines 2981-2988). The current wording directs consumers toward schema-invalid XML.
Proposed correction
-**只能挂在系列级或单元素级,不要挂在 `<chartStyle>` 全局层。**
+**只能挂在系列级或单元素级,不要挂在 `<chartPlot>` 全局层。**
-- ❌ 全局级:`<chartStyle>` 下的 ...
+- ❌ 全局级:`<chartPlot>` 下的 ...As per coding guidelines, output formats must be treated as machine-consumed interfaces.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| **只能挂在系列级或单元素级,不要挂在 `<chartStyle>` 全局层。** transform 链路不消费全局层的渐变(`<chartStyle>` 下的 `<chartLines>` / `<chartAreas>` / `<chartBars>` / `<chartPoints>`),写了没有效果。 | |
| 可挂载位置: | |
| - ✅ 系列级:`<chartSeries>` 下的 `<chartLine>` / `<chartArea>` / `<chartBars>` / `<chartPoints>` / `<chartSectors>` | |
| - ✅ 单元素级:`<chartBar index="…">` / `<chartPoint index="…">` / `<chartSector index="…">` | |
| - ❌ 全局级:`<chartStyle>` 下的 `<chartLines>` / `<chartAreas>` / `<chartBars>` / `<chartPoints>` | |
| **只能挂在系列级或单元素级,不要挂在 `<chartPlot>` 全局层。** transform 链路不消费全局层的渐变(`<chartStyle>` 下的 `<chartLines>` / `<chartAreas>` / `<chartBars>` / `<chartPoints>`),写了没有效果。 | |
| 可挂载位置: | |
| - ✅ 系列级:`<chartSeries>` 下的 `<chartLine>` / `<chartArea>` / `<chartBars>` / `<chartPoints>` / `<chartSectors>` | |
| - ✅ 单元素级:`<chartBar index="…">` / `<chartPoint index="…">` / `<chartSector index="…">` | |
| - ❌ 全局级:`<chartPlot>` 下的 `<chartLines>` / `<chartAreas>` / `<chartBars>` / `<chartPoints>` |
🤖 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 329 - 335,
The global styling guidance incorrectly references chartStyle; update the
documented global layer to chartPlot for chartLines, chartAreas, chartBars, and
chartPoints, while retaining the existing series-level and single-element-level
mounting guidance.
Source: Coding guidelines
🚀 PR Preview Install Guide🧰 CLI updatenpm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@f8d2ab1ee2a0a15db22c05500407ad3b2dbff625🧩 Skill updatenpx skills add larksuite/cli#feat/slides-chart-gradient-xsd -y -g |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1916 +/- ##
=======================================
Coverage 74.95% 74.96%
=======================================
Files 892 892
Lines 94056 94058 +2
=======================================
+ Hits 70502 70506 +4
+ Misses 18140 18139 -1
+ Partials 5414 5413 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Mirror ai_xsd MR !56 (chart format fields) into the slides skill reference bundle: add ChartGradient* types and split ChartLineType / ChartAreaType into Global/Series variants in slides_xml_schema_definition.xml, and document the series-only fillGradient/strokeGradient contract plus chartBackground/chartBorder default-value adjustments in xml-format-guide.md so authors do not attach gradients on the unconsumed chartStyle global layer.
a26a399 to
f8d2ab1
Compare
Summary
Mirror ai_xsd MR !56 (chart format fields) into the slides skill reference bundle so authoring guidance matches the shipping XSD: gradient fields must be attached at the series or single-element layer, not the unconsumed
chartStyleglobal layer.Changes
ChartGradientKindType/ChartGradientStopType/ChartGradientStopsType/ChartGradientTypeinreferences/slides_xml_schema_definition.xml, and splitChartLineType/ChartAreaType/ChartBarsType/ChartSectorsTypeintoChartGlobal*(chartStyle layer) vsChartSeries*(chartSeries layer) so only series-level types carryfillGradient/strokeGradient.references/xml-format-guide.md: allowed mount points (series / single-element), disallowed mount point (chartStyleglobal layer), plus<stops>minOccurs=2,typeenum, and radial vs linear coordinate attrs.chartBackgrounddefault-value semantics (omit = renderer default, not white) andchartBorder"no border" equivalence (width="0"vs omit).Test Plan
xmllint --noout --schema skills/lark-slides/references/slides_xml_schema_definition.xml <positives>.xmlpasses for series-level and single-element gradients (C1-C6, C10-A/B, C11-A/B).xmllintrejects the three negative shapes:chartStyle > chartLinesgradient, single-stop<stops>, andtype="conic"(C7-C9).lark-cli slides +createon 8 positive pages: series/single-bar/single-sector fill gradients render as expected;chartBackgroundomit ↔ transparent stay visually identical;chartBorder width=0↔ omit stay visually identical.chartLine > strokeGradientdid not render on line charts in manual verification, and the server-side create still acceptschartStyle > chartLines > strokeGradient(XSD-only rejection). Tracked separately.Related Issues
Summary by CodeRabbit
New Features
0(or omitting the border).Documentation