-
Notifications
You must be signed in to change notification settings - Fork 60
[BI Data Mapper] Add refresh button #1016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BI Data Mapper] Add refresh button #1016
Conversation
WalkthroughA Refresh button has been added to the Data Mapper header component. The new ActionIconButton is positioned after the existing Clear mappings button with an onClick handler bound to an onRefresh callback. Horizontal gap spacing (2px) has been added to the button container for improved layout. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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)
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx (1)
140-140: Consider slightly larger gap for better visual separation.The 2px gap provides minimal spacing between action buttons. Typical button spacing is 4px or more for clearer visual separation. However, this might be an intentional design choice to keep the action group compact.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx(2 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-11-26T07:49:56.428Z
Learnt from: KCSAbeywickrama
Repo: wso2/vscode-extensions PR: 653
File: workspaces/bi/bi-extension/src/test/e2e-playwright-tests/data-mapper/DataMapperUtils.ts:136-141
Timestamp: 2025-11-26T07:49:56.428Z
Learning: In workspaces/bi/bi-extension/src/test/e2e-playwright-tests/data-mapper/DataMapperUtils.ts, the goPrevViewBackButton() method is only called when in a focused view, ensuring breadcrumbs are always present. No guard for empty breadcrumbs is needed.
Applied to files:
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx
📚 Learning: 2025-11-27T07:58:16.698Z
Learnt from: KCSAbeywickrama
Repo: wso2/vscode-extensions PR: 897
File: workspaces/ballerina/data-mapper/src/components/Diagram/Label/MappingOptionsWidget.tsx:102-107
Timestamp: 2025-11-27T07:58:16.698Z
Learning: In workspaces/ballerina/data-mapper/src/components/Diagram/Label/MappingOptionsWidget.tsx, the `inProgress` state in `wrapWithProgress` intentionally doesn't reset to `false`. The component unmounts when the onClick operation finishes, and resetting the state would cause the mapping options menu to briefly reappear while the data mapper loads new content from file changes.
Applied to files:
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx
📚 Learning: 2025-11-25T06:34:10.812Z
Learnt from: CR
Repo: wso2/vscode-extensions PR: 0
File: workspaces/ballerina/component-diagram/AGENTS.md:0-0
Timestamp: 2025-11-25T06:34:10.812Z
Learning: Applies to workspaces/ballerina/component-diagram/src/components/**/*.tsx : Use React 18.2.0 features including concurrent rendering and automatic batching; avoid class components in favor of functional components with hooks
Applied to files:
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx
📚 Learning: 2025-11-26T06:34:09.752Z
Learnt from: KCSAbeywickrama
Repo: wso2/vscode-extensions PR: 653
File: workspaces/bi/bi-extension/src/test/e2e-playwright-tests/data-mapper/DataMapperUtils.ts:128-134
Timestamp: 2025-11-26T06:34:09.752Z
Learning: In workspaces/bi/bi-extension/src/test/e2e-playwright-tests/data-mapper/DataMapperUtils.ts, the goPrevViewBreadcrumb() method is only called when in a focused view, ensuring breadcrumbs are always present. No guard for empty breadcrumbs is needed.
Applied to files:
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx
🧬 Code graph analysis (1)
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx (1)
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/ActionIconButton.tsx (1)
ActionIconButton(28-48)
🔇 Additional comments (1)
workspaces/ballerina/data-mapper/src/components/DataMapper/Header/DataMapperHeader.tsx (1)
76-80: LGTM — Codicon icon name verified.The Refresh button implementation is correct. Web search confirms that "refresh" is a valid VSCode Codicon icon name (used as
$(refresh)orcodicon-refresh). The implementation properly follows the same pattern as the existing Clear button and passes all required props to ActionIconButton.
Purpose
Summary by CodeRabbit
Release Notes
✏️ Tip: You can customize this high-level summary in your review settings.