feat(dashboards): add optional title and label icons#868
Open
Kern1124 wants to merge 12 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds optional icon + tooltip metadata to dashboard widget titles and KPI labels, and registers a new clock_off icon to support the UI additions.
Changes:
- Added optional
titleIcon,titleIconSize, andtitleIconTooltipinputs to the widget header and rendered the icon next to the title. - Extended KPI widget data (
IKpiData) with optional label icon fields and rendered the icon in the KPI description row. - Registered the
clock_officon in@nova-ui/bitsand added unit tests covering the new rendering/attributes.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/dashboards/src/lib/components/widget/widget-header/widget-header.component.ts | Adds new @Input()s and helper getters for title icon support. |
| packages/dashboards/src/lib/components/widget/widget-header/widget-header.component.html | Renders an optional title icon with tooltip/ARIA attributes. |
| packages/dashboards/src/lib/components/widget/widget-header/widget-header.component.less | Adds layout/styles for the title row and title icon. |
| packages/dashboards/src/lib/components/widget/widget-header/widget-header.component.spec.ts | Adds unit tests validating title icon rendering and tooltip/ARIA attrs. |
| packages/dashboards/src/lib/components/kpi-widget/types.ts | Extends IKpiData with optional label icon fields (name/size/tooltip). |
| packages/dashboards/src/lib/components/kpi-widget/kpi.component.html | Conditionally renders KPI label text and optional label icon with tooltip/ARIA attrs. |
| packages/dashboards/src/lib/components/kpi-widget/kpi.component.less | Adds description-row spacing and dedicated styles for label text/icon. |
| packages/dashboards/src/lib/components/kpi-widget/kpi.component.spec.ts | Adds unit tests for KPI label icon rendering (including empty label case). |
| packages/bits/src/lib/icon/icons.ts | Registers the new clock_off icon in the shared icon set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
83
to
90
| &-icon { | ||
| align-items: center; | ||
| display: inline-flex; | ||
| flex: 0 0 auto; | ||
| justify-content: center; | ||
| min-height: 24px; | ||
| min-width: 24px; | ||
| } |
4d56ef0 to
afb2956
Compare
afb2956 to
d1374a2
Compare
This reverts commit 1cc77fd.
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.
Summary
Validation