Skip to content

docs(website): build sheet headers in examples with HeadBuilder API - #1263

Merged
GOODBOY008 merged 2 commits into
apache:mainfrom
bengbengbalabalabeng:docs-add-headbuilder-api-example
Oct 26, 2026
Merged

GOODBOY008 merged 2 commits into
apache:mainfrom
bengbengbalabalabeng:docs-add-headbuilder-api-example

Conversation

@bengbengbalabalabeng

Copy link
Copy Markdown
Contributor

Purpose of the pull request

As title

What's changed?

Checklist

  • I have read the Contributor Guide.
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

@GOODBOY008 GOODBOY008 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the update! Verified against the codebase:

  • HeadBuilder.forSimple(...) returns List<List<String>>, matching the head(List) overload, and produces the same single-level head as the previous Arrays.asList(Collections.singletonList(...)) construction.
  • The builder -> builder.column(...) lambda resolves to AbstractParameterBuilder#head(Consumer<HeadBuilder>); each column("Main Title", "Group A", "Name") call expands to the same per-column path as the old inner lists, so the merge-strategy example keeps its exact semantics.
  • HeadBuilder has been available since 2.1.0-incubating (#943), so the docs won't advertise an unreleased API.
  • EN/zh pages stay in sync, and no stale List<List<String>> head construction is left behind.

One minor follow-up (non-blocking): in website/docs/sheet/write/head.md the sentence right below the merge-strategy example still says "Each inner list is one column..." — with the new builder.column(...) style it would read better as "Each column(...) call defines one column, listing its title from the top level down."

@GOODBOY008
GOODBOY008 merged commit 8a3a941 into apache:main Oct 26, 2026
5 checks passed
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.

2 participants