craftcms / craftcms/cms

Feature Request: Allow plugins to create plugin-specific Dashboards and Widgets

Open
#3,361 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dashboard 🖥
Dominant language
PHP
Stars
3.6k
Forks
705
Avg merge
1d 5h
Merged PRs (30d)
134

Description

The Craft Dashboard makes it easy to add custom Widgets. However, in larger plugins, there can be enough related dashboard items that it is handy to group several widgets together for that specific plugin. Consider Forms or SEO, where there could be several widgets displaying information about each particular plugin alone. We're currently seeing multiple larger plugins start to add dashboards and there are several inconsistencies in how they get implemented.

In these cases, it would be nice to be able to continue to use Craft's Widget API to keep the code and interface familiar, but it would also be nice if those widgets could be created on a "Dashboard" tab of a specific plugin.

I'm imagining something like:

  • Extend the Craft Dashboard UI on a custom tab in a plugin
  • Allow a user to create widgets from that plugin-specific "Dashboard" tab
  • When a widget is created from a tab, there is some way to give it a context (e.g. if I created a widget from My Plugin, the context may be my-plugin, and the widget would only display on that specific plugins dashboard.

This would make it possible to have multiple, similar dashboards on different tabs in Craft, keep a consistent user experience for content editors managing different dashboards, and give plugin developers a consistent API to develop dashboard/widget functionality.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are mentioned. Start by tracing Craft's existing Dashboard and Widget APIs, then determine how plugin-specific tabs, widget creation, and dashboard context would fit together. Done would mean a consistent API and user experience for creating and displaying widgets on separate plugin dashboards.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.