Skip to content

Import ink tables and legacy stickers from Microsoft Whiteboard (1.7.3) - #175

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

marcosqlbi merged 1 commit into
mainfrom
feature/ms-whiteboard-tables-and-stickers

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

Two more object types from boards made with the Windows 10 app, both reported as left out until now. Neither appears in the 19 sample boards, so their markup was read from the Microsoft Whiteboard web client's public code, as the lists and GIFs were in #174.

Ink tables. A table drawn with ink ("ink to table") has no toWhiteboardType registration, so the web client falls back to data-whiteboard-type="Unknown". TableComponent draws it as a CSS grid: grid-template-columns and grid-template-rows give each track as minmax(<size>px, auto), and each div.inkCellContainer has a 4px solid border in the table's color with a -2px margin, so the border sits over the grid line. Inside a cell, a div shifts the ink by the column's and row's negative offsets, and each ink group sits in a collection child div with its own left, top, and transform, holding the usual ink group SVG. The importer now looks inside an Unknown object for div.inkTableContainer: each cell becomes a square-cornered rectangle with a 4-unit outline, then the cells' ink comes on top, read by the existing ink reader through an anchor composed from the table, the cell's corner and shift, and the group's place. An Unknown object without a table is still reported. The web client draws a placeholder instead of the grid when its EnableTables flag is off, and that case stays reported as Unknown.

Legacy stickers. LegacySticker converts to the same image content as a picture, with a caption aspect: a div moved from the picture's corner by its transform, at font-size 30 with the family and weight in its style, holding a text editor as wide as the caption and smaller when the text shrank to fit. The sticker becomes its picture and a label centered across the caption's box, turned and scaled with the sticker.

A new Core smoke test builds a page the way those components draw them: a two-by-two table with ink in one cell, a scaled sticker with a caption, and an Unknown object without a table. The page was also drawn through the application's own renderer. All 19 samples still import unchanged. The solution builds clean and both harnesses pass.

The import doc records both, the site's export page, the guide, and README mention tables, and the 1.7.3 notes, not yet released, cover them. The version stays 1.7.3.

🤖 Generated with Claude Code

An ink table from the Windows 10 app arrives as an Unknown object holding the table's
grid. Each cell becomes a square-cornered rectangle in the border's color, and each
cell's ink is read through its group's place inside the cell. A legacy sticker becomes
its picture and a label for its caption, centered across the caption's box.

Both are read from the web client's TableComponent and caption aspect, because no
sample holds either. They join the 1.7.3 notes, which is not released yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcosqlbi
marcosqlbi merged commit 0dd957f into main Sep 30, 2026
5 checks passed
@marcosqlbi
marcosqlbi deleted the feature/ms-whiteboard-tables-and-stickers branch September 30, 2026 14:28
marcosqlbi added a commit that referenced this pull request Sep 30, 2026
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](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