Skip to content

Import groups from Microsoft Whiteboard, flattened (1.7.4) - #182

Merged
marcosqlbi merged 1 commit into
mainfrom
feature/ms-whiteboard-groups
Sep 30, 2026
Merged

marcosqlbi merged 1 commit into
mainfrom
feature/ms-whiteboard-groups

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

GroupFluidObject is how the Microsoft Whiteboard web client writes a group of objects: it is the toWhiteboardType of its Group content type. #177 took the name for live Fluid content and gave it the Loop reader, so a group and everything in it was reported as left out. No sample holds a group, because the Windows client does not offer grouping; the markup was read from the web client's public code.

How a group is drawn. Its conversion makes a collection, as for a legacy template, without a title: a div with the role collection, and for each member a wrapper div holding a div named after the member's own origin (topLeft or center) with its left, top, and transform, holding the member's content. A member can be a group.

What changed.

  • ReadTemplate became ReadCollection, used for templates and groups. It reads only the collection's own children and recurses into a child that is a collection. HtmlTags now yields the end of each div as a tag named /div so that depth can be counted; no reader matches that name, and all 19 samples import with the same items.
  • A child keeps its own origin: a centered one is read as centered, and a corner-placed picture, shape, or sticker moves by half its size, because those are centered at the top level. Anchor.Inside now keeps the child's alignment.
  • The child dispatcher reads every kind as its top-level counterpart is read: besides ink, notes, grids, lists, text, pictures, and shapes, now tables, sticker captions, connectors, link cards, Loop content, apps, work items, custom objects, placeholders, and nested collections. This also closes the gap where a connector, a link card, or a sticker's caption inside a legacy template was lost.
  • The placeholder check now steps aside for any object that holds a collection, so a group whose children are all centered is not taken for a placeholder.

Flattened. The board has no groups (grouping as a saved object is out of scope in docs/design-objects.md), so a group becomes its members, each where it was and in its drawing order. The import doc has a new section, When the board has groups, listing what to change once grouping exists, and the design doc's out-of-scope line links to it.

A new Core smoke test covers a scaled group holding a note, a centered picture, a nested group with a centered ellipse and ink, and a member of an unknown kind. The template tests pass on the new reader. The solution builds clean and both harnesses pass.

1.7.4 is not released yet, so this adds an entry to its notes and the version stays 1.7.4. The site's export page lists groups.

🤖 Generated with Claude Code

GroupFluidObject is a group of objects, not Fluid content as #177 read it, so a group
and everything in it was reported as left out. A group is drawn as a collection, as a
template is. Templates and groups now share one reader that takes only the collection's
own children, keeps each child's origin, reads a nested collection the same way, and
reads every kind of child as its top-level counterpart is read. The tokenizer yields the
end of each div so that depth can be counted.

The board has no groups, so a group becomes its members. The import doc says what to
change once grouping exists, and the design doc points there.

Read from the web client's group conversion and CollectionComponent, because no sample
holds a group. It joins the 1.7.4 notes, which is not released yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcosqlbi
marcosqlbi merged commit 3fc625f into main Sep 30, 2026
5 checks passed
@marcosqlbi
marcosqlbi deleted the feature/ms-whiteboard-groups branch September 30, 2026 18:59
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