Repository navigation
Import ink tables and legacy stickers from Microsoft Whiteboard (1.7.3) - #175
Merged
Merged
Conversation
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
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>
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.
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
toWhiteboardTyperegistration, so the web client falls back todata-whiteboard-type="Unknown".TableComponentdraws it as a CSS grid:grid-template-columnsandgrid-template-rowsgive each track asminmax(<size>px, auto), and eachdiv.inkCellContainerhas a4px solidborder in the table's color with a-2pxmargin, so the border sits over the grid line. Inside a cell, adivshifts the ink by the column's and row's negative offsets, and each ink group sits in a collection childdivwith its ownleft,top, andtransform, holding the usual ink group SVG. The importer now looks inside anUnknownobject fordiv.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. AnUnknownobject without a table is still reported. The web client draws a placeholder instead of the grid when itsEnableTablesflag is off, and that case stays reported asUnknown.Legacy stickers.
LegacyStickerconverts to the same image content as a picture, with a caption aspect: adivmoved from the picture's corner by itstransform, atfont-size30 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
Unknownobject 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