refactor: rename dashboard widgets to panels and update /charts route…#1610
Merged
Conversation
… to /panels Rename the dashboard widget system to use "panel" terminology throughout: - Rename files/directories: widget-renderers → panel-renderers, widget-delete-dialog → panel-delete-dialog, etc. - Update class names, selectors, CSS classes, and user-visible text - Change /charts/:connection-id route to /panels/:connection-id - Preserve API-facing model interfaces (DashboardWidget) and service methods for backend compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the dashboard “widget” UI terminology to “panel” across the Angular frontend and updates navigation/routing so the saved-query editing area moves from /charts/:connection-id to /panels/:connection-id, while keeping backend-facing widget models/services intact.
Changes:
- Renamed dashboard widget renderer components/selectors/files to “panel” equivalents (chart/table/counter/text + dashboard wrapper).
- Updated dashboard view/dialogs/sidebar and charts list/edit flows to use “panel” terminology in UI text and
data-testids. - Replaced
/charts/...routes and navigations with/panels/...routes.
Reviewed changes
Copilot reviewed 29 out of 38 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/app/components/dashboards/panel-renderers/text-panel/text-panel.component.ts | Renames Text widget component to Text panel component and updates selector/template/style references. |
| frontend/src/app/components/dashboards/panel-renderers/text-panel/text-panel.component.spec.ts | Updates unit test to use TextPanelComponent. |
| frontend/src/app/components/dashboards/panel-renderers/text-panel/text-panel.component.html | Adds panel template with empty-state UI. |
| frontend/src/app/components/dashboards/panel-renderers/text-panel/text-panel.component.css | Adds styling for markdown text panel and empty state. |
| frontend/src/app/components/dashboards/panel-renderers/table-panel/table-panel.component.ts | Renames Table widget component to Table panel component and updates selector/template/style references. |
| frontend/src/app/components/dashboards/panel-renderers/table-panel/table-panel.component.spec.ts | Updates unit test to use TablePanelComponent. |
| frontend/src/app/components/dashboards/panel-renderers/table-panel/table-panel.component.html | Adds table panel template rendering query result rows/columns. |
| frontend/src/app/components/dashboards/panel-renderers/table-panel/table-panel.component.css | Adds styling for table panel and empty state. |
| frontend/src/app/components/dashboards/panel-renderers/dashboard-panel/dashboard-panel.component.ts | Renames wrapper renderer to DashboardPanelComponent and updates child panel imports and error strings. |
| frontend/src/app/components/dashboards/panel-renderers/dashboard-panel/dashboard-panel.component.html | Updates wrapper template to use panel selectors/classes and revised messaging. |
| frontend/src/app/components/dashboards/panel-renderers/dashboard-panel/dashboard-panel.component.css | Renames wrapper CSS classes from widget-* to panel-*. |
| frontend/src/app/components/dashboards/panel-renderers/counter-panel/counter-panel.component.ts | Renames Counter widget component to Counter panel component and updates selector/template/style references. |
| frontend/src/app/components/dashboards/panel-renderers/counter-panel/counter-panel.component.spec.ts | Updates unit test to use CounterPanelComponent. |
| frontend/src/app/components/dashboards/panel-renderers/counter-panel/counter-panel.component.html | Adds counter panel template with value/label empty state. |
| frontend/src/app/components/dashboards/panel-renderers/counter-panel/counter-panel.component.css | Adds styling for counter panel and empty state. |
| frontend/src/app/components/dashboards/panel-renderers/chart-panel/chart-panel.component.ts | Renames Chart widget component to Chart panel component and updates selector/template/style references. |
| frontend/src/app/components/dashboards/panel-renderers/chart-panel/chart-panel.component.spec.ts | Updates unit test to use ChartPanelComponent. |
| frontend/src/app/components/dashboards/panel-renderers/chart-panel/chart-panel.component.html | Adds chart panel template rendering chart or empty state. |
| frontend/src/app/components/dashboards/panel-renderers/chart-panel/chart-panel.component.css | Adds styling for chart panel and empty state. |
| frontend/src/app/components/dashboards/panel-edit-dialog/panel-edit-dialog.component.ts | Renames widget edit dialog to panel edit dialog and updates navigation to /panels/.... |
| frontend/src/app/components/dashboards/panel-edit-dialog/panel-edit-dialog.component.spec.ts | Updates unit tests to use PanelEditDialogComponent. |
| frontend/src/app/components/dashboards/panel-edit-dialog/panel-edit-dialog.component.html | Updates dialog copy/CSS hooks/testids and routes to /panels/.... |
| frontend/src/app/components/dashboards/panel-edit-dialog/panel-edit-dialog.component.css | Renames CSS hook from .widget-form to .panel-form. |
| frontend/src/app/components/dashboards/panel-delete-dialog/panel-delete-dialog.component.ts | Renames widget delete dialog to panel delete dialog. |
| frontend/src/app/components/dashboards/panel-delete-dialog/panel-delete-dialog.component.spec.ts | Updates unit tests to use PanelDeleteDialogComponent. |
| frontend/src/app/components/dashboards/panel-delete-dialog/panel-delete-dialog.component.html | Updates dialog UI text/testids to “panel”. |
| frontend/src/app/components/dashboards/panel-delete-dialog/panel-delete-dialog.component.css | Adds styling for the delete warning dialog. |
| frontend/src/app/components/dashboards/dashboards-sidebar/dashboards-sidebar.component.html | Updates sidebar navigation to /panels/... and label/tooltip to Panels. |
| frontend/src/app/components/dashboards/dashboard-view/dashboard-view.component.ts | Updates dashboard view to use panel components/dialogs and panel-specific gridster class hooks. |
| frontend/src/app/components/dashboards/dashboard-view/dashboard-view.component.html | Updates dashboard view template selectors, class names, and routes to /panels/.... |
| frontend/src/app/components/dashboards/dashboard-view/dashboard-view.component.css | Renames dashboard view CSS hooks from widget-* to panel-*. |
| frontend/src/app/components/charts/charts-list/charts-list.component.ts | Updates navigation to open queries under /panels/.... |
| frontend/src/app/components/charts/charts-list/charts-list.component.html | Updates list page UI copy/testids/routes from widgets/charts to panels. |
| frontend/src/app/components/charts/charts-list/charts-list.component.css | Renames list CSS hooks from widgets-* to panels-*. |
| frontend/src/app/components/charts/chart-edit/chart-edit.component.ts | Updates post-save navigation to return to /panels/.... |
| frontend/src/app/components/charts/chart-edit/chart-edit.component.spec.ts | Updates expectation to navigate to /panels/.... |
| frontend/src/app/components/charts/chart-edit/chart-edit.component.html | Updates UI copy and “Back” link to /panels/.... |
| frontend/src/app/app-routing.module.ts | Replaces /charts/:connection-id route set with /panels/:connection-id equivalents. |
Comments suppressed due to low confidence (4)
frontend/src/app/app-routing.module.ts:232
- The /charts routes appear to have been removed/renamed to /panels without any redirect. This will break existing bookmarks and deep links; consider adding redirect routes (e.g., charts/:connection-id -> panels/:connection-id and charts/:connection-id/:query-id -> panels/:connection-id/:query-id).
path: 'panels/:connection-id',
loadComponent: () =>
import('./components/charts/charts-list/charts-list.component').then((m) => m.ChartsListComponent),
canActivate: [AuthGuard],
title: 'Saved Queries | Rocketadmin',
},
{
path: 'panels/:connection-id/new',
loadComponent: () =>
import('./components/charts/chart-edit/chart-edit.component').then((m) => m.ChartEditComponent),
canActivate: [AuthGuard],
title: 'Create Query | Rocketadmin',
},
{
path: 'panels/:connection-id/:query-id',
loadComponent: () =>
import('./components/charts/chart-edit/chart-edit.component').then((m) => m.ChartEditComponent),
canActivate: [AuthGuard],
title: 'Edit Query | Rocketadmin',
frontend/src/app/components/dashboards/panel-renderers/chart-panel/chart-panel.component.ts:21
- MatProgressSpinnerModule is imported into this standalone component but the template no longer uses . Consider removing the unused module import to reduce bundle size and avoid confusion about component-level loading states.
frontend/src/app/components/dashboards/panel-renderers/counter-panel/counter-panel.component.ts:13 - MatProgressSpinnerModule is imported into this standalone component but the template doesn't use it. Consider removing the unused module import to keep the component's dependency surface minimal.
frontend/src/app/components/dashboards/panel-renderers/table-panel/table-panel.component.ts:14 - MatProgressSpinnerModule is listed in this component's imports, but the new template doesn't render a spinner. Consider removing it if loading is handled by the parent (DashboardPanelComponent).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… to /panels
Rename the dashboard widget system to use "panel" terminology throughout: