Replace emoji icons with VS Code codicons in menus#11
Conversation
Robin-Reiche
left a comment
There was a problem hiding this comment.
Thanks for this, the icon work is genuinely an improvement 🙏 The emojis in the menus rendered inconsistently across platforms, ignored the theme and sat misaligned, exactly what you describe. Codicons fix all three: they use currentColor so they follow the menu and danger colors, they have consistent metrics, and the font is already bundled so there is no payload cost.
The core swap is correct and safe. I checked it properly: every glyph and the \eba0 codepoint exist in the bundled font, the display toggles were correctly moved from block to flex to match the new flex items, there is no XSS (the pinned row-index renderer only stringifies the numeric _origIndex), and exports are unaffected because the row-index column is filtered out there. The pinnedOrig regex still resolves because the codicon is a ::before and contributes no text.
I would like a bit of rework before merging though. Here is the honest reasoning 🤔
The main thing: the PR does two jobs. Alongside the icon swap it also ships new behavior. Unfreeze all columns (N) is a genuinely new action, and Unfreeze all rows (N) gets relocated so it now also appears in the body-row menu, not just on a pinned row, with its own separator-cleanup logic to support it. You did call it out in the description, so it is not hidden, but it does not fit under the title and it muddies the changelog and any future revert. I would prefer to split the unfreeze-all feature into its own PR so the icon change can stand on its own. Both are welcome, just separately 🙏
Smaller things, all in the icon part:
makeRowItem()is a nice helper, but the Freeze and Unfreeze row items still build their markup with rawinnerHTMLand an inline label instead of going through it. Because the label is not wrapped in a.row-ctx-labelspan there, those two items miss the flexgapspacing the others get, so they end up slightly misaligned. Routing them throughmakeRowItemfixes both the inconsistency and the spacing.- Two comments still describe the old 📌 emoji: the one above the
pinnedOrigregex indelete-row-col.ts(it documents that very regex, so it is load-bearing) and thevalueGettercomment inbuilder.ts(the marker moved to thecellRenderer). Worth a quick wording update so they stay accurate. - Tiny: the new
::beforerule usesfont-family: codiconunquoted while the@font-faceuses"codicon". It resolves fine, just tidier to match.
None of this is about the icons themselves, those are good and I want them in. Happy to merge the icon change as soon as it is split out from the unfreeze-all feature and the helper and comments are tidied up.
|
Thank you for the detailed feedback. I will address these changes and open a separate PR for the unfreeze feature. |
a5c59da to
5ea5961
Compare
|
Hi @Robin-Reiche , I've updated this PR based on your feedback:
Please review it again when you have time. Thank you! |
|
Thank you for this. The emoji icons always looked a little out of place, and moving the menus to Codicons makes the whole editor feel like one set. Merged and going out in v1.11.0. |
Context menus (column & row), the pin markers on headers/gutter, and dynamic labels were using emojis, which render inconsistently across platforms and caused misaligned icons and uneven spacing.
Switched to codicons (already loaded in the webview).
Added "Unfreeze all columns/rows (N)" to the context menu. It appears when multiple items are frozen, allowing users to clear the entire freeze set at once.
Before:

After:

Unfreeze all:
