Skip to content

Commit f5aaf6d

Browse files
mrautela365claude
andauthored
fix(dashboards): show no-data state in brand health drawer (#685)
* fix(dashboards): show no-data state in brand health drawer When brand mention data is zero the drawer returned empty actions showing no guidance. Now shows "No brand mention data available" with guidance to contact marketing ops, under attention section. LFXV2-1644 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org> * fix(dashboards): improve no-data message wording Reword to emphasize engaging marketing ops for momentum rather than setting up monitoring. LFXV2-1644 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org> * fix(dashboards): use neutral card for no-data state Replace the attention-section approach with a neutral blue info card. When brand mentions are zero the drawer skips both "Needs Your Attention" and "Performing Well" and shows a neutral informational card guiding EDs to engage marketing ops. LFXV2-1644 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org> * fix(dashboards): add a11y attrs and soften no-data copy Add role=status and aria-live=polite to no-data card. Remove actionable CTA language from description. LFXV2-1644 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org> --------- Signed-off-by: Misha Rautela <mrautela@linuxfoundation.org> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e997afd commit f5aaf6d

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

apps/lfx-one/src/app/modules/dashboards/executive-director/components/brand-health-drawer/brand-health-drawer.component.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,22 @@ <h3 class="text-sm font-semibold text-green-700">Performing Well</h3>
143143
</div>
144144
}
145145

146+
@if (hasNoData()) {
147+
<div
148+
class="flex flex-col rounded-lg border border-gray-200 border-l-4 border-l-blue-400 bg-white overflow-hidden"
149+
role="status"
150+
aria-live="polite"
151+
data-testid="brand-health-drawer-no-data">
152+
<div class="flex items-start gap-4 px-4 py-4">
153+
<i class="fa-light fa-circle-info text-blue-500 mt-0.5" aria-hidden="true"></i>
154+
<div class="flex flex-col gap-1 flex-1 min-w-0">
155+
<span class="text-sm font-semibold text-gray-900">No brand mention data available</span>
156+
<p class="text-sm text-gray-500">No brand mentions are currently available for this foundation</p>
157+
</div>
158+
</div>
159+
</div>
160+
}
161+
146162
<!-- Mentions Trend -->
147163
<div class="flex flex-col gap-4 p-4 border border-gray-200 rounded-lg" data-testid="brand-health-drawer-mentions-trend">
148164
<div class="flex flex-col gap-1">

apps/lfx-one/src/app/modules/dashboards/executive-director/components/brand-health-drawer/brand-health-drawer.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ export class BrandHealthDrawerComponent {
8282

8383
protected readonly performingInsights: Signal<MarketingKeyInsight[]> = computed(() => this.split().performingInsights);
8484

85+
protected readonly hasNoData: Signal<boolean> = computed(() => this.data().totalMentions === 0);
86+
8587
protected readonly formattedSentimentMom: Signal<string> = computed(() => {
8688
const v = this.data().sentimentMomChangePp;
8789
return (v > 0 ? '+' : '') + v.toFixed(1);

0 commit comments

Comments
 (0)