feat: improve Wagtail admin editor experience for articles #40

Merged
mark merged 6 commits from feature/improve-editor-experience into main 2026-03-03 20:46:31 +00:00
Owner

Summary

Implements #39 — upgrades the article authoring experience in Wagtail admin from a page-tree afterthought to a first-class workflow.

Changes

1. published_date field + scheduling support

  • New DateTimeField on ArticlePage, auto-populated from first_published_at on first publish
  • Data migration backfills existing articles
  • go_live_at / expire_at scheduling fields surfaced in editor panels
  • All front-end queries + RSS feeds now order by -published_date

2. Tabbed editor interface

  • TabbedInterface with 4 tabs: Content (title, summary, body), Metadata (category, author, tags, hero image, comments), Publishing (published date, go-live, expiry), SEO (promote + SEO panels)

3. Articles admin menu

  • PageListingViewSet registers a top-level Articles menu item
  • Custom columns: title, author, category, published date, status
  • Filterable by category and author

4. Dashboard panel

  • construct_homepage_panels hook adds an Articles overview panel showing drafts, scheduled, and recently published articles

5. E2E seed updates

  • Seeded e2e-admin superuser for admin E2E tests

Tests

  • 10 new unit tests covering published_date auto-populate, ordering, admin viewset, dashboard panel, tabbed interface
  • 4 new E2E tests covering Articles menu item, listing page, dashboard panel, editor tabs
  • Full suite: 73 tests pass, 96.23% coverage (threshold: 90%)

Closes #39

## Summary Implements [#39](https://gitea.lintel.digital/nohype/main-site/issues/39) — upgrades the article authoring experience in Wagtail admin from a page-tree afterthought to a first-class workflow. ## Changes ### 1. `published_date` field + scheduling support - New `DateTimeField` on `ArticlePage`, auto-populated from `first_published_at` on first publish - Data migration backfills existing articles - `go_live_at` / `expire_at` scheduling fields surfaced in editor panels - All front-end queries + RSS feeds now order by `-published_date` ### 2. Tabbed editor interface - `TabbedInterface` with 4 tabs: **Content** (title, summary, body), **Metadata** (category, author, tags, hero image, comments), **Publishing** (published date, go-live, expiry), **SEO** (promote + SEO panels) ### 3. Articles admin menu - `PageListingViewSet` registers a top-level **Articles** menu item - Custom columns: title, author, category, published date, status - Filterable by category and author ### 4. Dashboard panel - `construct_homepage_panels` hook adds an **Articles overview** panel showing drafts, scheduled, and recently published articles ### 5. E2E seed updates - Seeded `e2e-admin` superuser for admin E2E tests ## Tests - **10 new unit tests** covering published_date auto-populate, ordering, admin viewset, dashboard panel, tabbed interface - **4 new E2E tests** covering Articles menu item, listing page, dashboard panel, editor tabs - Full suite: 73 tests pass, 96.23% coverage (threshold: 90%) Closes #39
mark added 1 commit 2026-03-03 14:07:53 +00:00
feat: improve Wagtail admin editor experience for articles
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Failing after 9s
CI / pr-e2e (pull_request) Failing after 1m38s
2c94040221
- Add published_date field to ArticlePage with auto-populate from
  first_published_at on first publish, plus data migration backfill
- Surface go_live_at/expire_at scheduling fields in editor panels
- Reorganise ArticlePage editor with TabbedInterface (Content,
  Metadata, Publishing, SEO tabs)
- Add Articles PageListingViewSet to admin menu with custom columns
  (author, category, published date, status) and category/author filters
- Add Articles summary dashboard panel showing drafts, scheduled,
  and recently published articles
- Update all front-end queries and RSS feeds to use published_date
- Add 10 unit tests and 4 E2E tests for new admin features

Closes #39

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mark added 1 commit 2026-03-03 14:10:11 +00:00
fix: resolve ruff lint errors (unused imports, import sorting)
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Failing after 28s
CI / pr-e2e (pull_request) Failing after 1m37s
2b1e7ff4eb
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mark added 1 commit 2026-03-03 14:24:05 +00:00
fix: resolve ruff/mypy lint errors and fix E2E test failures
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Failing after 1m19s
CI / pr-e2e (pull_request) Successful in 1m31s
be8d6d4a12
- Use datetime.timedelta instead of timezone.timedelta (mypy)
- Fix import ordering (ruff I001)
- Fix admin sidebar E2E selector: use #wagtail-sidebar (Wagtail 7)
- Set deterministic published_date on seeded E2E articles for stable ordering
- Fix nightly test strict-mode violation: exact=True for Comments heading

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mark added 1 commit 2026-03-03 20:04:05 +00:00
Rebuild Tailwind CSS for new dashboard panel template
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m30s
CI / ci (pull_request) Successful in 1m31s
d387bf4f03
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
codex_a requested changes 2026-03-03 20:23:50 +00:00
Dismissed
codex_a left a comment
Owner

Requesting changes due to blocking issues:\n\n1) Security regression in seed command: now creates a predictable superuser ( / ) unconditionally. This introduces a known-credential admin account whenever the command runs (apps/core/management/commands/seed_e2e_content.py:203-209). Gate this behind an explicit non-production flag/env or remove from this command.\n\n2) Issue #39 completeness gap in Articles listing: required filters/search are incomplete. The new filterset only exposes + and omits the requested status + tag filters and title+summary search support (apps/blog/wagtail_hooks.py:38-51, 53-69).\n\n3) Issue #39 completeness gap in default ordering: listing should default to newest published first, but the viewset does not set default ordering by (apps/blog/wagtail_hooks.py:53-69).\n\nValidation performed: full pytest run in container (........................................................................ [ 46%]
.....................................s....ssssssssssssssssssssssssssssss [ 92%]
ssssssssssss [100%]

----------------------------------------------------- benchmark: 1 tests -----------------------------------------------------
Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations

test_read_time_benchmark 93.3600 225.4800 115.0713 9.5128 111.3280 6.7955 359;283 8.6903 4448 1

Legend:
Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
OPS: Operations Per Second, computed as 1 / Mean) passed, so the concerns above are product/security/completeness issues rather than immediate test breakages.

Requesting changes due to blocking issues:\n\n1) Security regression in seed command: now creates a predictable superuser ( / ) unconditionally. This introduces a known-credential admin account whenever the command runs (apps/core/management/commands/seed_e2e_content.py:203-209). Gate this behind an explicit non-production flag/env or remove from this command.\n\n2) Issue #39 completeness gap in Articles listing: required filters/search are incomplete. The new filterset only exposes + and omits the requested status + tag filters and title+summary search support (apps/blog/wagtail_hooks.py:38-51, 53-69).\n\n3) Issue #39 completeness gap in default ordering: listing should default to newest published first, but the viewset does not set default ordering by (apps/blog/wagtail_hooks.py:53-69).\n\nValidation performed: full pytest run in container (........................................................................ [ 46%] .....................................s....ssssssssssssssssssssssssssssss [ 92%] ssssssssssss [100%] ----------------------------------------------------- benchmark: 1 tests ----------------------------------------------------- Name (time in us) Min Max Mean StdDev Median IQR Outliers OPS (Kops/s) Rounds Iterations ------------------------------------------------------------------------------------------------------------------------------ test_read_time_benchmark 93.3600 225.4800 115.0713 9.5128 111.3280 6.7955 359;283 8.6903 4448 1 ------------------------------------------------------------------------------------------------------------------------------ Legend: Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile. OPS: Operations Per Second, computed as 1 / Mean) passed, so the concerns above are product/security/completeness issues rather than immediate test breakages.
mark added 1 commit 2026-03-03 20:38:01 +00:00
Address PR review feedback
Some checks failed
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m19s
CI / pr-e2e (pull_request) Failing after 2m13s
b897447296
- Gate e2e-admin superuser behind E2E_MODE env var (security)
- Add status and tag filters to ArticleFilterSet
- Set default_ordering to -published_date on listing viewset
- Add summary to ArticlePage.search_fields for search support
- Add 4 new tests for filters, ordering, and search fields

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
codex_a approved these changes 2026-03-03 20:41:14 +00:00
codex_a left a comment
Owner

Re-review complete. Previously requested blockers are addressed: (1) seeded admin account is now gated behind E2E_MODE, (2) Articles listing now includes status and tag filters, and (3) default ordering is set to newest published_date first. I also confirmed summary is included in ArticlePage search_fields. Validation: targeted admin tests and a full pytest run (no-cov) both pass in Docker.

Re-review complete. Previously requested blockers are addressed: (1) seeded admin account is now gated behind E2E_MODE, (2) Articles listing now includes status and tag filters, and (3) default ordering is set to newest published_date first. I also confirmed summary is included in ArticlePage search_fields. Validation: targeted admin tests and a full pytest run (no-cov) both pass in Docker.
mark added 1 commit 2026-03-03 20:42:36 +00:00
Add E2E_MODE=1 to CI E2E containers for admin user seeding
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / ci (pull_request) Successful in 1m19s
CI / pr-e2e (pull_request) Successful in 1m33s
2acb194d40
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mark merged commit eebd5c9978 into main 2026-03-03 20:46:31 +00:00
mark deleted branch feature/improve-editor-experience 2026-03-03 20:46:31 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: nohype/main-site#40