Conversation
|
Overall: Nice feature addition! A few design suggestions to consider: 1. Combine Logo Settings into One SectionRather than two separate settings cards for Logo and Dark Logo, consider combining them into a single "Logo" section with both variants side-by-side. Benefits:
2. Simplify TopNavigationBar PropsInstead of passing two logo URL props and having the component select based on theme: export let organizationLogoUrl: string | undefined;
export let organizationLogoDarkUrl: string | undefined;
$: logoUrl = theme === "dark" && organizationLogoDarkUrl
? organizationLogoDarkUrl
: organizationLogoUrl;Use a single prop, with the selection logic in a derived store in the themes feature directory: // e.g., web-common/src/features/themes/organization-logo.ts
export const organizationLogoUrl = derived(
[themeControl, organizationData],
([$theme, $org]) => $theme === "dark" && $org?.logoDarkUrl
? $org.logoDarkUrl
: $org?.logoUrl
);This keeps TopNavigationBar simpler and makes the logic reusable if logos appear elsewhere. 3. Simplify
|
|
Thanks for the revisions! Two more issues to address: 1. Move
|
ericpgreen2
left a comment
There was a problem hiding this comment.
Looks good! A few minor nits to consider before merging:
-
Redundant organization data - The layout now returns both the full
organizationobject and individual URL properties (organizationLogoUrl,organizationLogoDarkUrl, etc.). Consider removing the individual properties and deriving them fromorganizationwhere needed. -
Unnecessary intermediate variable in
TopNavigationBar.svelte-$: logoUrl = organizationLogoUrl;could just useorganizationLogoUrldirectly. -
Type casts -
$themeControl as "light" | "dark"in the layout is safe but indicates theThemetype could be narrower. Alsourl as URLandawait parent() as {...}in+page.ts.
None of these are blocking - approving as-is.
This comment was developed in collaboration between Eric and Claude Code.
* feat: upload dark logo * format * comments * lint * comments * format * fix ts * poll * longer timeout * testing * format * test * handle org * test * format * format * lint
* feat: upload dark logo * format * comments * lint * comments * format * fix ts * poll * longer timeout * testing * format * test * handle org * test * format * format * lint
Allows upload of a dark mode logo
Checklist: