[DASHBOARDS] Add prefix and suffix setting to the aggregate chart#16216
Merged
bosiraphael merged 3 commits intomainfrom Dec 1, 2025
Merged
Conversation
Contributor
Greptile OverviewGreptile SummaryAdded prefix and suffix configuration options to aggregate chart widgets, allowing users to display units or symbols alongside metric values (e.g., "$1000" or "500 units"). Key changes:
Confidence Score: 5/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant ChartSettings
participant CommandMenuItemTextInput
participant useUpdateChartSettingTextInput
participant useUpdateCurrentWidgetConfig
participant GraphWidgetAggregateChartRenderer
participant GraphWidgetAggregateChart
User->>ChartSettings: Enter prefix/suffix in settings UI
ChartSettings->>CommandMenuItemTextInput: User types in text input
CommandMenuItemTextInput->>CommandMenuItemTextInput: Update draft state
User->>CommandMenuItemTextInput: Blur or press Enter/Escape
CommandMenuItemTextInput->>ChartSettings: onChange(draftValue)
ChartSettings->>useUpdateChartSettingTextInput: updateChartSettingTextInput(settingId, value)
useUpdateChartSettingTextInput->>useUpdateChartSettingTextInput: Map settingId to config key
useUpdateChartSettingTextInput->>useUpdateCurrentWidgetConfig: Update widget config
useUpdateCurrentWidgetConfig->>useUpdateCurrentWidgetConfig: Save to backend
Note over GraphWidgetAggregateChartRenderer: Widget re-renders with new config
GraphWidgetAggregateChartRenderer->>GraphWidgetAggregateChartRenderer: Extract prefix/suffix from configuration
GraphWidgetAggregateChartRenderer->>GraphWidgetAggregateChart: Pass prefix and suffix props
GraphWidgetAggregateChart->>GraphWidgetAggregateChart: Format displayValue = prefix + value + suffix
GraphWidgetAggregateChart->>User: Display formatted aggregate value
|
packages/twenty-front/src/modules/command-menu/pages/page-layout/components/ChartSettings.tsx
Outdated
Show resolved
Hide resolved
Contributor
|
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:2900 This environment will automatically shut down when the PR is closed or after 5 hours. |
|
Hey @bosiraphael! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
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.
CleanShot.2025-12-01.at.15.48.55.mp4