Repository navigation
Replies: 1 comment
|
Another plugin that needs this: Source Control, a VS Code style Source Control panel. Its diff tab draws code itself (line numbers, changed words marked within changed lines, the two versions side by side), so no host component can draw it for us. Today the diff hardcodes its font: the app's default mono stack at a fixed size, with lines 1.5 times that, as The proposed read-only The syntax theme is in the same position. Since |
Uh oh!
There was an error while loading. Please reload this page.
What are you trying to do?
Build a plugin that renders code, diffs and shell output (for example a replacement tool-call card) that looks like the rest of Paseo.
How do you do it today?
PluginThemeonly carries colors, so the plugin has to pick fonts itself. Web fonts it embeds do not exist on iOS and Android, so code falls back to the proportional system font: on iPhone the plugin's code blocks, diffs and shell output rendered proportionally, while the host's ownui-monospacerendered correctly. The plugin also ignores the code font size and font family a user sets under Appearance.Where does Paseo get in the way?
The values exist in the app (
theme.fontFamily,fontSize.base/content/code,lineHeight.diff, set byapplyAppearance) but are not passed to plugins.What would a better workflow look like?
An optional, read-only
theme.typographyonPluginThemewith the UI and mono font stacks, the UI/content/code font sizes and the code line height, filled from the live theme so appearance changes reach plugins through the existing theme prop update. Nothing in the protocol changes; older apps simply do not send it.A working prototype is on a branch (one commit, with tests and docs): RoundRedDot/paseo@main...RoundRedDot:paseo:feat/plugin-theme-typography
On an iPhone Air simulator with the prototype, changing Appearance from code size 12 / default mono to 18 / Courier updated the plugin's code blocks with no reload:
(Prototype implemented and verified with an AI coding agent on a local simulator.)
All reactions