diff --git a/docs/todo/sections-launch.md b/docs/todo/sections-launch.md new file mode 100644 --- /dev/null +++ b/docs/todo/sections-launch.md @@ -0,0 +1,45 @@ +# Sections: launch TODO + +Everything needed before sections can be enabled for all users (remove feature flag). + +## Critical / Blocking + +- [ ] **Page copy must include sections** — the copy route (`/p/[[page]]/copy/+page.svelte`) only copies cards today; section records are silently dropped, so the copied page loses all structure and non-grid section types +- [ ] **Migration for existing users** — `ensureSections()` in `migrate.ts` synthesises a single grid section for legacy pages, but verify this works cleanly for users who already have cards with no `sectionId` across multiple pages + +## Section editing UI gaps + +- [ ] **Gallery section: column count control** — `sectionData.columns` is read but there's no UI to change it +- [ ] **Gallery section: gap control** — `sectionData.gap` is read but there's no UI to change it +- [ ] **Text section: alignment/size controls** — `textAlign` and `textSize` are in `sectionData` but no editing UI exposes them +- [ ] **Row section: scroll mode control** — `sectionData.scrollMode` (`'scroll'` | `'fit'`) has no UI toggle +- [ ] **Section renaming** — `section.name` field exists on the record but there's no input to edit it (SectionsModal only displays the name) +- [ ] **Section duplication** — no way to duplicate a section (with or without its cards) + +## Cross-section interactions + +- [ ] **Move cards between sections** — cards are locked to the section they were created in; no drag-to-another-section or "move to section" action exists +- [ ] **Section collapse/expand in editor** — all sections are always fully expanded; pages with many sections get unwieldy + +## Section styling / customisation + +- [ ] **Background color per section** — no way to set a section background (color, gradient, image) +- [ ] **Padding / spacing controls** — no per-section padding or vertical gap control +- [ ] **Section max-height** — only HeroSection enforces a height (`100dvh`); other sections grow unbounded + +## Mobile + +- [ ] **Mobile editing parity** — TextSection and RowSection don't have mobile-specific editing controls; the mobile editing warning modal is still shown as "experimental" + +## Polish / UX + +- [ ] **Empty state for TextSection editing** — no placeholder or guidance when the text content is blank +- [ ] **SectionsModal improvements** — modal is functional but minimal; consider drag-to-reorder instead of up/down buttons, section type icons, and inline rename +- [ ] **AddSectionButton visibility** — button is `opacity-0` until parent hover; may be hard to discover on touch devices +- [ ] **Confirm before deleting a section with cards** — currently deletes immediately; should warn if the section contains cards + +## Deferred / post-launch + +- [ ] **External data sources** — see `docs/todo/external-section-sources.md` +- [ ] **Section-level permissions / visibility** — e.g. hide a section from non-authenticated viewers +- [ ] **Section templates** — pre-built section layouts users can pick from when adding a section diff --git a/docs/todo/subpages.md b/docs/todo/subpages.md new file mode 100644 --- /dev/null +++ b/docs/todo/subpages.md @@ -0,0 +1,53 @@ +# Subpages — path to usability + +Subpages already work record- and route-wise (`app.blento.page`, routes under `/[actor]/p/[page]`), but there is no UI to create them, no way to navigate between them, and several metadata gaps. This doc lists everything needed to make subpages a usable first-class feature. + +## Creation & management + +- [ ] Create-subpage UI + - Pick slug → create `app.blento.page/blento.{slug}` record with empty sections + - Initial name/description fields +- [ ] Rename (display name) — write-back to `app.blento.page` +- [ ] Change slug + - rkey is immutable, so: create new record + migrate cards/sections (`page` field) + delete old record +- [ ] Delete subpage + - Cascade delete sections and cards where `page === 'blento.{slug}'` +- [ ] Manage subpages panel (settings? edit bar dropdown?) +- [ ] Slug validation + - Reserved: `self`, `edit`, `copy` + - Character restrictions matching rkey rules + +## Discovery & navigation + +- [ ] Navbar / nav links on the main page (and likely all pages) +- [ ] "Link to subpage" card type (picks a subpage, renders name/icon) + - Arguably shares a data source with the navbar +- [ ] Back-to-home affordance on subpages (logo/name tap? explicit home link?) +- [ ] Subpages in sitemap / Contrail indexing — probably yes so shared links resolve fresh + +## OG / metadata per page + +- [ ] Per-subpage OG image + - `og-new.png` endpoint currently keys on actor only; include `page` in cache key + screenshot URL +- [ ] Wire per-page title/description/icon from `app.blento.page` into `` on subpage routes + +## Editing experience + +- [ ] Entry point from main-page edit → switch to editing a subpage (page switcher in edit mode) +- [ ] Verify self-copy flow for duplicating one of your own pages + +## Navbar record placement — decision + +Three options for where navigation links live: + +- **A.** `site.standard.publication/blento.self` preferences — simplest, one record. But nav isn't really a "preference." +- **B.** Extend `app.blento.page/blento.self` with a `navigation` array — clean, no new lexicon, couples nav to the main-page record. +- **C.** New `app.blento.navigation/self` record — cleanest semantically, extra lexicon to maintain. + +**Picked: B.** Main-page publication record is already the canonical site config, nav is sitewide and only edited from the main page. If per-subpage overrides ever become a need, migrate then. + +## Open questions (not required for v1) + +- Page privacy / password gating +- Per-page theme overrides +- Page templates / duplicate-as-template diff --git a/src/lib/sections/feature-flag.ts b/src/lib/sections/feature-flag.ts --- a/src/lib/sections/feature-flag.ts +++ b/src/lib/sections/feature-flag.ts @@ -6,8 +6,8 @@ * PUBLIC_SECTIONS_ENABLED env flag. Useful for dogfooding with specific users. */ const ALLOWED_DIDS: readonly string[] = [ - // flo-bit.dev - 'did:plc:257wekqxg4hyapkq6k47igmp' + // flo-bit.dev + 'did:plc:257wekqxg4hyapkq6k47igmp' ]; /** diff --git a/src/lib/website/Account.svelte b/src/lib/website/Account.svelte --- a/src/lib/website/Account.svelte +++ b/src/lib/website/Account.svelte @@ -16,11 +16,19 @@ {#if user.isLoggedIn && user.profile} -
- +
+ + {#snippet child({ props })} - {/snippet} @@ -34,16 +42,35 @@ > {/if} - -
+ + +
{/if} diff --git a/src/lib/website/Controls.svelte b/src/lib/website/Controls.svelte deleted file mode 100644 --- a/src/lib/website/Controls.svelte +++ /dev/null @@ -1,123 +0,0 @@ - - -
- - - - {#if !isMobile() && !getHideProfileSection(data)} - - {/if} - - - updateTheme(newAccent, newBase)} - /> -
diff --git a/src/lib/website/EditBar.svelte b/src/lib/website/EditBar.svelte --- a/src/lib/website/EditBar.svelte +++ b/src/lib/website/EditBar.svelte @@ -32,7 +32,7 @@ onsetsize, allowRotate = false, onrotate, - showSectionsModal + sidebarOpen = false }: { data: WebsiteData; @@ -58,7 +58,7 @@ onsetsize?: (w: number, h: number) => void; allowRotate?: boolean; onrotate?: (delta: number) => void; - showSectionsModal?: () => void; + sidebarOpen?: boolean; } = $props(); let linkPopoverOpen = $state(false); @@ -156,7 +156,10 @@ /> {#if dev || (user.isLoggedIn && user.profile?.did === data.did)} -
+
{#if showEditControls}
- {#if showSectionsModal} - - {/if}