Files
RenewCMS/docs/design/screens/authors.md
T

8.8 KiB
Raw Blame History

Authors

Route: /authors. API: GET /v1/author/ · POST /v1/author/ · PATCH /v1/author/{id} · DELETE /v1/author/{id}?reassign_to={id|none} · POST /v1/author/me.

An author is a public byline, not an account. It may be linked to one CMS user; guest writers have no link. The slug is globally unique, generated from the name and editable. An article has zero or more authors in a set order; the first is the primary byline. Zero authors is allowed.

Roles. Owner and admin can create, edit and delete any author. Other roles see the Authors screen read-only: the list and a read-only detail, with no Add author button, no row menu, no slide-over form and no delete. They can pick authors in the article editor. Any role can use "Create my author profile" and edit their own linked author: the form opens with the linked user locked and has no delete action.

Shared pieces. The list, slide-over, delete-with-reassign dialog, slug field and media field are defined once in DirectoryFrame.dc.html and referenced by both Authors and Sites. The media picker is drawn once, in "Authors: form". The server-fallback 409 dialog is drawn once, in "Authors: delete".

Visual reference: RenewCMS Screens Back-office.dc.html, groups "Authors", "Authors: form", "Authors: delete". Every state is drawn in light and dark (theme switch) at 1440×900 and 390×844. Copy is exact. Strings in a Copy cell are separated by " · " and listed in reading order.

Authors (group "Authors", 8 states)

Sidebar entry between Media and Users, visible to every role. Owner and admin create, edit and delete any author. Other roles see the list and the detail read-only. Columns: avatar and name, slug, account (Linked or Guest), article count. Search by name or slug. Long names truncate in the row and show in full on hover. Above 25 authors the list uses the same paginator as Articles (not redrawn). List, panel and dialogs come from DirectoryFrame and are shared with Sites.

# State Trigger Copy
1 Default Owner or admin. The list loaded, newest first. Authors · The names readers see on your articles. An author doesn't need an account. · Add author · Search by name or slug · Author · Slug · Account · Articles · Linked · Guest · 9 articles · 1 article · No articles
2 Loading The first load, or a retry.
3 Error 500 or network failure. Couldn't load authors · Check your connection and try again. · Try again
4 Empty, first run Zero authors. Toolbar hidden, one call to action. Other roles see the same text without the button. No authors yet · Authors are the names readers see on articles. They don't need an account. · Add author
5 No results Search matched nothing. No authors match "zoe" · Check the spelling, or search for a shorter part of the name. · Clear search
6 Row menu Owner or admin. The ellipsis button. Mobile: bottom sheet. Edit · Delete…
7 Read-only list (other roles) Any role except owner and admin. No Add author button, no row menu and no bottom button on mobile. Search still works. A row opens the read-only detail. Authors · The names readers see on your articles. Only an owner or admin can change authors. · Search by name or slug · Author · Slug · Account · Articles
8 Read-only detail A row was opened by a role without author rights. Same panel width as the form, no fields, Close as the only action. The account email is not shown. Inès Duarte · Linked · 9 articles · Bio · Website · Only an owner or admin can change this author. · Close

Authors: add and edit (group "Authors: form", 11 states)

Owner and admin. A slide-over, because the form has a live preview (the byline). Fields: avatar (media picker), name, slug (auto, editable), bio with counter, website, social links (X, LinkedIn, GitHub, Mastodon, Custom; up to 5), linked user (only users without an author). Slug field, media field and picker are the shared ones from DirectoryFrame. Saving shows "Saving…" in the button, as in the other forms.

# State Trigger Copy
1 Add: empty "Add author". Owner or admin. Add author · Avatar (optional) · Choose image · Name · e.g. Camille Roche · Slug · Generated from the name · Bio (optional) · A sentence or two about the author. · 0 / 280 · Website (optional) · https://example.com · Social links (optional) · Add link · 0 of 5 · Linked user (optional) · No linked user · Link a CMS user if this author has an account. Guest writers need no link. · Byline preview · Author name · The bio appears here. · Cancel · Add author
2 Slug from the name Typing a name fills the slug. Auto badge and "Edit slug" pencil. camille-roche · Auto · Generated from the name. Used in public author URLs and API paths. Unique across all authors.
3 Slug collision 409 on submit, or on blur after a check. The slug "camille-roche" is already used by another author. · Use camille-roche-2 · Reset to match the name
4 Validation On submit or blur. Nothing is sent. Enter a name. · Shorten the bio to 280 characters. · 291 / 280 · Enter a full URL starting with https://.
5 Social links Add link adds a row with a type select and a URL. One link is invalid. X · LinkedIn · GitHub · Mastodon · Custom · https://x.com/username · https://www.linkedin.com/in/username · https://github.com/username · https://mastodon.social/@username · https://example.com · Enter a full URL starting with https://. · You can add up to 5 links.
6 Linked user: choose The select is open. Only users without an author. When none are left it reads "Every user already has an author." Choose a user · Users without an author · Marta Alves · marta@renew.example · Rui Santos · rui@renew.example
7 Edit: linked author Edit on an author linked to a user. Edit Inès Duarte · Linked user (optional) · ines.duarte@renew.example · Unlink · New articles by this user start with this author. · Save changes
8 Avatar: picker "Choose image". The existing media picker; shown as a square. The site social image uses this same picker. Choose an image · The avatar for Camille Roche. · Shown as a square. Choose an image with the face or logo near the middle. · Use image
9 Save failed 500 or network failure. Couldn't save the author. Your changes are still here. Try again in a moment.
10 Unlink: confirm "Unlink" next to the linked user, owner or admin. On 200 the field returns to "No linked user" and a toast reads "User unlinked" · "Inès Duarte is now a guest author." Unlink Inès Duarte? · Inès Duarte will stay on their articles. New articles by ines.duarte@renew.example will no longer start with this author. · Cancel · Unlink user
11 Re-link "Link user" on a guest author in the row menu or the form. Same list as above. Link Camille Roche to a user? · Only users without an author are listed. · Cancel · Link user

Authors: delete (group "Authors: delete", 6 states)

Owner and admin. Reassign: the dialog asks who gets the articles, with "Nobody" as the last option, and shows the count in the button. Zero authors are allowed, so Nobody is always valid. The 409 dialog is the server fallback and is drawn once.

# State Trigger Copy
1 Reassign (recommended) "Delete…" on an author with articles, owner or admin. The button reads "Reassigning…" while the request runs. On 204 a toast reads "Author deleted" · "3 articles now credit Inès Duarte." A linked author also shows "Linked to ines.duarte@renew.example. The user account isn't affected." Delete this author? · "Camille Roche" will be deleted and is credited on 3 articles. This can't be undone. · Credit these articles to · Inès Duarte · Where an article has several authors, Camille Roche is removed and the others stay. · Cancel · Delete and reassign 3 articles
2 Choose who The select is open. The deleted author is not listed. Nobody · Remove the byline
3 Nobody "Nobody" chosen. The articles keep any other authors. Articles with only this author will have no byline.
4 Failed (shared by site and author delete) 500 or network failure. Both delete dialogs use this notice. Couldn't delete the author · Nothing was changed. Try again in a moment.
5 Server fallback (409) Fallback only. The dialog above always sends reassign_to, so this appears only when the server refuses a stale request because articles still credit the author. Drawn once, not as a flow. Can't delete this author · "Camille Roche" is credited on 3 articles. Choose another author to credit instead, or remove Camille Roche from those articles first. · Close · Reassign articles
6 No articles An author with zero articles: plain confirm. Delete this author? · "Léa Fontaine" will be deleted. No articles credit this author. This can't be undone. · Delete author