Skip to content

feat(roadmap-planner): chart help icons on Team Analytics Dashboard - #187

Merged
danielfbm merged 3 commits into
mainfrom
daniel/roadmap-team-analytics-chart-help
May 11, 2026
Merged

danielfbm merged 3 commits into
mainfrom
daniel/roadmap-team-analytics-chart-help

Conversation

@danielfbm

Copy link
Copy Markdown
Contributor

Summary

Adds a small (?) info button next to every chart title (and the KPI strip) on the Team Analytics → Dashboard tab. Clicking it toggles a popover explaining what the chart shows, how its data is derived, what the deltas / legend / colors mean, and how the active-metric selection cascades through the page.

Covered: KPI tiles · Throughput trend · Pillar mix over time · Inflow vs outflow · Distribution by pillar · Top movers · Per-member ranking. Click-outside or Esc closes the popover. Theme tokens only — light / dark / Atlas all paint correctly.

This PR is opened in draft mode to trigger the image build pipeline for a dev preview on the edge-int cluster.

Test plan

  • npm run lint clean on touched files
  • vitest run — Dashboard + parent TeamAnalytics smoke tests pass (10/10)
  • Manual: smoke the popovers on each chart in light + dark + Atlas modes on the dev preview
  • Manual: verify popover doesn't get clipped on smaller-height panels (Top movers / Distribution by pillar)

🤖 Generated with Claude Code

Adds a small info button next to every chart title (and the KPI strip)
on the Team Analytics → Dashboard tab. Clicking it toggles a popover
that explains what the chart shows, how its data is derived, how to
read the deltas/legend, and how the active-metric selection cascades
through the page.

Covered: KPI tiles · Throughput trend · Pillar mix over time ·
Inflow vs outflow · Distribution by pillar · Top movers · Per-member
ranking. Click-outside / Esc closes. Styling uses only the existing
semantic theme tokens so light/dark/Atlas all paint correctly.
…line

Two follow-ups based on dev-preview feedback:

1. Pillar palette: the 5-token semantic palette (accent/ocean/amber/
   forest/crimson) collapses to 4 distinct colors in the default light
   theme — both --accent and --ocean resolve to blue, so the first two
   pillars looked identical. With 7+ pillars in the DEVOPS project the
   modulo wrap also forced extra duplicates. Swap to a Tableau-10
   inspired 11-color categorical palette tuned for perceptual distance
   under the 0.85 paint opacity, in both TeamAnalyticsDashboard.jsx
   and TeamAnalytics.jsx so the Dashboard donut/stack/ranking and the
   Team Overview throughput-by-pillar chart stay in sync.

2. Move the Metric KPI tiles help icon out of the right edge of the
   tile strip and inline it with the hint line below it, so the icon
   sits next to "Click a metric tile to drive the panels below."
   instead of breaking the 5-column tile grid.
Two related collisions surfaced in the dev preview:

1. METRIC_COLOR mapped prs→--accent and opened→--ocean. Both tokens
   resolve to the same blue in the default light theme, so the PRs
   merged and PRs opened lines on the Throughput trend, plus the
   Inflow vs outflow bars (which hardcoded the same two vars), all
   rendered as a single blue. Swap to d3 schemeCategory10 hex values
   for guaranteed distinctness across light / dark / Atlas. Update
   Inflow vs outflow + its description to route through METRIC_COLOR.

2. Pillar palette: tighten the two soft slots that still read as
   ambiguous at 0.85 opacity — replace Tableau's muted #B07AA1 purple
   with #8E44AD and Tableau's #FF9DA7 pink with #E377C2 magenta, so
   the purple / pink / red triplet stays clearly separated.
@danielfbm
danielfbm marked this pull request as ready for review May 11, 2026 06:20
@danielfbm
danielfbm merged commit b210edb into main May 11, 2026
12 of 13 checks passed
@danielfbm
danielfbm deleted the daniel/roadmap-team-analytics-chart-help branch May 11, 2026 06:20
// [data-mode], so dark mode and the Atlas theme need no per-mode
// branching here.
const PILLAR_PALETTE = ['var(--accent)', 'var(--ocean)', 'var(--amber)', 'var(--forest)', 'var(--crimson)'];
// Categorical palette for pillar bands. The semantic theme tokens

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning (refactor/duplication): PILLAR_PALETTE is defined in both this file and TeamAnalyticsDashboard.jsx with identical values. The comment notes "Keep in sync with TeamAnalyticsDashboard.jsx" but having duplicate code creates a maintenance burden. Consider extracting to a shared constants file.

* `overflow: hidden` for clean borders, so the popover is positioned
* relatively but uses a high z-index and a wide box; it can extend
* below the panel head over the chart body (panels are tall enough). */
.ta-help {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning (style/compatibility): The .ta-panel:has(.ta-help__pop) CSS selector uses the :has() pseudo-class which has limited support on older browsers (not supported in IE11, limited support in older Safari versions before 15.4). Consider adding a fallback or ensuring the target browser versions support this selector.

reviews: 'var(--amber)',
jira: 'var(--forest)',
points: 'var(--crimson)',
prs: '#1F77B4', // blue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion (refactor/consistency): Consider extracting METRIC_COLOR and PILLAR_PALETTE to a shared constants module that can be imported by both files. This would eliminate the duplication and ensure single-source maintenance.

@alaudabot

Copy link
Copy Markdown
Contributor

🤖 AI Code Review

Property Value
Model opencode/minimax-m2.5-free
Style strict
Issues Found 0
Config Source centralized
Profile ❌ Not Found
Personalized Prompt ❌ No
Prompt Path .github/review/profiles/alaudadevops/toolbox/pr-review.md
Alauda Skills ✅ base-acp-operator-list, base-acp-operator-release, base-authoring, base-m365, base-ocp-operator-list, base-skill-setup, builders-alauda-pipeline, builders-component-knowledge, builders-confluence, builders-jira, builders-notify-wecom, builders-prd-to-testcase, builders-publish-errata, builders-roadmap-studio, builders-story-split, cross-repo-add-mirror, cross-repo-publish, devops-autodns, devops-candidate-version-supervisor, devops-connectors-acceptance-test, devops-connectors-explore, devops-connectors-poc-case, devops-connectors-review, devops-connectors-unit-test, devops-connectors-upgrade-test, devops-connectors-write-user-docs, devops-creating-tekton-pipelines, devops-fix-go-vulns, devops-fork-alauda-binary-release, devops-gen-advanced-form-descriptors, devops-jira-rfd-acceptance, devops-knowledge-adoption, devops-refresh-containerfile-digests, devops-refresh-containerfile-tags, devops-replace-strings, devops-scan-docker-keywords, devops-sync-alauda-github-releases, devops-tekton-dynamic-form-optimizer, devops-tekton-operator-task-e2e, devops-tekton-pipeline-delivery, devops-tekton-task-delivery, devops-tekton-task-overview-template, devops-tekton-task-version-upgrade, devops-tekton-upgrade-notes, devops-tool-report-troubleshoot, devops-ui-e2e-code-audit, devops-ui-e2e-fix-base-on-report, devops-ui-e2e-regression-and-fix, devops-ui-generate-e2e-from-feature, devops-ui-pre-setup, devops-upgrade-go, devops-upstream-backport-cve, devops-upstream-upgrade
Reviewed at 2026-05-11 06:21:58 UTC

Summary

This PR adds info/help popovers to the Team Analytics Dashboard, allowing users to understand what each chart displays, its data derivation, and how to interpret it. The implementation includes a new ChartHelp component, associated CSS styles, and updated color palettes for better visual distinction across themes. The changes are well-structured with proper accessibility handling (aria attributes, keyboard support, click-outside detection).

Review Statistics

Category Count
Critical Issues 0
Warnings 2
Suggestions 1
Files Reviewed 3

Critical Issues

Issues that MUST be addressed before merging (security, bugs, breaking changes)

None identified.

Warnings

Issues that SHOULD be addressed but are not blocking

  • roadmap-planner/frontend/src/components/TeamAnalytics.jsx:37-48 - refactor/duplication: PILLAR_PALETTE is defined in both TeamAnalytics.jsx and TeamAnalyticsDashboard.jsx with identical values. The comment notes "Keep in sync with TeamAnalyticsDashboard.jsx" but having duplicate code creates a maintenance burden. If colors need updating, they must be changed in both places. Consider extracting to a shared constants file.

  • roadmap-planner/frontend/src/components/TeamAnalytics.css:809 - style/compatibility: The .ta-panel:has(.ta-help__pop) CSS selector uses the :has() pseudo-class which has limited support on older browsers (not supported in IE11, partial support in older Safari versions before 15.4). Consider adding a fallback or ensuring the target browser versions support this selector.

Suggestions

Recommendations for improvement (nice to have)

Positive Feedback

  • The ChartHelp component is well-implemented with proper accessibility: aria-label, aria-expanded, role="dialog", and keyboard support (Escape key closes popover).
  • Click-outside detection is handled correctly with cleanup in the useEffect return function.
  • The color palette changes (hardcoded hex values instead of theme variables) are well-justified in the comments - they solve the issue where --accent and --ocean both resolve to blue in the default light theme.
  • The help text content is comprehensive and provides clear explanations of each chart's purpose and interpretation.
  • CSS transitions on the help button provide good visual feedback on hover/active states.

ℹ️ About this review

This review was automatically generated using the run-actions workflow.

  • Shared prompt: .github/prompts/code-review.md
  • Config source: centralized
  • Profile path: Not Found
  • Profile ref: 4a9568cdd56fea5ff37c463d60c67e04c765f13f
  • No repository-specific prompt configured
  • Alauda skills: base-acp-operator-list, base-acp-operator-release, base-authoring, base-m365, base-ocp-operator-list, base-skill-setup, builders-alauda-pipeline, builders-component-knowledge, builders-confluence, builders-jira, builders-notify-wecom, builders-prd-to-testcase, builders-publish-errata, builders-roadmap-studio, builders-story-split, cross-repo-add-mirror, cross-repo-publish, devops-autodns, devops-candidate-version-supervisor, devops-connectors-acceptance-test, devops-connectors-explore, devops-connectors-poc-case, devops-connectors-review, devops-connectors-unit-test, devops-connectors-upgrade-test, devops-connectors-write-user-docs, devops-creating-tekton-pipelines, devops-fix-go-vulns, devops-fork-alauda-binary-release, devops-gen-advanced-form-descriptors, devops-jira-rfd-acceptance, devops-knowledge-adoption, devops-refresh-containerfile-digests, devops-refresh-containerfile-tags, devops-replace-strings, devops-scan-docker-keywords, devops-sync-alauda-github-releases, devops-tekton-dynamic-form-optimizer, devops-tekton-operator-task-e2e, devops-tekton-pipeline-delivery, devops-tekton-task-delivery, devops-tekton-task-overview-template, devops-tekton-task-version-upgrade, devops-tekton-upgrade-notes, devops-tool-report-troubleshoot, devops-ui-e2e-code-audit, devops-ui-e2e-fix-base-on-report, devops-ui-e2e-regression-and-fix, devops-ui-generate-e2e-from-feature, devops-ui-pre-setup, devops-upgrade-go, devops-upstream-backport-cve, devops-upstream-upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants