Drafts of every record, previewed on the real page
Migration 077 keeps one draft per record of any entity. Saving a draft checks it by applying it in a transaction that is rolled back; Preview opens the record's page in a tab that sends X-Draft-Preview, and the server answers those reads from a second connection holding the applied draft, then rolls back, so nobody else sees it. Publish is the ordinary save, which drops the draft. tx() now nests as a savepoint. Also commits TODO.md: the answered questions, and parts 1 to 3 moved to Done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e4c7e165d1
commit
a6c66d4607
13 changed files with 576 additions and 65 deletions
84
TODO.md
84
TODO.md
|
|
@ -13,8 +13,7 @@
|
|||
- [ ] Are these three tabs, three sections (each in the side nav), or a filter over one list? Answer:
|
||||
- [ ] Does each resource belong to exactly one audience, or can it be in several (eg. a tag per audience)? Answer:
|
||||
- [ ] What happens to the page's current sections: move under an audience, or replaced? Answer:
|
||||
- [ ] **Library (New Thought Nexus)**: a library for NGUers.
|
||||
- [ ] Which name: Library, New Thought Nexus, or both (Nexus as the page, Library as a section)? Answer:
|
||||
- [ ] **Library**: a library for NGUers.
|
||||
- [ ] What goes in it: links out, uploaded files (Drive "Media"), books, videos, our own articles? Answer:
|
||||
- [ ] Public, or only for NGUers? If only NGUers, how do they sign in (there are only admin accounts today)? Answer:
|
||||
- [ ] Is the metaphysics dictionary / Metaphysical Bible Dictionary part of it (see Future: Poetry Builder needs the same import)? Answer:
|
||||
|
|
@ -53,27 +52,24 @@
|
|||
- [ ] Is this a section to build (eg. on Organization or Partners), or a question to answer in a blog post? Answer:
|
||||
|
||||
## Page Features
|
||||
- [ ] **Full profiles**: people get full profile pages.
|
||||
- [ ] **Full profiles**: people get full profile pages. Profile accounts, claiming and visibility are done (Part 2, Accounts); what's left is the page itself.
|
||||
- [ ] What is missing from a person's page today that makes it "full": bio, more photos, links, events they spoke at, groups, blog posts they wrote? Answer:
|
||||
- [ ] Do people edit their own profile (they'd need accounts), or do admins edit them? Answer:
|
||||
- [ ] Every person, or only those with a profile switched on (privacy)? Answer:
|
||||
- [ ] Ties to Planning Center sync (Data) and the gamification below? Answer:
|
||||
- [ ] Ties to Planning Center sync (Data) and the gamification below? Answer:
|
||||
- [ ] **Page preview images per page**: the event's banner on event pages, the person's photo on theirs, the org's logo on org pages.
|
||||
- Already done in `server/src/pageMeta.js`: events use the event photo, then the event logo, then its org's logo; people their photo; orgs, teams and awards their logo; blog posts their cover. SVG logos are skipped (social sites don't show them).
|
||||
- [ ] Which page showed the wrong picture, and where (Discord, iMessage, Facebook)? Answer:
|
||||
- [ ] Is it production (not deployed yet?) or the SVG skip? Should an SVG logo get a PNG copy made at upload for previews? Answer:
|
||||
- [ ] Should event pages prefer the card background ("banner") over the event photo? Answer:
|
||||
- [ ] **Blog page tabs**: a blog index with tabs (there is no /blog index page today, only /blog/<id>).
|
||||
- [ ] Tabs by tag, by author, or fixed kinds (eg. News, Stories, Guides, Website updates)? Answer:
|
||||
- [ ] A new /blog page in the nav, or tabs on the Community blog section? Answer:
|
||||
- [ ] **Gamification synced to Discord**: points, badges or levels on the site, synced to Discord.
|
||||
- [ ] What earns points: going to events, writing for the blog, volunteering, Discord activity? Answer:
|
||||
- [ ] Where are they shown: on full profiles, a leaderboard, only in Discord? Answer:
|
||||
- [ ] Which way does it sync: site → Discord roles, Discord → site, or both? Is there a Discord bot already (or only the reports webhook)? Answer:
|
||||
- [ ] How do we match a person to their Discord account (they link it themselves)? Answer:
|
||||
- [ ] **Blog page tabs**: tabs within a blog post, at the top.
|
||||
- [ ] each tab would switch the active display of content and table of contents, there could be some title/intro content above the tabs.
|
||||
- [ ] **Gamification synced to Discord**: points, badges or levels on the site, synced to Discord. Linking a profile to Discord is done (Part 2, Accounts); the bot, points and badges are next.
|
||||
- [ ] What earns points: going to events, writing for the blog, volunteering, Discord activity? Answer: all of the above, we could create badges on profiles.
|
||||
- [ ] Where are they shown: on full profiles, a leaderboard, only in Discord? Answer: shown on profiles when logged in, no leaderboard for now, and when using a command in discord. this content would not show on the public bio section of a user when viewing from a people tile.
|
||||
- [ ] Which way does it sync: site → Discord roles, Discord → site, or both? Is there a Discord bot already (or only the reports webhook)? Answer: would like a bot built, for if things in discord update or affect gamification shown on the website. most things will be assigned to users by moderators.
|
||||
- [ ] How do we match a person to their Discord account (they link it themselves)? Answer: they can link it, admins can overwrite and update/set
|
||||
- [ ] **Site version names**: each update gets a name, "The ___ Update", Minecraft style.
|
||||
- [ ] Shown where: the footer next to the version, the changelog, both? Answer:
|
||||
- [ ] Does the tag suffix become the name (v1.13.2-region-cards → "The Region Cards Update"), or a name of its own? Answer:
|
||||
- [ ] Shown where: the footer next to the version, the changelog, both? Answer: both
|
||||
- [ ] Does the tag suffix become the name (v1.13.2-region-cards → "The Region Cards Update"), or a name of its own? Answer: yeah the tag.
|
||||
|
||||
## Accessibility Features
|
||||
- [ ] Check the mobile fixes on a real phone (or the browser's phone view at 320, 375 and 430px), light and dark: every page, the menu, the hero, the retreat carousel, people tiles and their details, the community map, schedule blocks, the banner.
|
||||
|
|
@ -84,48 +80,31 @@
|
|||
|
||||
## Mobile
|
||||
- [ ] **Featured event label on the front page**: where it sits doesn't make sense, at least on mobile.
|
||||
- [ ] Where should it go: above the card, on the card's photo, or dropped on mobile? Answer:
|
||||
- [ ] Same change on desktop? [ ] yes
|
||||
- [ ] Where should it go: above the card, on the card's photo, or dropped on mobile? Answer: droppd on mobile
|
||||
- [ ] Same change on desktop? move above the section on the right displaying the featured event.
|
||||
|
||||
## Page Editing
|
||||
- [ ] **Draft edits of sections and pages**: change a page or section without publishing it straight away.
|
||||
- [ ] Which editors: Pages (Front page, Retreats, Community...) only, or every record (events, people...) too? Answer:
|
||||
- [ ] Preview the draft on the real page before publishing? [ ] yes
|
||||
- [ ] Can editors save drafts and only admins publish (an approval step), or does anyone who can edit publish? Answer:
|
||||
- [ ] One draft per page at a time, or several? Answer:
|
||||
|
||||
## Admin
|
||||
|
||||
## Data
|
||||
- [ ] **Planning Center sync to People**: Planning Center People into the site's people records.
|
||||
- [ ] One way (Planning Center → site), or both? Answer:
|
||||
- [ ] Who gets synced: everyone, or a Planning Center list or tag (eg. "Website")? Most people in Planning Center shouldn't have a public page. Answer:
|
||||
- [ ] One way (Planning Center → site), or both? Answer: to site only
|
||||
- [ ] Who gets synced: everyone, or a Planning Center list or tag (eg. "Website")? Most people in Planning Center shouldn't have a public page. Answer:a specific list
|
||||
- [ ] Which fields: name, photo, email, phone, birthday? Which win when both sides differ? Answer:
|
||||
- [ ] How often: a button in Data, hourly, nightly? Answer:
|
||||
- [ ] Is there a Planning Center API app (personal access token) we can use, and which account owns it? Answer:
|
||||
- [ ] **New Thought young adult directory**: authors and TikTok and Instagram creators (faceless but organic).
|
||||
- [ ] People records with a new People tag (like Musicians), or a separate list of links (they aren't NGU people)? Answer:
|
||||
- [ ] What does "faceless but organic" mean for what's shown: no photo, only their handle and a link? Answer:
|
||||
- [ ] Do they agree to be listed, or is it a public list of public accounts? Answer:
|
||||
- [ ] Where does it show: Resources (For Young Adults), the Library, Community? Answer:
|
||||
- [ ] How often: a button in Data, hourly, nightly? Answer: manually only
|
||||
- [ ] Is there a Planning Center API app (personal access token) we can use, and which account owns it? Answer: use the API
|
||||
- [ ] **New Thought young adult directory**: things like authors and TikTok and Instagram creators.
|
||||
- [ ] section in the community page, Directories. tabs with different people lists, we have musicians already.
|
||||
- [ ] Do they agree to be listed, or is it a public list of public accounts? Answer: we add them to the list as admins
|
||||
|
||||
## Navigation
|
||||
- [ ] **Shop button** at the top right of the header.
|
||||
- [ ] Where does it go: an existing store (which URL), or a shop we build? Answer:
|
||||
- [ ] Shown on mobile too (in the menu, or beside it)? Answer:
|
||||
- [ ] **Manage the nav, sitemap and page headers from the admin**, so pages that aren't done can be hidden.
|
||||
- [ ] Hidden means: out of the nav and sitemap only (the address still works, like Unlisted), or the page returns Not found to non-admins? Answer:
|
||||
- [ ] What else is editable: link order, labels, which header menu a link is in, page titles and their blurbs? Answer:
|
||||
- [ ] `navConfig.ts` is the source of truth today; OK to move the editable parts into the database with navConfig as the defaults? [ ] yes
|
||||
|
||||
## Tools
|
||||
- [ ] **File conversion**: a simple tool, eg. WebP to JPG.
|
||||
- [ ] Which conversions: images only (WebP, JPG, PNG, HEIC?), or also documents (Word to PDF) and video? Answer:
|
||||
- [ ] In the browser (nothing uploaded, images only), or on the server (more formats)? Answer:
|
||||
- [ ] Which conversions: images only (WebP, JPG, PNG, HEIC?), or also documents (Word to PDF) and video? Answer: image converson
|
||||
- [ ] In the browser (nothing uploaded, images only), or on the server (more formats)? Answer: images only.
|
||||
- [ ] Also a "Download as JPG" on files in the Media library? [ ] yes
|
||||
- [ ] **What is needed for SEE**: list it.
|
||||
- [ ] What is SEE (an event, a program, a system)? Answer:
|
||||
- [ ] Is the list a page on the site, a TODO here, or a document? Answer:
|
||||
|
||||
## Content
|
||||
- [ ] **Newsletter: featured partners and new partnerships**, maybe as a blog post.
|
||||
|
|
@ -154,6 +133,23 @@
|
|||
|
||||
|
||||
# Part 2: Done
|
||||
## Page Editing (branch `nav-access`, no PR yet; migration 077)
|
||||
- [x] **Drafts of every record** (migration 077, `docs/drafts.md`): an existing record of any kind (events, people, organizations, blog posts, the front page, the site pages, Navigation, Site settings...) can be saved as a draft instead of going live. One draft per record; anyone who can edit it can save, preview, publish or discard it. Opening a record with a draft opens the draft, saying who saved it and when, and warning when the live record was saved since. Lists mark records with a draft.
|
||||
- [x] **Preview on the real page**: Preview saves the draft and opens the record's page in a new tab with it applied, under an amber "Previewing a draft" bar, for signed-in admin accounts only; anyone else sees the live page. The server answers that tab's reads from a second connection holding the draft in a transaction it rolls back, so no page needed code of its own.
|
||||
- [ ] Check in a browser: save a draft of an event, a site page (a section's title) and Navigation (a link), preview each, publish one, discard one; open the same address signed out.
|
||||
|
||||
## Accounts (branch `nav-access`, no PR yet; migration 076, back up the database before deploying)
|
||||
- [x] **Profile accounts** (migration 076, `docs/profile-accounts.md`): a member role below viewer, signed in to the site and their own profile, never the admin (`/api/admin` now refuses anything under viewer). By invite only: Data → Profile accounts (admins and up) adds an email and shows its link once; Email invite sends a fresh one through Gmail. The link (`/account/welcome`) sets a password, or they sign in with Google under that email, any Google account. A New sign-in link on the account doubles as a password reset.
|
||||
- [x] **Claiming a People record**: on `/account` (Your profile; the footer's Sign in link) they ask to be a record; admins approve or decline it under Claims, or set it directly on the account.
|
||||
- [x] **Editing it and choosing what shows**: with a record, they edit its pronouns, tagline, location, public email and phone, bio and photo, and hide any of photo, pronouns, tagline, bio, email, phone, location, links. Hidden parts stay in the record (the People editor shows the same switches) and are left out everywhere on the site: every public read of people goes through the new `v_people_public` view, and the views that read people were rebuilt over it.
|
||||
- [x] **Discord linking**: a profile links its Discord account (identify scope: id and name) from `/account`; an admin can set or clear it on the account. Off until `DISCORD_CLIENT_ID` and `DISCORD_CLIENT_SECRET` are set on the service.
|
||||
- [ ] Check in a browser: invite (copy link and Email invite), the welcome page with a password and with a non-org Google account, a claim and its approval, editing and hiding (then the person's page, a team page and a people tile signed out), Discord linking once it's set up, a member opening /admin.
|
||||
|
||||
## Navigation (branch `nav-access`, no PR yet; migration 075, back up the database before deploying)
|
||||
- [x] **Pages → Navigation** (migration 075): the header's pages and buttons, the footer's Get in Touch and bottom row, edited in the admin (admins and up): place, order, label, link (a page, a #section or an address elsewhere), a header page set under another page's menu (after its sections), a filled button (Give's style, also beside the footer's logo), new tab. `navConfig.ts` is now only the defaults the app starts from before the nav loads. Page titles and intros moved here from Site settings (the old rows came along).
|
||||
- [x] **Hidden pages**: a page ticked Hidden in Navigation answers Not found (404, noindex) to everyone below viewer, server and app both, and is out of the menus, the sitemap and the not-found page's suggestions; links to it are only sent to viewers and up. Signed in, it shows with a bar saying it's hidden. Its sections aren't cached (`server/src/siteNav.js`, `GET /api/nav`).
|
||||
- [x] **Shop**: a Shop page of sections at `/shop` (Pages → Shop, empty for now), starting hidden, with a Shop button in the header (beside Contact Us and Give, and in the phone menu's list with them). Unhide it in Navigation once it has content; its sections can link out to the Bonfire store.
|
||||
- [ ] Check in a browser: the header and phone menu, a page set under another's menu, the footer, signed out and signed in (the hidden bar, Shop showing), light and dark.
|
||||
## Feature updates (branch `feature-updates`, v1.13.x, no PR yet; migrations 069 to 071, back up the database before deploying)
|
||||
- [x] **Partner cards, logo first**: the organization cards (Partners, Ministries) lead with the logo, large and centered, the name under it as a small line (still the heading); with no logo, its initials. Cards sit raised with a shadow and an accent top edge.
|
||||
- [x] **Frame a photo on upload**: photo fields (people, event photo and card background, blog cover and guest photo, hero photos, link card pictures, block images, schedule graphics and map images; not logos) open Frame the photo for a JPEG, PNG or WebP: drag (or arrow keys) to place, zoom slider, a shape menu (the field's own first; As uploaded keeps the photo's). The framed part is what uploads; Upload as is skips. Nothing stored beside the picture, so re-framing is uploading again.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue