feat: Admin dashboard with OG tag coverage metrics #94

Closed
opened 2026-06-29 14:05:13 +00:00 by jmiller · 3 comments
Owner

Summary

The admin side only has a tag list view. Add a dashboard view that shows OG tag coverage metrics across the site's content.

Requirements

  • Coverage summary: Total content items vs. items with OG tags configured
  • Coverage by type: Breakdown by content_type (com_content, menu, etc.)
  • Missing OG tags: List of content items without any OG configuration
  • Image coverage: Items with vs. without og:image set
  • Quick actions: Links to batch-generate missing OG tags
  • Chart: Visual coverage percentage (donut or bar)

Components

  • src/View/Dashboard/HtmlView.php — Dashboard view
  • src/Model/DashboardModel.php — Coverage query methods
  • tmpl/dashboard/default.php — Dashboard template
  • src/Controller/DisplayController.php — Update default_view to dashboard

Architecture Notes

  • Query #__mokoog_tags grouped by content_type for coverage stats
  • Cross-reference with #__content for article coverage
  • Reuse existing BatchController for quick-action links
  • Follow MokoSuite admin dashboard patterns (card-based layout)

Acceptance Criteria

  • Dashboard is default admin view
  • Coverage metrics display correctly
  • Coverage by content type breakdown works
  • Missing items list links to batch generator
  • Image coverage stat accurate
## Summary The admin side only has a tag list view. Add a dashboard view that shows OG tag coverage metrics across the site's content. ## Requirements - **Coverage summary**: Total content items vs. items with OG tags configured - **Coverage by type**: Breakdown by content_type (com_content, menu, etc.) - **Missing OG tags**: List of content items without any OG configuration - **Image coverage**: Items with vs. without og:image set - **Quick actions**: Links to batch-generate missing OG tags - **Chart**: Visual coverage percentage (donut or bar) ## Components - `src/View/Dashboard/HtmlView.php` — Dashboard view - `src/Model/DashboardModel.php` — Coverage query methods - `tmpl/dashboard/default.php` — Dashboard template - `src/Controller/DisplayController.php` — Update default_view to dashboard ## Architecture Notes - Query `#__mokoog_tags` grouped by content_type for coverage stats - Cross-reference with `#__content` for article coverage - Reuse existing BatchController for quick-action links - Follow MokoSuite admin dashboard patterns (card-based layout) ## Acceptance Criteria - [ ] Dashboard is default admin view - [ ] Coverage metrics display correctly - [ ] Coverage by content type breakdown works - [ ] Missing items list links to batch generator - [ ] Image coverage stat accurate
Author
Owner

Branch created: feature/94-feat-admin-dashboard-with-og-tag-coverag

git fetch origin
git checkout feature/94-feat-admin-dashboard-with-og-tag-coverag
Branch created: [`feature/94-feat-admin-dashboard-with-og-tag-coverag`](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteOpenGraph/src/branch/feature/94-feat-admin-dashboard-with-og-tag-coverag) ```bash git fetch origin git checkout feature/94-feat-admin-dashboard-with-og-tag-coverag ```
Author
Owner

Status: PARTIAL (audit of current dev).

What exists: tmpl/tags/coverage.php computes overall coverage %, articles-with-OG, and missing title/desc/image counts. But it's included into the tags list (tmpl/tags/default.php:24) — it is not a dedicated view.

Still missing vs. acceptance criteria:

  • Not the default admin view — DisplayController.php:24 still default_view = 'tags'; no src/View/Dashboard/, src/Model/DashboardModel.php, or tmpl/dashboard/
  • No per-content_type breakdown
  • No missing-items list with batch quick-action links
  • No chart (donut/bar)
  • The 6 COUNT(*) queries run uncached on every tags-list load — should move to a model and/or cache

Recommend promoting coverage into a proper dashboard (cpanel) view set as default.

**Status: PARTIAL** (audit of current `dev`). What exists: `tmpl/tags/coverage.php` computes overall coverage %, articles-with-OG, and missing title/desc/image counts. But it's **`include`d into the tags list** (`tmpl/tags/default.php:24`) — it is not a dedicated view. Still missing vs. acceptance criteria: - Not the default admin view — `DisplayController.php:24` still `default_view = 'tags'`; no `src/View/Dashboard/`, `src/Model/DashboardModel.php`, or `tmpl/dashboard/` - No per-`content_type` breakdown - No missing-items list with batch quick-action links - No chart (donut/bar) - The 6 `COUNT(*)` queries run uncached on every tags-list load — should move to a model and/or cache Recommend promoting coverage into a proper `dashboard` (cpanel) view set as default.
Author
Owner

Implemented in PR #112 (merged to dev). Added a dedicated DashboardModel + View/Dashboard + tmpl/dashboard/default.php set as the component's default view, with: SVG donut coverage gauge, field-gap badges, a coverage-by-content_type table, and a list of articles missing OG tags (linking to the article editor) plus a Batch Generate shortcut. The old inline coverage.php include was removed from the tags list (it ran 6 uncached COUNT queries per load); that logic now lives in the model. All acceptance criteria met. Closing.

Implemented in PR #112 (merged to `dev`). Added a dedicated `DashboardModel` + `View/Dashboard` + `tmpl/dashboard/default.php` set as the component's **default view**, with: SVG donut coverage gauge, field-gap badges, a coverage-by-content_type table, and a list of articles missing OG tags (linking to the article editor) plus a Batch Generate shortcut. The old inline `coverage.php` include was removed from the tags list (it ran 6 uncached COUNT queries per load); that logic now lives in the model. All acceptance criteria met. Closing.
Sign in to join this conversation.
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteOpenGraph#94