Skip to content

Commit c4e4f96

Browse files
improvement(settings): draw the sprout as an emcn line icon, move to Platform
The emoji rendered in the platform's own colors, so it was the one glyph in the nav that ignored --text-icon. Replaced with a hand-drawn emcn Sprout (24 grid, 1.55 stroke, currentColor) matching the house style, renamed the tab to Self hosting, and regrouped it under Platform — self-hosting is deployment-wide, not per-workspace. Still self-hosted-only.
1 parent 2fe9e32 commit c4e4f96

6 files changed

Lines changed: 44 additions & 33 deletions

File tree

apps/sim/app/workspace/[workspaceId]/settings/navigation.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('unified settings navigation', () => {
5151
{ id: 'sandboxes', label: 'Sandboxes', section: 'workspace' },
5252
{ id: 'inbox', label: 'Sim Mailer', section: 'workspace' },
5353
{ id: 'recently-deleted', label: 'Recently deleted', section: 'workspace' },
54-
{ id: 'self-host', label: 'Self-host', section: 'workspace' },
54+
{ id: 'self-host', label: 'Self hosting', section: 'platform' },
5555
{ id: 'sso', label: 'Single sign-on', section: 'organization' },
5656
{ id: 'sessions', label: 'Session policies', section: 'organization' },
5757
{ id: 'data-retention', label: 'Data retention', section: 'organization' },
@@ -88,7 +88,6 @@ describe('unified settings navigation', () => {
8888
'apikeys',
8989
'sandboxes',
9090
'recently-deleted',
91-
'self-host',
9291
])
9392
expect(idsForSection('organization')).toEqual([
9493
'organization',
@@ -102,7 +101,7 @@ describe('unified settings navigation', () => {
102101
'data-retention',
103102
'data-drains',
104103
])
105-
expect(idsForSection('platform')).toEqual(['admin', 'mothership'])
104+
expect(idsForSection('platform')).toEqual(['admin', 'mothership', 'self-host'])
106105
})
107106

108107
it('derives every unified item from exactly one registry entry', () => {

apps/sim/components/icons.tsx

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8944,24 +8944,3 @@ export function ZohoDeskIcon(props: SVGProps<SVGSVGElement>) {
89448944
</svg>
89458945
)
89468946
}
8947-
8948-
/**
8949-
* The Self-host settings mark — a sprout, for a deployment you grow yourself.
8950-
*
8951-
* Text rather than an SVG because the icon set ships no botanical glyph. It is
8952-
* consequently the one nav mark that keeps its own colors instead of inheriting
8953-
* `--text-icon`, and it renders in the host platform's emoji font. The explicit
8954-
* font size pins the glyph to the 14px the line icons around it optically read
8955-
* as, independent of whatever the consumer's `size-*` box sets.
8956-
*/
8957-
export function SproutIcon({ className }: { className?: string }) {
8958-
return (
8959-
<span
8960-
className={`inline-flex items-center justify-center text-sm leading-none ${className ?? ''}`}
8961-
role='img'
8962-
aria-label='Self-host'
8963-
>
8964-
🌱
8965-
</span>
8966-
)
8967-
}

apps/sim/components/settings/navigation.test.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,17 @@ describe('settings navigation boundaries', () => {
180180
})
181181

182182
/**
183-
* The sprout is a text glyph, not an SVG line icon — a swap back to an icon
184-
* component would silently drop the mark this section is recognized by.
183+
* The mark must be a line icon that inherits `--text-icon` like every other
184+
* nav glyph — an emoji would render in the platform's own colors and be the
185+
* one colored item in a monochrome icon column.
185186
*/
186-
it('marks the Self-host section with the sprout glyph', () => {
187+
it('marks the Self hosting section with a currentColor line icon', () => {
187188
const selfHost = buildUnifiedSettingsNavigation().find(({ id }) => id === 'self-host')
189+
const markup = renderToStaticMarkup(createElement(selfHost!.icon, {}))
188190

189-
expect(renderToStaticMarkup(createElement(selfHost!.icon, {}))).toContain('\u{1F331}')
191+
expect(selfHost?.label).toBe('Self hosting')
192+
expect(markup).toContain('<svg')
193+
expect(markup).toContain('stroke="currentColor"')
190194
})
191195

192196
it('keeps the Sandboxes section on the pre-Daytona E2B flag alone', () => {

apps/sim/components/settings/navigation.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
Settings,
1717
ShieldCheck,
1818
Shuffle,
19+
Sprout,
1920
TerminalWindow,
2021
TrashOutline,
2122
Upload,
@@ -24,7 +25,7 @@ import {
2425
Wrench,
2526
} from '@sim/emcn/icons'
2627
import { type PermissionType, permissionSatisfies } from '@sim/platform-authz/workspace'
27-
import { CodeIcon, McpIcon, SproutIcon } from '@/components/icons'
28+
import { CodeIcon, McpIcon } from '@/components/icons'
2829
import { getEnv, isTruthy } from '@/lib/core/config/env'
2930
import {
3031
isAccessControlEnabled,
@@ -689,13 +690,13 @@ export const SETTINGS_SECTION_REGISTRY: readonly SettingsSectionRegistryEntry[]
689690
},
690691
},
691692
{
692-
label: 'Self-host',
693-
icon: SproutIcon,
693+
label: 'Self hosting',
694+
icon: Sprout,
694695
unified: {
695696
id: 'self-host',
696697
description: 'Manage this deployment from the Sim managed service.',
697-
group: 'workspace',
698-
order: 10,
698+
group: 'platform',
699+
order: 2,
699700
requiresSelfHosted: true,
700701
},
701702
planes: {

packages/emcn/src/icons/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ export { Shuffle } from './shuffle'
8989
export { Sim } from './sim'
9090
export { Slash } from './slash'
9191
export { Split } from './split'
92+
export { Sprout } from './sprout'
9293
export { Square } from './square'
9394
export { SquareArrowUpRight } from './square-arrow-up-right'
9495
export { Table } from './table'

packages/emcn/src/icons/sprout.tsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type { SVGProps } from 'react'
2+
3+
/**
4+
* Sprout icon component - a seedling with two leaves
5+
* @param props - SVG properties including className, fill, etc.
6+
*/
7+
export function Sprout(props: SVGProps<SVGSVGElement>) {
8+
return (
9+
<svg
10+
width='24'
11+
height='24'
12+
viewBox='0 0 24 24'
13+
fill='none'
14+
stroke='currentColor'
15+
strokeWidth='1.55'
16+
strokeLinecap='round'
17+
strokeLinejoin='round'
18+
xmlns='http://www.w3.org/2000/svg'
19+
aria-hidden='true'
20+
{...props}
21+
>
22+
<path d='M12 20.5V11' />
23+
<path d='M12 14.75Q4.94 15.12 3.5 8.2Q10.56 7.83 12 14.75Z' />
24+
<path d='M12 11.25Q19.06 11.62 20.5 4.7Q13.44 4.33 12 11.25Z' />
25+
</svg>
26+
)
27+
}

0 commit comments

Comments
 (0)