Import groups from Microsoft Whiteboard, flattened (1.7.4) - #182
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GroupFluidObjectis how the Microsoft Whiteboard web client writes a group of objects: it is thetoWhiteboardTypeof itsGroupcontent 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
divwith the rolecollection, and for each member a wrapperdivholding adivnamed after the member's own origin (topLeftorcenter) with itsleft,top, andtransform, holding the member's content. A member can be a group.What changed.
ReadTemplatebecameReadCollection, used for templates and groups. It reads only the collection's own children and recurses into a child that is a collection.HtmlTagsnow yields the end of eachdivas a tag named/divso that depth can be counted; no reader matches that name, and all 19 samples import with the same items.Anchor.Insidenow keeps the child's alignment.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