Custom sidebar: expose workspace emoji in data context
Custom JavaScript sidebars can already write the system clipboard through the gesture-gated clipboard.write(text) API from #19333, but their workspace context still has no separate emoji value. This adds an optional workspaces[i].emoji field derived from the display title's leading emoji grapheme, while preserving the full title value for existing sidebars.
The value travels through the typed workspace snapshot, is omitted when no leading emoji is present, and is covered by projection tests and the custom-sidebar contract documentation.
Closes #18988
Verification
python3 scripts/localize-changes(passed; no localization keys changed)python3 scripts/localization_catalog.py check(passed)python3 scripts/verify-local.py --only test-wiring(passed)- Swift package tests and syntax parsing were not run locally because this checkout has no
swiftc/Swift toolchain; CI should executeCustomSidebarDataContextBuilderTests.
Changelog
Added
- Expose a leading workspace emoji in custom sidebar workspace data.
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Adds an optional workspaces[i].emoji field to the custom sidebar data context, derived from the leading emoji grapheme of the workspace display title. Sidebars using the full title value are unaffected, and the field is omitted when no leading emoji exists. Closes #18988.
New Features
- Derives the emoji from the first grapheme of the display title and omits it when the title doesn't start with an emoji-presentation character.
- Updates
CustomSidebarWorkspaceSnapshotwith the optionalemojiproperty and documents the new field indocs/custom-sidebars.md.