From 4eed41499a16daf439ebf0399840b810f1aaab44 Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Sat, 29 Nov 2025 06:55:14 +0100 Subject: [PATCH] feat(shared-ui): extend PillNavigation with tab groups and migrate Picture app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add PillTabGroup component for segmented controls within navigation - Extend PillNavigation with elements prop supporting tabs and dividers - Add new types: PillTabOption, PillTabGroupConfig, PillDivider, PillNavElement - Migrate Picture app from custom Sidebar to shared PillNavigation - Add transparent filter bars to Gallery and Explore pages - Add dev credentials auto-fill on logo click in shared LoginPage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../apps/web/src/routes/app/+layout.svelte | 145 ++++++++-- .../web/src/routes/app/explore/+page.svelte | 93 +++++++ .../web/src/routes/app/gallery/+page.svelte | 65 +++++ .../shared-auth-ui/src/pages/LoginPage.svelte | 17 +- .../src/navigation/PillNavigation.svelte | 77 +++++- .../src/navigation/PillTabGroup.svelte | 251 ++++++++++++++++++ packages/shared-ui/src/navigation/index.ts | 5 + packages/shared-ui/src/navigation/types.ts | 38 +++ 8 files changed, 661 insertions(+), 30 deletions(-) create mode 100644 packages/shared-ui/src/navigation/PillTabGroup.svelte diff --git a/apps/picture/apps/web/src/routes/app/+layout.svelte b/apps/picture/apps/web/src/routes/app/+layout.svelte index 9eca5fa97..a89e0fdfb 100644 --- a/apps/picture/apps/web/src/routes/app/+layout.svelte +++ b/apps/picture/apps/web/src/routes/app/+layout.svelte @@ -1,17 +1,50 @@ @@ -283,23 +289,24 @@
- +

{appName}

diff --git a/packages/shared-ui/src/navigation/PillNavigation.svelte b/packages/shared-ui/src/navigation/PillNavigation.svelte index 997f4a057..9ba26b61c 100644 --- a/packages/shared-ui/src/navigation/PillNavigation.svelte +++ b/packages/shared-ui/src/navigation/PillNavigation.svelte @@ -1,7 +1,8 @@ + +
+ {#if sectionLabel && isSidebarMode} + + {/if} +
+ {#each options as option, index} + {#if index > 0} +
+ {/if} + + {/each} +
+
+ + diff --git a/packages/shared-ui/src/navigation/index.ts b/packages/shared-ui/src/navigation/index.ts index 49f71ac2b..13502b13e 100644 --- a/packages/shared-ui/src/navigation/index.ts +++ b/packages/shared-ui/src/navigation/index.ts @@ -4,6 +4,7 @@ export { default as Sidebar } from './Sidebar.svelte'; export { default as SidebarSection } from './SidebarSection.svelte'; export { default as PillNavigation } from './PillNavigation.svelte'; export { default as PillDropdown } from './PillDropdown.svelte'; +export { default as PillTabGroup } from './PillTabGroup.svelte'; export type { NavItem, NavbarProps, @@ -13,4 +14,8 @@ export type { PillNavItem, PillDropdownItem, PillNavigationProps, + PillTabOption, + PillTabGroupConfig, + PillDivider, + PillNavElement, } from './types'; diff --git a/packages/shared-ui/src/navigation/types.ts b/packages/shared-ui/src/navigation/types.ts index e97d32051..e17d9dba7 100644 --- a/packages/shared-ui/src/navigation/types.ts +++ b/packages/shared-ui/src/navigation/types.ts @@ -39,6 +39,44 @@ export interface PillDropdownItem { active?: boolean; } +// ============ Pill Tab Group Types ============ + +export interface PillTabOption { + /** Unique identifier for the tab */ + id: string; + /** Icon name (predefined) */ + icon?: string; + /** Custom SVG icon HTML */ + iconSvg?: string; + /** Optional label (shown in sidebar mode) */ + label?: string; + /** Tooltip text */ + title?: string; + /** Whether this option is disabled */ + disabled?: boolean; +} + +export interface PillTabGroupConfig { + /** Discriminator for type checking */ + type: 'tabs'; + /** Tab options */ + options: PillTabOption[]; + /** Currently selected tab id */ + value: string; + /** Called when selection changes */ + onChange: (id: string) => void; + /** Optional section label (shown above in sidebar mode) */ + sectionLabel?: string; +} + +export interface PillDivider { + /** Discriminator for type checking */ + type: 'divider'; +} + +/** Union type for all elements that can appear in PillNavigation */ +export type PillNavElement = PillNavItem | PillTabGroupConfig | PillDivider; + export interface PillNavigationProps { /** Navigation items */ items: PillNavItem[];