styling-sidebar-products
БесплатноЗапускает вложенные скриптыНе проверенHow products and pages appear in the PostHog sidebar: which category they sit in, which icon and color they get, and which groups share a color gradient. Use…
от PostHog★ 41 278 звёзд на GitHubОб этом скилле
Styling sidebar products
The sidebar reads every entry from the product manifests. An entry needs three things to look right: a category, an icon type that only it uses in the sidebar, and a color. Some categories share a gradient, so a new entry in one of them changes its neighbors' colors too.
Where things live
| What | File |
|---|---|
Entry definition (path, category, iconType, iconColor, href, flag) |
products/<product>/manifest.tsx, under treeItemsProducts or treeItemsMetadata |
| Icon glyph and default color per icon type | iconTypes in frontend/src/layout/panel-layout/ProjectTree/defaultTree.tsx |
| The icon type union | FileSystemIconType in frontend/src/queries/schema/schema-general.ts |
| Color values | --color-product-<name>-light and -dark in frontend/src/styles/base.scss |
| Category names | ProductItemCategory in schema-general.ts |
| Category order in the sidebar | CATEGORY_ORDER in frontend/src/layout/panel-layout/navbar/tabs/productsCatalog.ts |
| Sidebar-only groupings (Popular, hidden tab pages, pinned rows) | navProductsTabLogic.ts and productsCatalog.ts in the same folder |
| Custom icons that are components, like the Support badge | ProjectTree/customIconRegistry.tsx |
Rules
One icon per entry. No two sidebar entries share a glyph.
If the icon type you want is also used outside the sidebar, for example event_definition or data_pipeline_metadata, add a new icon type instead of changing the shared one.
A new icon type goes into the FileSystemIconType union and the iconTypes map, and then hogli build:schema regenerates the Python enums.
One color, set in both places. Put the same color variable pair on the iconTypes entry and on the manifest entry's iconColor.
The sidebar row uses the manifest color. Scene titles, search and other surfaces use the map color.
When the two disagree, the product shows two colors across the app.
Always give both a light and a dark variable, because a single value is reused for dark mode and reads poorly there.
Starred entries follow the product. A star is a FileSystemShortcut row. It stores only the product name as path, iconType || type as type, and href.
Stars come from two writers:
- The frontend (
shortcutFromEntryinProjectTree/utils.tsx) setshref. The customize dialog saves all its changes in onefile_system_shortcut/bulk_update/call. - The backend (
star_productsinposthog/models/file_system/starred_products.py) stars the default products when a user gets a project, and the products of a new product intent. It sets nohref, because product URLs exist only in the frontend.
When shortcuts load, withProductShortcutHref in defaultTree.tsx fills in a missing href by product name.
The file tree then looks up the product by href (getSidebarProduct in defaultTree.tsx) and uses its current name, tags, icon and color. It wraps custom icons in ProductIconWrapper.
The sidebar rows and the customize dialog match a star to a product by name or href (findProductShortcut in ProjectTree/utils.tsx).
A star keeps the name it had when it was created. When you rename a product, keep its href stable, so frontend-created stars still match by href.
Backend-created stars get an href only while their stored name matches the current product name. A stable href does not keep these stars after a rename.
Do not add a per-surface icon override. Fix the manifest and the map, and the star follows.
Pinned rows stay neutral. Home, Self-driving and Activity and people have no color on purpose.
Color families
Four categories use one gradient each. The steps follow the order the sidebar shows, which is alphabetical by label.
| Category | Gradient | Light end points |
|---|---|---|
| AI engineering | indigo to magenta | rgb(99 102 241) to rgb(196 60 218) |
| CDP | golden yellow to burnt orange | rgb(234 179 8) to rgb(194 65 12) |
| Schema | teal to deep blue | rgb(20 184 166) to rgb(29 78 216) |
| Tools |
Установить styling-sidebar-products в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл styling-sidebar-products?
How products and pages appear in the PostHog sidebar: which category they sit in, which icon and color they get, and which groups share a color gradient. Use when adding a product or data management page to the sidebar (treeItemsProducts or treeItemsMetadata in a products/*/manifest.tsx), giving an entry a new icon or color, moving an entry between sidebar categories, adding a category, or when a sidebar icon renders the wrong color, the wrong glyph, or differently once starred. Trigger terms: sidebar, nav, All products, Popular, category, iconType, iconColor, product icon, product color, gradient, starred icon.
Как установить скилл styling-sidebar-products?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл styling-sidebar-products запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic