Build out admin Edit Site News page #74

Open
opened 2026-05-07 20:45:22 -05:00 by jimmyb · 0 comments
Owner

The /admin/sites-news page should become the staff workflow for finding and editing existing site news posts. Staff need a table of site news entries with status/author/date context, actions to edit or manage posts, and a consistent path back to the Add Site News workflow.

The current Laravel checkout has an admin Edit Site News route, sidebar entry, and placeholder view, but there is no obvious current site_news model/table in the migrations. Blog entries are rebuilt separately and should not be silently treated as site news unless that is an intentional implementation decision. This issue tracks replacing the placeholder with the site news management/listing workflow. The companion creation workflow is tracked by #73.

Scope

  • Replace the current /admin/sites-news placeholder with a real site news management table.
  • Confirm or use the canonical site news model/table defined for #73.
  • List existing site news posts with title, author, publish status, published date, updated date, and management actions.
  • Provide navigation/actions for editing existing site news posts.
  • Provide filtering or search where useful for title/status/author.
  • Support draft/published/archived or equivalent states if those states exist.
  • Preserve author and updated-by/audit context where available.
  • Reuse existing admin layout, sidebar, card, table, button, pagination, and feedback patterns.

Acceptance Criteria

  • Authorized site-content staff can visit /admin/sites-news and see a real management table instead of the placeholder.
  • Users without the required content-management role cannot access the page.
  • Existing site news posts appear in a paginated table.
  • Each row shows title, author or creator, publish status, published date where applicable, and last updated date.
  • Each row includes an edit action that opens a staff edit form for that post.
  • The table has a clear empty state when no site news posts exist.
  • Staff can update an existing site news post through the edit workflow.
  • Server-side validation protects edit submissions.
  • Publish state changes, if supported, behave consistently with the create workflow from #73.
  • Edits preserve or record author/updated-by attribution as appropriate.
  • Update actions are logged with actor, site news ID, title, and changed publish state where practical.
  • The page follows existing admin dashboard styling and supports light/dark mode.

Test Coverage Required

  • Feature test confirming authorized content staff can render /admin/sites-news.
  • Authorization tests confirming insufficient-role users cannot access or mutate site news management.
  • Feature test confirming existing site news posts render in the management table.
  • Feature test confirming the placeholder text is replaced when posts exist.
  • Feature test confirming each row links to the correct edit route/form.
  • Feature tests confirming a valid edit updates the site news record.
  • Validation tests for invalid edit submissions.
  • Feature tests for publish-state filtering or status behavior if implemented.
  • Pagination and empty-state tests.
  • Activity/audit logging assertion for updates where practical.
  • Regression test confirming #73-created posts appear in the management table.
  • Tests should use Pest and focused feature coverage.
  • Run the focused affected tests, then run vendor/bin/pint --dirty --format agent before closing the issue.

Progress Checklist

  • Admin Edit Site News route exists at /admin/sites-news
  • Admin sidebar links to Edit Site News
  • Edit Site News placeholder view exists
  • Admin table/card/button/pagination patterns exist elsewhere
  • Confirm or use the canonical site news model/table from #73
  • Add site news listing query with pagination
  • Replace the placeholder with a management table
  • Add edit routes/controller actions/forms for existing posts
  • Add search/filtering if needed for status/title/author
  • Add update validation and feedback
  • Preserve attribution and publish-state behavior
  • Add activity/audit logging for edits
  • Add tests for access control, table rendering, edit links, update validation, persistence, pagination, empty state, and #73 integration
  • Confirm staff can create a site news post in #73 and then find/edit it through #74
The `/admin/sites-news` page should become the staff workflow for finding and editing existing site news posts. Staff need a table of site news entries with status/author/date context, actions to edit or manage posts, and a consistent path back to the Add Site News workflow. The current Laravel checkout has an admin Edit Site News route, sidebar entry, and placeholder view, but there is no obvious current `site_news` model/table in the migrations. Blog entries are rebuilt separately and should not be silently treated as site news unless that is an intentional implementation decision. This issue tracks replacing the placeholder with the site news management/listing workflow. The companion creation workflow is tracked by #73. ## Scope - Replace the current `/admin/sites-news` placeholder with a real site news management table. - Confirm or use the canonical site news model/table defined for #73. - List existing site news posts with title, author, publish status, published date, updated date, and management actions. - Provide navigation/actions for editing existing site news posts. - Provide filtering or search where useful for title/status/author. - Support draft/published/archived or equivalent states if those states exist. - Preserve author and updated-by/audit context where available. - Reuse existing admin layout, sidebar, card, table, button, pagination, and feedback patterns. ## Acceptance Criteria - Authorized site-content staff can visit `/admin/sites-news` and see a real management table instead of the placeholder. - Users without the required content-management role cannot access the page. - Existing site news posts appear in a paginated table. - Each row shows title, author or creator, publish status, published date where applicable, and last updated date. - Each row includes an edit action that opens a staff edit form for that post. - The table has a clear empty state when no site news posts exist. - Staff can update an existing site news post through the edit workflow. - Server-side validation protects edit submissions. - Publish state changes, if supported, behave consistently with the create workflow from #73. - Edits preserve or record author/updated-by attribution as appropriate. - Update actions are logged with actor, site news ID, title, and changed publish state where practical. - The page follows existing admin dashboard styling and supports light/dark mode. ## Test Coverage Required - Feature test confirming authorized content staff can render `/admin/sites-news`. - Authorization tests confirming insufficient-role users cannot access or mutate site news management. - Feature test confirming existing site news posts render in the management table. - Feature test confirming the placeholder text is replaced when posts exist. - Feature test confirming each row links to the correct edit route/form. - Feature tests confirming a valid edit updates the site news record. - Validation tests for invalid edit submissions. - Feature tests for publish-state filtering or status behavior if implemented. - Pagination and empty-state tests. - Activity/audit logging assertion for updates where practical. - Regression test confirming #73-created posts appear in the management table. - Tests should use Pest and focused feature coverage. - Run the focused affected tests, then run `vendor/bin/pint --dirty --format agent` before closing the issue. ## Progress Checklist - [x] Admin Edit Site News route exists at `/admin/sites-news` - [x] Admin sidebar links to Edit Site News - [x] Edit Site News placeholder view exists - [x] Admin table/card/button/pagination patterns exist elsewhere - [ ] Confirm or use the canonical site news model/table from #73 - [ ] Add site news listing query with pagination - [ ] Replace the placeholder with a management table - [ ] Add edit routes/controller actions/forms for existing posts - [ ] Add search/filtering if needed for status/title/author - [ ] Add update validation and feedback - [ ] Preserve attribution and publish-state behavior - [ ] Add activity/audit logging for edits - [ ] Add tests for access control, table rendering, edit links, update validation, persistence, pagination, empty state, and #73 integration - [ ] Confirm staff can create a site news post in #73 and then find/edit it through #74
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#74
No description provided.