Skip to content

[WEB-4246] Analytics minor improvements#7194

Merged
sriramveeraghanta merged 15 commits intopreviewfrom
analytics-minor-improvements
Jun 12, 2025
Merged

[WEB-4246] Analytics minor improvements#7194
sriramveeraghanta merged 15 commits intopreviewfrom
analytics-minor-improvements

Conversation

@JayashTripathy
Copy link
Member

@JayashTripathy JayashTripathy commented Jun 10, 2025

Description

  • improved table export logic
  • imploved tabs segregation

Type of Change

  • Improvement (change that would cause existing functionality to not work as expected)

Summary by CodeRabbit

  • New Features

    • Added the ability to export analytics tables as CSV files using a new export button in relevant components.
    • Introduced customizable tooltip content support for scatter charts.
  • Enhancements

    • Improved CSV export by introducing export metadata to table columns, allowing for more accurate and flexible data exports.
    • Y-axis labels in area and bar charts now dynamically display either "epics" or "work items" based on context.
    • Extended analytics tab configurations with an optional property to support future UI enhancements.
    • Added new localized strings for "No. of {entity}" and "At risk" status in multiple languages.
    • Enhanced trend indicators with new styling variants and optional icon visibility.
    • Added consistent horizontal offset configurability for Y-axis labels in charts.
    • Limited maximum width for description text in analytics empty states to improve layout.
  • Refactor

    • Centralized and streamlined CSV export logic to improve maintainability and consistency across analytics tables.
    • Updated table components to always render data tables, showing empty states within the table rather than conditional UI.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 10, 2025

Walkthrough

A new generic type for export configuration is introduced in the analytics types. Analytics table components are refactored to use column-level export metadata and delegate CSV export logic to a new shared utility function. Minor UI logic is updated for conditional labeling, type definitions are extended for future tab configuration, and translation keys for "number of {entity}" are added in multiple locales. Additional UI and chart components gain optional props and improved configurability.

Changes

File(s) Change Summary
packages/types/src/analytics.d.ts Removed interface IAnalyticsRadarEntity; added generic type alias ExportConfig<T> and imported Row from @tanstack/react-table.
web/ce/components/analytics/tabs.ts Added optional boolean property isExtended to tab configuration objects.
web/core/components/analytics/export.ts Introduced utility function exportCSV<T> for exporting table data as CSV.
web/core/components/analytics/work-items/created-vs-resolved.tsx Updated AreaChart y-axis label to conditionally display "epics" or "work_items" based on isEpic flag.
web/core/components/analytics/work-items/priority-chart.tsx Refactored: Added export metadata to columns, removed inline CSV export logic, imported and used shared exportCSV.
web/core/components/analytics/work-items/workitems-insight-table.tsx Refactored: Added export metadata to columns, replaced local CSV export with shared exportCSV, and extended column types.
web/core/components/analytics/config.ts Removed CSV export configuration function csvConfig.
web/core/components/analytics/insight-table/root.tsx Removed conditional rendering; always render DataTable with default empty data array.
packages/constants/src/module.ts Added MODULE_STATUS_COLORS constant and updated MODULE_STATUS to use centralized color definitions.
packages/i18n/src/locales/*/translations.json Added new translation key "no_of" with localized "number of {entity}" string in 20 locale JSON files.
packages/propel/src/charts/root.tsx (line-chart and scatter-chart) Added optional configurability for Y-axis label dx offset; scatter chart accepts new optional customTooltipContent prop.
packages/types/src/charts/index.d.ts Added optional customTooltipContent property to TChartProps type for custom tooltip rendering.
packages/ui/src/icons/cycle/helper.tsx Added CYCLE_GROUP_I18N_LABELS constant mapping cycle groups to i18n keys.
packages/ui/src/icons/cycle/index.ts Added re-export of all exports from ./helper.
web/core/components/analytics/empty-state.tsx Added max-width styling (350px) to description paragraph in AnalyticsEmptyState component.
web/core/components/analytics/insight-table/data-table.tsx Added optional chaining to safely access nested header group properties for search input value.
web/core/components/analytics/overview/project-insights.tsx Modified SWR cache key prefix for project insights data fetching.
web/core/components/analytics/trend-piece.tsx Extended TrendPiece component with optional trendIconVisible and variant props; updated styling and icon rendering.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TableComponent
    participant exportCSV Utility
    participant CSVGenerator
    participant Downloader

    User->>TableComponent: Clicks "Export CSV"
    TableComponent->>exportCSV Utility: Calls exportCSV(rows, columns, workspaceSlug)
    exportCSV Utility->>CSVGenerator: Generates CSV string from rows and column export metadata
    CSVGenerator-->>exportCSV Utility: Returns CSV string
    exportCSV Utility->>Downloader: Triggers CSV file download
Loading

Suggested labels

🌟improvement, ready_to_merge

Suggested reviewers

  • prateekshourya29

Poem

A rabbit hopped through fields of code,
Exporting charts with a lighter load.
Columns now know just what to send,
With exportCSV, there’s less to mend!
Tabs extended, labels smart—
Hoppy analytics, a work of art.
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f0917da and c4d69fe.

📒 Files selected for processing (3)
  • packages/i18n/src/locales/ua/translations.json (2 hunks)
  • packages/i18n/src/locales/vi-VN/translations.json (2 hunks)
  • packages/i18n/src/locales/zh-CN/translations.json (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/i18n/src/locales/vi-VN/translations.json
  • packages/i18n/src/locales/ua/translations.json
  • packages/i18n/src/locales/zh-CN/translations.json
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Analyze (python)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@makeplane
Copy link

makeplane bot commented Jun 10, 2025

Pull Request Linked with Plane Work Items

Comment Automatically Generated by Plane

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
web/core/components/analytics/work-items/workitems-insight-table.tsx (1)

188-202: Remove commented code.

The large block of commented-out CSV export logic should be removed since it's been replaced by the centralized exportCSV utility. Keeping dead code reduces maintainability and can cause confusion.

-  // const exportCSV = useCallback(
-  //   (rows: Row<AnalyticsTableDataMap["work-items"]>[]) => {
-  //     const rowData = rows.map((row) => {
-  //       const headers = columns.map((col) => col.meta?.export?.key).filter((v) => v != undefined);
-  //       const cells = headers.reduce((acc, header) => {
-  //         const cell = columns.find((col) => col.meta?.export?.key === header)?.meta?.export?.value(row);
-  //         return { ...acc, [header]: cell };
-  //       }, {});
-  //       return cells;
-  //     });
-  //     const csv = generateCsv(csvConfig(workspaceSlug))(rowData);
-  //     download(csvConfig(workspaceSlug))(csv);
-  //   },
-  //   [columns, workspaceSlug]
-  // );
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 32d5fea and 772fd95.

📒 Files selected for processing (6)
  • packages/types/src/analytics.d.ts (2 hunks)
  • web/ce/components/analytics/tabs.ts (1 hunks)
  • web/core/components/analytics/export.ts (1 hunks)
  • web/core/components/analytics/work-items/created-vs-resolved.tsx (1 hunks)
  • web/core/components/analytics/work-items/priority-chart.tsx (6 hunks)
  • web/core/components/analytics/work-items/workitems-insight-table.tsx (4 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (2)
web/core/components/analytics/work-items/created-vs-resolved.tsx (1)
packages/i18n/src/store/index.ts (1)
  • t (211-232)
web/core/components/analytics/export.ts (2)
web/core/store/router.store.ts (1)
  • workspaceSlug (69-71)
web/core/components/analytics/config.ts (1)
  • csvConfig (3-9)
🪛 Biome (1.9.4)
web/core/components/analytics/export.ts

[error] 10-10: Avoid the use of spread (...) syntax on accumulators.

Spread syntax should be avoided on accumulators (like those in .reduce) because it causes a time complexity of O(n^2).
Consider methods such as .splice or .push instead.

(lint/performance/noAccumulatingSpread)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (10)
web/ce/components/analytics/tabs.ts (1)

8-8: LGTM! Clean interface extension for future use.

The optional isExtended property is a well-structured addition that prepares the tab configuration for future functionality without breaking existing code.

packages/types/src/analytics.d.ts (2)

3-3: LGTM! Clean import addition.

The Row import from @tanstack/react-table properly supports the new export type definition.


63-67: LGTM! Well-designed generic export configuration type.

The ExportConfig<T> type is well-structured with:

  • Strong typing for the value extraction function
  • Flexible generic parameter for different data types
  • Optional label for customizable export headers

This provides a solid foundation for the centralized export functionality.

web/core/components/analytics/work-items/created-vs-resolved.tsx (1)

107-107: LGTM! Improved contextual labeling.

The conditional y-axis label properly adapts to show "epics" or "work_items" based on the isEpic flag, improving user experience with context-appropriate labeling.

web/core/components/analytics/work-items/priority-chart.tsx (2)

156-175: LGTM! Well-structured export metadata for columns.

The export metadata is properly configured with appropriate keys, labels, and value extraction functions. The implementation correctly supports the centralized export functionality.


232-232: LGTM! Clean integration with centralized export function.

The refactored CSV export properly delegates to the shared exportCSV utility with all required parameters, improving code maintainability and consistency.

web/core/components/analytics/work-items/workitems-insight-table.tsx (4)

1-2: LGTM: Import additions are appropriate.

The new imports for ColumnDef, Row, RowData, ExportConfig, and the centralized exportCSV utility support the refactoring objectives effectively.

Also applies to: 9-9, 19-19


24-28: LGTM: Module augmentation enhances type safety.

The module augmentation properly extends the ColumnMeta interface to include export configuration, providing type safety for the export metadata across all columns.


68-186: LGTM: Column definitions with export metadata are well-structured.

The enhanced column definitions consistently implement export metadata with appropriate key mapping and value extraction functions. The null safety handling (using optional chaining and nullish coalescing) is properly implemented across all columns.


212-212: LGTM: Export function integration is correct.

The updated onExport prop properly delegates to the centralized exportCSV utility with the correct parameters (rows, columns, workspaceSlug).

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
web/core/components/analytics/insight-table/root.tsx (1)

32-32: Consider improving the empty state search placeholder UX.

The current implementation shows "0 [headerText]" when there's no data, which might be confusing to users. Consider showing a more descriptive placeholder like "Search in [headerText]" or "No [headerText] available" for better UX.

-        searchPlaceholder={`${data?.length || 0} ${headerText}`}
+        searchPlaceholder={data?.length ? `${data.length} ${headerText}` : `Search ${headerText}`}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 772fd95 and 38570ce.

📒 Files selected for processing (4)
  • web/core/components/analytics/config.ts (0 hunks)
  • web/core/components/analytics/export.ts (1 hunks)
  • web/core/components/analytics/insight-table/root.tsx (1 hunks)
  • web/core/components/analytics/work-items/workitems-insight-table.tsx (4 hunks)
💤 Files with no reviewable changes (1)
  • web/core/components/analytics/config.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/core/components/analytics/export.ts
  • web/core/components/analytics/work-items/workitems-insight-table.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
web/core/components/analytics/insight-table/root.tsx (2)

29-32: Good refactoring to ensure consistent rendering.

The change to always render DataTable with data || [] fallback provides better consistency and aligns well with the centralized export logic refactoring. The optional chaining in the search placeholder is also a good defensive programming practice.


33-42:

Details

❓ Verification inconclusive

Verify export button UX for empty data scenarios.

The export button is now always visible, even when there's no data to export. This could confuse users who click export on empty tables. Consider either:

  1. Conditionally disabling the button when data is empty
  2. Ensuring the export function handles empty data gracefully with appropriate user feedback

🏁 Script executed:

#!/bin/bash
# Verify how the DataTable component handles empty arrays and if export functionality provides appropriate feedback for empty data

# Check DataTable implementation for empty state handling
ast-grep --pattern 'function DataTable($$$) {
  $$$
}'

# Check if there are any empty state handlers or messages
rg -A 10 -B 5 "empty.*state|no.*data|empty.*array" --type tsx

Length of output: 148


Verify export button UX for empty data scenarios

I wasn’t able to locate any empty‐state handling in the Table component or the onExport implementation. Please manually verify that:

  • The export button is disabled or hidden when table.getFilteredRowModel().rows is empty
  • Or that invoking export on an empty array shows clear, user-friendly feedback rather than producing an empty file or silent failure

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🔭 Outside diff range comments (4)
web/core/components/analytics/insight-table/data-table.tsx (2)

66-72: 🛠️ Refactor suggestion

table.getHeaderGroups()?.[0]?.headers?.[0]?.id is still a brittle way to pick the “searchable” column

Grabbing “the very first column of the very first header group” implicitly couples the search-bar logic to a particular table layout.
As soon as the consumer adds a row-selection column, a drag handle, or re-orders columns, the search bar will silently target the wrong column (or none at all).

Consider passing an explicit searchColumnId (or a predicate) via props and fall back to the first data column only when it’s not provided.


95-101: ⚠️ Potential issue

getColumn is called with a possibly-undefined id — this breaks strict TypeScript and can throw at runtime

table.getColumn(undefined) violates the TanStack typings (expects string | number).
Wrap it with a guard instead of relying on ?. after the call:

- value={table.getColumn(table.getHeaderGroups()?.[0]?.headers?.[0]?.id)?.getFilterValue() as string}
+ const columnId = table.getHeaderGroups()?.[0]?.headers?.[0]?.id;
+ value={columnId ? (table.getColumn(columnId)?.getFilterValue() as string) : ""}

This also gives you the columnId variable you already need in the next two handlers, eliminating duplication.

packages/propel/src/charts/line-chart/root.tsx (1)

120-127: ⚠️ Potential issue

Treat 0 as a valid dx value – switch || to nullish-coalescing

yAxis.dx || -16 overrides an explicit 0 with -16 because 0 is falsy.
If consumers legitimately pass dx: 0 to centre the label, the override will bite them.

-                dx: yAxis.dx || -16,
+                dx: yAxis.dx ?? -16,

Use ?? (or an explicit check) so only null/undefined fall back.
Replicate the same change in other chart components for consistency.

packages/propel/src/charts/scatter-chart/root.tsx (1)

104-113: ⚠️ Potential issue

Same dx falsy-value bug as in LineChart

Exact same issue – 0 cannot be passed. Apply the ?? operator.

-                dx: yAxis.dx || -16,
+                dx: yAxis.dx ?? -16,
🧹 Nitpick comments (7)
web/core/components/analytics/insight-table/data-table.tsx (1)

96-97: Hard-coded placeholder defeats i18n & prop customisation

placeholder="Search" ignores both localisation (t(...)) and the searchPlaceholder prop already passed in.
Reuse one of those instead:

- placeholder="Search"
+ placeholder={searchPlaceholder}
web/core/components/analytics/overview/project-insights.tsx (1)

34-46: Cache-key construction logic is duplicated across analytics views
Several analytics components build long template-string keys manually. Over time they tend to diverge (ordering, delimiter choices, missing fields) and hurt cache hit-rates. Consider extracting a small helper, e.g. buildRadarChartKey({ chart, workspace, duration, projects, cycle, module, peek }), so future refactors touch one place only.

-`radar-chart-project-insights-${workspaceSlug}-${selectedDuration}-${selectedProjects}-${selectedCycle}-${selectedModule}-${isPeekView}`
+buildRadarChartKey({
+  chart: "project-insights",
+  workspace: workspaceSlug,
+  duration: selectedDuration,
+  projects: selectedProjects,
+  cycle: selectedCycle,
+  module: selectedModule,
+  peek: isPeekView,
+})

This keeps keys deterministic, testable, and easier to update.

packages/propel/src/charts/scatter-chart/root.tsx (1)

128-150: Avoid recreating the tooltip render function on every render

Inline arrow functions inside JSX generate a new reference each render, forcing Recharts to re-mount the tooltip and causing unnecessary work. Memoise or extract the callback.

-              content={({ active, label, payload }) =>
-                customTooltipContent ? (
-                  customTooltipContent({ active, label, payload })
-                ) : (
-                  <CustomTooltip
-                    …props
-                  />
-                )
-              }
+              content={tooltipRenderer}

and above the return:

const tooltipRenderer = useCallback(
  ({ active, label, payload }) =>
    customTooltipContent
      ? customTooltipContent({ active, label, payload })
      : (
        <CustomTooltip
          active={active}
          activeKey={activePoint}
          label={label}
          payload={payload}
          itemKeys={itemKeys}
          itemLabels={itemLabels}
          itemDotColors={itemDotColors}
        />
      ),
  [customTooltipContent, activePoint, itemKeys, itemLabels, itemDotColors],
);

Small perf win, especially on large datasets.

web/core/components/analytics/trend-piece.tsx (4)

11-13: Prop additions are sound – please document defaults

trendIconVisible and variant greatly improve flexibility; however, they are now part of the public API and should be reflected in component documentation / Storybook so downstream consumers understand their behaviour and defaults (true, "simple").


34-47: Dark-mode / contrast not handled for new variants

outlined and tinted hard-code text-green-500 / text-red-500 (and matching border / bg). These colours are optimised for light backgrounds but become AA-contrast failures on dark themes. Consider adding explicit dark: classes (e.g. dark:text-green-400) or pulling colours from a theme token to keep accessibility intact.


56-61: Class string could be pre-computed for perf / readability

cn() is called on every render. Given that percentage, variant, and size seldom change, memoising the computed class string or pushing it into variants / sizeConfig reduces work in large lists. Not critical, but worth considering.


63-64: Guard icon rendering with fragment instead of logical-and

The && pattern occasionally trips TypeScript when the left operand isn’t strictly boolean. Wrapping the icon expression in a fragment avoids unintended coercion:

{trendIconVisible && (
  isPositive ? <TrendingUp className={config.icon} /> : <TrendingDown className={config.icon} />
)}
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38570ce and 2929cc1.

📒 Files selected for processing (31)
  • packages/constants/src/module.ts (2 hunks)
  • packages/i18n/src/locales/cs/translations.json (1 hunks)
  • packages/i18n/src/locales/de/translations.json (1 hunks)
  • packages/i18n/src/locales/en/translations.json (2 hunks)
  • packages/i18n/src/locales/es/translations.json (1 hunks)
  • packages/i18n/src/locales/fr/translations.json (1 hunks)
  • packages/i18n/src/locales/id/translations.json (1 hunks)
  • packages/i18n/src/locales/it/translations.json (1 hunks)
  • packages/i18n/src/locales/ja/translations.json (1 hunks)
  • packages/i18n/src/locales/ko/translations.json (1 hunks)
  • packages/i18n/src/locales/pl/translations.json (1 hunks)
  • packages/i18n/src/locales/pt-BR/translations.json (1 hunks)
  • packages/i18n/src/locales/ro/translations.json (1 hunks)
  • packages/i18n/src/locales/ru/translations.json (1 hunks)
  • packages/i18n/src/locales/sk/translations.json (1 hunks)
  • packages/i18n/src/locales/tr-TR/translations.json (1 hunks)
  • packages/i18n/src/locales/ua/translations.json (1 hunks)
  • packages/i18n/src/locales/vi-VN/translations.json (1 hunks)
  • packages/i18n/src/locales/zh-CN/translations.json (1 hunks)
  • packages/i18n/src/locales/zh-TW/translations.json (1 hunks)
  • packages/propel/src/charts/line-chart/root.tsx (1 hunks)
  • packages/propel/src/charts/scatter-chart/root.tsx (4 hunks)
  • packages/types/src/analytics.d.ts (3 hunks)
  • packages/types/src/charts/index.d.ts (10 hunks)
  • packages/ui/src/icons/cycle/helper.tsx (1 hunks)
  • packages/ui/src/icons/cycle/index.ts (1 hunks)
  • web/core/components/analytics/empty-state.tsx (1 hunks)
  • web/core/components/analytics/insight-table/data-table.tsx (1 hunks)
  • web/core/components/analytics/overview/project-insights.tsx (1 hunks)
  • web/core/components/analytics/trend-piece.tsx (2 hunks)
  • web/core/components/analytics/work-items/priority-chart.tsx (7 hunks)
✅ Files skipped from review due to trivial changes (24)
  • web/core/components/analytics/empty-state.tsx
  • packages/i18n/src/locales/id/translations.json
  • packages/i18n/src/locales/de/translations.json
  • packages/ui/src/icons/cycle/helper.tsx
  • packages/types/src/charts/index.d.ts
  • packages/i18n/src/locales/it/translations.json
  • packages/i18n/src/locales/ua/translations.json
  • packages/i18n/src/locales/ru/translations.json
  • packages/i18n/src/locales/pl/translations.json
  • packages/ui/src/icons/cycle/index.ts
  • packages/i18n/src/locales/cs/translations.json
  • packages/i18n/src/locales/sk/translations.json
  • packages/i18n/src/locales/en/translations.json
  • packages/i18n/src/locales/fr/translations.json
  • packages/i18n/src/locales/ko/translations.json
  • packages/i18n/src/locales/ja/translations.json
  • packages/i18n/src/locales/vi-VN/translations.json
  • packages/constants/src/module.ts
  • packages/i18n/src/locales/tr-TR/translations.json
  • packages/i18n/src/locales/ro/translations.json
  • packages/i18n/src/locales/pt-BR/translations.json
  • packages/i18n/src/locales/zh-TW/translations.json
  • packages/i18n/src/locales/es/translations.json
  • packages/i18n/src/locales/zh-CN/translations.json
🚧 Files skipped from review as they are similar to previous changes (2)
  • web/core/components/analytics/work-items/priority-chart.tsx
  • packages/types/src/analytics.d.ts
🧰 Additional context used
🧬 Code Graph Analysis (2)
web/core/components/analytics/overview/project-insights.tsx (1)
web/core/store/router.store.ts (1)
  • workspaceSlug (69-71)
packages/propel/src/charts/scatter-chart/root.tsx (1)
packages/propel/src/charts/components/tooltip.tsx (1)
  • CustomTooltip (17-59)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
web/core/components/analytics/overview/project-insights.tsx (1)

35-35: More specific SWR cache-key – good improvement
Adding the project-insights qualifier reduces the risk of key collisions with other radar-chart requests and keeps the cache namespace clearer.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
web/core/components/analytics/trend-piece.tsx (1)

34-50: Neutral (0 %) case still treated as negative — same concern as prior review.

Previous feedback about rendering a muted, icon-less neutral state was not addressed; 0 % will inherit "atrisk" styling.
Consider introducing an early return or a dedicated "neutral" style to avoid confusion.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fc1a72c and f698ef9.

📒 Files selected for processing (1)
  • web/core/components/analytics/trend-piece.tsx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Analyze (python)
  • GitHub Check: Analyze (javascript)

@sriramveeraghanta sriramveeraghanta merged commit c1a078e into preview Jun 12, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the analytics-minor-improvements branch June 12, 2025 15:45
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
* chore: updated label for epics

* chore: improved export logic

* refactor: move csvConfig to export.ts and clean up export logic

* refactor: remove unused CSV export logic from WorkItemsInsightTable component

* refactor: streamline data handling in InsightTable component for improved rendering

* feat: add translation for "No. of {entity}" and update priority chart y-axis label to use new translation

* refactor: cleaned up some component and added utilitites

* feat: add "at_risk" translation to multiple languages in translations.json files

* refactor: update TrendPiece component to use new status variants for analytics

* fix: adjust TrendPiece component logic for on-track and off-track status

* refactor: use nullish coalescing operator for yAxis.dx in line and scatter charts

* feat: add "at_risk" translation to various languages in translations.json files

* feat: add "no_of" translation to various languages in translations.json files

* feat: update "at_risk" translation in Ukrainian, Vietnamese, and Chinese locales in translations.json files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants