Skip to content

Import legacy templates from Microsoft Whiteboard (1.7.4) - #176

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

marcosqlbi merged 1 commit into
mainfrom
feature/ms-whiteboard-legacy-templates

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

Templates from boards made with the Windows 10 app (LegacyTemplate) were reported as left out. No sample holds one, so the markup was read from the Microsoft Whiteboard web client's public code, as the lists, tables, and stickers were in #174 and #175.

The web client converts a legacy template into a collection, drawn by CollectionComponent: one div.topLeft child per item with its own left, top, and transform, holding the content of one object without the anchor around it. The first child is the title, a textbox.templateTitle; the exported stylesheet draws it as a white panel 60 pixels tall with a 4-pixel #0C34FA bar on top, 6 and 8 pixels of padding, and bold 24-pixel text. Every child is moved by the same offset so that none sits left of or above the title. When the web client's EnableTemplates flag is off it draws a placeholder instead, and that case stays reported.

The importer reads the title as a filled rectangle for the bar and a bold label, which is what shows on a white board. Each other child is recognized by what it holds and read by the existing reader for that kind (ink, a note, a note grid, a list, a text box, a picture, or a shape including the older ellipse and polygon) through the child's anchor composed with the template's. A picture or a shape moves by half its size, because a child is placed from its corner while those are centered on their anchor at the top level. A child of any other kind is counted as a template item in the message after the import.

A new Core smoke test builds a template with a title, a note, a picture, scaled ink, an older polygon, and a child of an unknown kind, plus a template drawn as a placeholder, and checks every position and count. The page was also drawn through the application's renderer. All 19 samples still import unchanged. The solution builds clean and both harnesses pass.

1.7.3 is released, so the version goes to 1.7.4, with a CHANGELOG entry; the import doc and the site's export page describe templates.

🤖 Generated with Claude Code

A template from the Windows 10 app is a collection: a title and the items placed on it,
each a child placed from its corner holding the content of one object. The title becomes
its blue bar and a bold label, and each child is read by the reader for what it holds,
through an anchor composed from the template and the child.

The markup comes from the web client's template conversion and CollectionComponent,
because no sample holds a template.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcosqlbi
marcosqlbi merged commit e837502 into main Sep 30, 2026
5 checks passed
@marcosqlbi
marcosqlbi deleted the feature/ms-whiteboard-legacy-templates branch September 30, 2026 15:35
marcosqlbi added a commit that referenced this pull request Sep 30, 2026
Loop components (`LoopObject`, and `HostedFluidObject` or
`GroupFluidObject` holding one) and apps made by Copilot
(`AppIframeHost`) were reported as left out. No sample holds either, so
the markup was read from the Microsoft Whiteboard web client's public
code, as for #174 to #176.

The export keeps neither kind of content. Its export code
(`replaceLoopIFramesWithPlaceholders` and
`replaceAppFrameIFramesWithPlaceholders`) does this:

- **Loop component.** The export replaces the content of each
`div.loopParentDiv` with an `a` to the component's `data-loop-url`
around the picture `LoopExportThumbnail.svg`, which it does not embed.
The importer makes it a Markdown text container titled *Loop* with a
link to that address, as wide as the component, or the words *Loop
component* when there is no address. `HostedFluidObject` and
`GroupFluidObject` are read the same way when they hold a Loop element
and are reported otherwise.
- **App.** `AppIframeHost` is an app that Copilot generated, running in
a sandboxed `iframe`, not a video. The export replaces the frame with a
`#faf9f8` panel and keeps the `div.appFrameContainer` with its size and
its header, whose title reads *App* in the board's language; the app's
name, code, and state are not in the export. The importer makes it a
rectangle of that size in the panel's color with the header's title as
its text, so the space it took stays on the board.

Both are placed by the anchor's alignment: `Anchor` now records whether
its `center` class is present.

A new Core smoke test builds a sized Loop component with its link, a
centered one without an address or a size, an app frame, and a
`HostedFluidObject` without a Loop element, which is still reported. All
19 samples still import unchanged. The solution builds clean and both
harnesses pass.

1.7.4 is not released yet, so this joins its notes as a second entry and
the version stays 1.7.4. The import doc and the site's export page
describe both.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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