Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ LOGIN_RATE_LIMIT_GLOBAL_MAX="100" # Max failed login attempts instance-wide

« Aide » (`/help`, from the account menu) ships with the app, in French, English and European Portuguese. The articles are Markdown files in `app/features/help/content/{fr,en,pt-PT}/`, one per task, with a frontmatter block: `slug`, `title`, `summary`, `module`, `permission`, `keywords`, `related`, `order`. `permission` is the name of the `Permission` member the feature needs, several comma-separated when the feature opens to any of them, or `none`. `GroupLeader` among them opens the article to a group's overseer and assistant too, who hold no right for their group (`helpReaderFor` reads it from the account's record). A reader without it never sees the article, nor its search hits or links, and no permission is ever changed to show help.

A « ? » goes in the header's `help` slot (`<PageHeader help={<HelpEntryButton slug="…" />} />`, or `SettingsHeader`), which puts it at the far right of the top bar and at the end of the title's row on a phone. Its page and every layout with a loader above it export `skipRevalidationForHelpPanel as shouldRevalidate` from `~/features/help`, so opening the panel fetches the article only. A page that writes its own `shouldRevalidate` starts it with `if (onlyHelpPanelChanged(args)) return false`. The publisher record draws its own title row (`RecordHeader`), so it takes the « ? » twice: in `PageTopbar`'s `help` and in `RecordHeader`'s, which shows on a phone only. The territory editor and « Créer en lot » do the same: `TerritoryEditor` and `TerritoryBatchCreator` take a `help` for their column's title row.
A « ? » goes in the header's `help` slot (`<PageHeader help={<HelpEntryButton slug="…" />} />`, or `SettingsHeader`), which puts it at the far right of the top bar and at the end of the title's row on a phone. Its page and every layout with a loader above it export `skipRevalidationForHelpPanel as shouldRevalidate` from `~/features/help`, so opening the panel fetches the article only. A page that writes its own `shouldRevalidate` starts it with `if (onlyHelpPanelChanged(args)) return false`. The publisher record draws its own title row (`RecordHeader`), so it takes the « ? » twice: in `PageTopbar`'s `help` and in `RecordHeader`'s, which shows on a phone only. A page serving several rights may put a component of its own named `…Help` in the slot, choosing the article of the first right the reader holds (« Gérer le tableau »). The territory editor and « Créer en lot » do the same as the record: `TerritoryEditor` and `TerritoryBatchCreator` take a `help` for their column's title row.

`app/features/help/entry-points.test.ts` is the authoritative wiring: it scans the app source for every `<HelpEntryButton slug="…" />` and fails unless each one is pinned there and ships in every language. Keep this table in step with it.

Expand All @@ -443,6 +443,10 @@ A « ? » goes in the header's `help` slot (`<PageHeader help={<HelpEntryButton
| Attributions, Attribuer un territoire | `/territories/attributions`, `/territories/attributions/new/available-territories` | `territory-attributions` | `CanManageTerritoryAttributions` |
| Statistiques | `/territories/stats` | `territory-stats` | `CanManageTerritories` |
| Tableau d’affichage | `/board` | `board-read` | `CanViewBoard` |
| Gérer le tableau (one article per right, first held: upload, live documents, sections or order, reads) | `/board/documents` | `board-add-pdf`, `board-dynamic`, `board-sections`, `board-reads` | each its own |
| Téléverser un PDF | `/board/documents/new` | `board-add-pdf` | `CanUploadBoardDocuments` |
| Document dynamique, new and edit | `/board/documents/new-dynamic`, `/board/dynamic/:id/edit` | `board-dynamic` | `CanManageDynamicBoardDocuments` |
| Section, new and edit | `/board/sections/new`, `/board/sections/:id/edit` | `board-sections` | `CanConfigureBoardSections, CanOrganiseBoardDocuments` |
| Campagnes | `/territories/attributions/campaigns` | `campaign-create` | `CanManageTerritoryCampaigns` |
| Prospection | `/territories/buildings` | `prospection` | `CanViewProspection` |
| Réglages › Territoires | `/settings/territories` | `territories-settings` | `CanConfigureTerritorySettings` |
Expand Down
12 changes: 12 additions & 0 deletions app/features/display-board/routes/documents/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
} from '~/features/display-board/ui/manage/manage-list'
import { itemKey, type ManageRights } from '~/features/display-board/ui/manage/manage-rights'
import { ReadsPanel } from '~/features/display-board/ui/manage/ReadsPanel'
import { HelpEntryButton } from '~/features/help'
import * as m from '~/i18n/paraglide/messages'
import {
congregationContext,
Expand All @@ -34,6 +35,8 @@ import type { Route } from './+types/list'

export const meta: Route.MetaFunction = () => [{ title: `${m.sidebar_board_manage()} - Unitae` }]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

const READS_PARAM = /^(pdf|dynamic)-(\d+)$/

export function loader({ request, context }: Route.LoaderArgs) {
Expand Down Expand Up @@ -108,6 +111,7 @@ export default function ManageBoardPage({ loaderData }: Route.ComponentProps) {
<>
<PageHeader
title={m.sidebar_board_manage()}
help={<ManageHelp rights={rights} />}
titleBadge={
<span className="text-base text-faint tabular-nums">
{m.board_manage_count_documents({ count: total })} ·{' '}
Expand Down Expand Up @@ -234,3 +238,11 @@ export default function ManageBoardPage({ loaderData }: Route.ComponentProps) {
</>
)
}

/** The page serves several rights: its « ? » opens the task of the first one the reader holds. */
function ManageHelp({ rights }: { rights: ManageRights }) {
if (rights.canUpload) return <HelpEntryButton slug="board-add-pdf" />
if (rights.canManageDynamic) return <HelpEntryButton slug="board-dynamic" />
if (rights.canConfigureSections || rights.canOrganise) return <HelpEntryButton slug="board-sections" />
return <HelpEntryButton slug="board-reads" />
}
5 changes: 5 additions & 0 deletions app/features/display-board/routes/documents/new-dynamic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { isSectionOfCongregation } from '~/features/display-board/server/documen
import { listDynamicChoices, loadDynamicForm } from '~/features/display-board/server/dynamic-form.queries'
import { BOARD_WEB_FONTS_HREF } from '~/features/display-board/ui/dynamic/board-web-fonts'
import { DynamicDocumentForm } from '~/features/display-board/ui/forms/DynamicDocumentForm'
import { HelpEntryButton } from '~/features/help'
import * as m from '~/i18n/paraglide/messages'
import {
congregationContext,
Expand All @@ -31,6 +32,8 @@ import type { Route } from './+types/new-dynamic'

export const meta: Route.MetaFunction = () => [{ title: `${m.board_new_dynamic_title()} - Unitae` }]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

export const links: Route.LinksFunction = () => [{ rel: 'stylesheet', href: BOARD_WEB_FONTS_HREF }]

const TYPES: Record<DynamicType, { icon: typeof Users; title: () => string; description: () => string }> = {
Expand Down Expand Up @@ -154,6 +157,7 @@ export default function NewDynamicDocumentPage({ loaderData, actionData }: Route
<>
<PageHeader
title={m.board_new_dynamic_title()}
help={<HelpEntryButton slug="board-dynamic" />}
subtitle={m.board_new_dynamic_subtitle()}
breadcrumbs={[...trail, { label: m.board_new_dynamic_title() }]}
/>
Expand All @@ -168,6 +172,7 @@ export default function NewDynamicDocumentPage({ loaderData, actionData }: Route
<UnsavedChangesDialog blocker={blocker} />
<PageHeader
title={TYPES[document.type].title()}
help={<HelpEntryButton slug="board-dynamic" />}
breadcrumbs={[
...trail,
{ label: m.board_new_dynamic_title(), to: '/board/documents/new-dynamic' },
Expand Down
4 changes: 4 additions & 0 deletions app/features/display-board/routes/documents/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
import { FileValidationError, validateBoardFile } from '~/features/display-board/server/file-validation.server'
import { thumbnailQueue } from '~/features/display-board/server/thumbnail-queue.server'
import { PdfDocumentForm } from '~/features/display-board/ui/forms/PdfDocumentForm'
import { HelpEntryButton } from '~/features/help'
import { notify } from '~/features/notifications/index.server'
import * as m from '~/i18n/paraglide/messages'
import {
Expand All @@ -36,6 +37,8 @@ import type { Route } from './+types/new'

export const meta: Route.MetaFunction = () => [{ title: `${m.board_form_new_title()} - Unitae` }]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

export function loader({ context }: Route.LoaderArgs) {
const permissions = context.get(permissionsContext)
if (!permissions.has(Permission.CanUploadBoardDocuments)) throw redirect('/')
Expand Down Expand Up @@ -79,6 +82,7 @@ export default function NewDocumentPage({ loaderData, actionData }: Route.Compon
<UnsavedChangesDialog blocker={blocker} />
<PageHeader
title={m.board_form_new_title()}
help={<HelpEntryButton slug="board-add-pdf" />}
breadcrumbs={[
{ label: m.board_page_title(), to: '/board' },
{ label: m.sidebar_board_manage(), to: '/board/documents' },
Expand Down
4 changes: 4 additions & 0 deletions app/features/display-board/routes/dynamic/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { BOARD_WEB_FONTS_HREF } from '~/features/display-board/ui/dynamic/board-
import { DynamicDocumentForm } from '~/features/display-board/ui/forms/DynamicDocumentForm'
import { DeleteBoardItemDialog } from '~/features/display-board/ui/manage/DeleteBoardItemDialog'
import { stateText } from '~/features/display-board/ui/manage/StateLabel'
import { HelpEntryButton } from '~/features/help'
import * as m from '~/i18n/paraglide/messages'
import {
congregationContext,
Expand All @@ -36,6 +37,8 @@ export const meta: Route.MetaFunction = ({ loaderData }) => [
{ title: `${loaderData?.document.title ?? m.board_dynamic_edit_meta_title()} - Unitae` },
]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

// The typeface samples and the preview are set in the board's faces.
export const links: Route.LinksFunction = () => [{ rel: 'stylesheet', href: BOARD_WEB_FONTS_HREF }]

Expand Down Expand Up @@ -85,6 +88,7 @@ export default function EditDynamicDocumentPage({ loaderData, actionData }: Rout
<UnsavedChangesDialog blocker={blocker} />
<PageHeader
title={document.title}
help={<HelpEntryButton slug="board-dynamic" />}
meta={
<Status tone={TONE[state.kind]} className="text-foreground">
{stateText(state, loaderData.timeZone)} · {m.board_form_in_section({ section })}
Expand Down
4 changes: 4 additions & 0 deletions app/features/display-board/routes/sections/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { loadSectionForm } from '~/features/display-board/server/section-form.qu
import { setSectionVisibilityRoles } from '~/features/display-board/server/section-visibility.server'
import { SectionForm } from '~/features/display-board/ui/forms/SectionForm'
import { DeleteSectionDialog } from '~/features/display-board/ui/manage/DeleteSectionDialog'
import { HelpEntryButton } from '~/features/help'
import * as m from '~/i18n/paraglide/messages'
import {
currentAccountContext,
Expand All @@ -30,6 +31,8 @@ export const meta: Route.MetaFunction = ({ loaderData }) => [
{ title: `${loaderData?.section?.name ?? m.board_sections_edit_meta_title()} - Unitae` },
]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

export function loader({ params, context }: Route.LoaderArgs) {
const permissions = context.get(permissionsContext)
requirePermission(permissions, Permission.CanConfigureBoardSections)
Expand All @@ -54,6 +57,7 @@ export default function EditSectionPage({ loaderData, actionData }: Route.Compon
<UnsavedChangesDialog blocker={blocker} />
<PageHeader
title={section.name}
help={<HelpEntryButton slug="board-sections" />}
breadcrumbs={[
{ label: m.board_page_title(), to: '/board' },
{ label: m.sidebar_board_manage(), to: '/board/documents' },
Expand Down
4 changes: 4 additions & 0 deletions app/features/display-board/routes/sections/new.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { createBoardSection } from '~/features/display-board/server/board-sectio
import { loadSectionForm } from '~/features/display-board/server/section-form.queries'
import { setSectionVisibilityRoles } from '~/features/display-board/server/section-visibility.server'
import { SectionForm } from '~/features/display-board/ui/forms/SectionForm'
import { HelpEntryButton } from '~/features/help'
import * as m from '~/i18n/paraglide/messages'
import {
currentAccountContext,
Expand All @@ -23,6 +24,8 @@ import type { Route } from './+types/new'

export const meta: Route.MetaFunction = () => [{ title: `${m.board_section_form_new_title()} - Unitae` }]

export { skipRevalidationForHelpPanel as shouldRevalidate } from '~/features/help'

export function loader({ context }: Route.LoaderArgs) {
const permissions = context.get(permissionsContext)
requirePermission(permissions, Permission.CanConfigureBoardSections)
Expand All @@ -44,6 +47,7 @@ export default function NewSectionPage({ loaderData, actionData }: Route.Compone
<UnsavedChangesDialog blocker={blocker} />
<PageHeader
title={m.board_section_form_new_title()}
help={<HelpEntryButton slug="board-sections" />}
breadcrumbs={[
{ label: m.board_page_title(), to: '/board' },
{ label: m.sidebar_board_manage(), to: '/board/documents' },
Expand Down
60 changes: 60 additions & 0 deletions app/features/help/content/captures.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,31 @@
"height": 43,
"captured": "2026-11-17"
},
"board-dynamic-types": {
"width": 210,
"height": 47,
"captured": "2026-11-17"
},
"board-pdf-display": {
"width": 728,
"height": 327,
"captured": "2026-11-18"
},
"board-read-filter": {
"width": 248,
"height": 108,
"captured": "2026-11-17"
},
"board-reads-panel": {
"width": 398,
"height": 754,
"captured": "2026-11-18"
},
"board-section-menu": {
"width": 830,
"height": 175,
"captured": "2026-11-18"
},
"board-versions-history": {
"width": 684,
"height": 196,
Expand Down Expand Up @@ -217,11 +237,31 @@
"height": 43,
"captured": "2026-11-17"
},
"board-dynamic-types": {
"width": 710,
"height": 291,
"captured": "2026-11-18"
},
"board-pdf-display": {
"width": 728,
"height": 327,
"captured": "2026-11-18"
},
"board-read-filter": {
"width": 233,
"height": 108,
"captured": "2026-11-17"
},
"board-reads-panel": {
"width": 398,
"height": 754,
"captured": "2026-11-18"
},
"board-section-menu": {
"width": 830,
"height": 175,
"captured": "2026-11-18"
},
"board-versions-history": {
"width": 684,
"height": 196,
Expand Down Expand Up @@ -379,11 +419,31 @@
"height": 43,
"captured": "2026-11-18"
},
"board-dynamic-types": {
"width": 710,
"height": 291,
"captured": "2026-11-18"
},
"board-pdf-display": {
"width": 728,
"height": 327,
"captured": "2026-11-18"
},
"board-read-filter": {
"width": 249,
"height": 108,
"captured": "2026-11-18"
},
"board-reads-panel": {
"width": 398,
"height": 754,
"captured": "2026-11-18"
},
"board-section-menu": {
"width": 830,
"height": 175,
"captured": "2026-11-18"
},
"board-versions-history": {
"width": 684,
"height": 216,
Expand Down
33 changes: 33 additions & 0 deletions app/features/help/content/en/board-add-pdf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---

slug: board-add-pdf
title: How do I add a PDF to the information board?
summary: Upload the file, choose its section and when it shows.
module: board
permission: CanUploadBoardDocuments
keywords: add, upload, PDF, document, file, board, section, display, publish, take off, featured, schedule
related: board-sections, board-versions
order: 4
---

A PDF document is added from **Manage the board**. It shows in a section of the board, to the people who see that section.

## Add the PDF

1. In the sidebar, open **Manage the board**, then click **Upload a PDF**.
2. Drop the file, or choose it: a PDF of 20 MB at most. Its name becomes the title, which you can change in **Title**.
3. Choose the **Section** it shows in.
4. In **Display**, choose when it shows: **Now**, **From a date**, or **Not yet** to keep it without showing it. In **Take it off on**, choose the day it goes; left empty, it stays on the board.

![The Display section: when the document shows, when it goes, and Featured](capture:board-pdf-display)

5. Turn on **Featured** to put it at the top of the board, above the sections.
6. Click **Upload**.

## If you upload without publishing

If you can upload documents but not publish them, the **Display** section offers no dates: a board manager decides when your document shows. Until then, it is **Not published** in the list. You can still edit the documents you uploaded.

## Replace a document

To update a document, open it with **Edit**, then click **Replace the file**. The old file stays in the history, and those who had read the document see it as unread again.
36 changes: 36 additions & 0 deletions app/features/help/content/en/board-dynamic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---

slug: board-dynamic
title: How do I add a live document to the board?
summary: The program, the groups, the pioneers or the organization chart, kept up to date by the app.
module: board
permission: CanManageDynamicBoardDocuments
keywords: live document, dynamic, program, meetings, field service groups, pioneers, organization chart, appearance, layout, typeface, colour, board
related: board-sections, board-add-pdf
order: 5
---

A live document is built from the congregation’s data: it changes by itself when the data changes. There is nothing to upload or replace.

## The kinds of documents

- **Program**: the coming meetings, with their parts or their services. You can add several, for instance one per kind of meeting.
- **Field service groups**: each group with its overseer, its assistant and its publishers.
- **Pioneers**: the current pioneers, by type.
- **Organization chart**: the congregation’s responsibilities, post by post.

A kind is offered only when the congregation has that data: groups, pioneers, an organization chart. The groups, the pioneers and the organization chart can be added only once; when one is already on the board, its row says **Already added · Open**.

## Add the document

1. In **Manage the board**, click **Live document**.
2. Click the kind of document.

![The choice of kind: program, field service groups, pioneers and organization chart](capture:board-dynamic-types)

3. Give it a **Title** and choose its **Section**.
4. For a program, choose in **Content** the meetings it shows, with their parts or their services, and their order.
5. In **Appearance**, choose the typeface, the accent colour and, depending on the kind, the layout. The preview shows the result, which stays readable printed, in colour or in black and white.
6. Choose when it shows, then click **Add to the board**.

Readers see the document as a page, and download it as a PDF with the same layout.
Loading
Loading