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

4.4 KiB

Articles

  • Route: /article
  • API: GET /v1/article/ · PATCH …/publish · PATCH …/unpublish · DELETE /v1/article/{id}
  • Visual reference: source/RenewCMS Screens Back-office.dc.html, group "Articles" (open it in a browser; each state is drawn at desktop and mobile, with a light/dark toggle).

Rows update when the server responds, not optimistically. Search, tab and sort are stored in the query string.

States

Default

Trigger: The list loaded, sorted by last updated.

  • Breadcrumbs: Articles (mobile title "Articles")

Row menu open

Trigger: The ellipsis button, or Enter on the focused menu button.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Row "Winter checklist for timber windows": menu true, online false, updated "5 days ago"

Loading

Trigger: The first load, or a retry.

  • Breadcrumbs: Articles (mobile title "Articles")
  • List: loading skeleton

Empty

Trigger: The list is empty.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Tab counts (All, Online, Drafts): 0, 0, 0
  • EmptyState (file-text): No articles yet "Write your first one. It stays a draft until you publish it.", action "New article" (primary)

No results

Trigger: Search matched nothing. The tab counts still show the full list.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Search query: "tiles"
  • EmptyState (search): No articles match "tiles" "Check the spelling, or search for a shorter part of the title.", action "Clear search"

No drafts

Trigger: Drafts tab with nothing in it. The "Online" tab has an equivalent "Nothing is online yet" state.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Active tab index: 2 (0 All, 1 Online, 2 Drafts)
  • Tab counts (All, Online, Drafts): 4, 4, 0
  • EmptyState (pencil-line): No drafts "Everything you've written is online.", action "New article"

Action in progress

Trigger: Publish chosen from the row menu. That row is disabled.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Row "Winter checklist for timber windows": busy "Publishing…", online false, updated "5 days ago"

Published

Trigger: 200: the row updates in place and a toast confirms.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Toast (success, circle-check): Article published ""Winter checklist for timber windows" is now online."

Action failed

Trigger: A 500 or network error. The row stays as it was, and the toast stays until retried or dismissed.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Toast (error, circle-x): Couldn't unpublish "The server didn't respond. Nothing changed." with action "Retry"

Row vanished (404)

Trigger: Any row action gets a 404.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Toast (info, info): That article no longer exists "It was deleted somewhere else, so we removed it from the list."
  • Tab counts (All, Online, Drafts): 5, 4, 1

Delete: confirm

Trigger: Delete… from the row menu.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Modal: Delete this article?
    • text ""Winter checklist for timber windows" will be deleted. Its images stay in your library. This can't be undone."
    • cancel "Cancel"
    • confirm "Delete article" (danger)

Delete: in progress

Trigger: DELETE in flight. The dialog can't be dismissed.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Modal: Delete this article?
    • text ""Winter checklist for timber windows" will be deleted. Its images stay in your library. This can't be undone."
    • cancel "Cancel"
    • confirm "Deleting…" (danger), loading, not dismissible

Delete: failed

Trigger: 500, a partial failure where the article is kept. The error shows inside the dialog.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Modal: Delete this article?
    • text ""Winter checklist for timber windows" will be deleted. Its images stay in your library. This can't be undone."
    • Alert: "Couldn't delete the article, so it's still there. Try again in a moment."
    • cancel "Cancel"
    • confirm "Delete article" (danger)

Deleted

Trigger: 204: the row is removed and focus moves to the next row. This is also where a delete from the editor ends up.

  • Breadcrumbs: Articles (mobile title "Articles")
  • Toast (success, circle-check): Article deleted ""Winter checklist for timber windows" is gone."
  • Tab counts (All, Online, Drafts): 5, 4, 1