Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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.
Pull request overview
This PR enhances the FTP service functionality by adding support for the onError handler, improving post-processing actions with success/error configurations, and refining the UI for better user experience.
Changes:
- Added
onErrorhandler support alongside existingonCreateandonDeletehandlers - Implemented post-processing actions (move/delete) with separate configurations for success and error scenarios
- Enhanced UI with info banners, collapsible advanced configs, and improved parameter editing
- Updated FTP service display to show monitoring paths in service/listener titles
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| workspaces/ballerina/type-editor/src/TypeEditor/ContextBasedTypeEditor/ContextTypeEditor.tsx | Added note prop to display informational messages in type editor |
| workspaces/ballerina/type-editor/src/TypeEditor/ContextBasedTypeEditor/ContextTypeCreator.tsx | Implemented info banner component to display the note prop |
| workspaces/ballerina/type-editor/src/TypeEditor/ContextBasedTypeEditor/BrowseTypesTab.tsx | Added info banner support in browse types tab |
| workspaces/ballerina/ballerina-visualizer/src/views/BI/TypeEditor/index.tsx | Propagated note prop through type editor components |
| workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/index.tsx | Added onError handler support and implemented FTP service title display with path |
| workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/ServiceConfigureView.tsx | Enhanced listener configuration to differentiate attached listeners and show minimal config |
| workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/FTPForm/index.tsx | Major refactor: added post-processing actions, parameter name derivation, and reorganized UI with collapsible sections |
| workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/FTPForm/Parameters/Parameters.tsx | Enhanced parameter component with inline editing capabilities |
| workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/FTPForm/Parameters/ParamEditor.tsx | New component for inline parameter editing with name and type fields |
| workspaces/ballerina/ballerina-visualizer/src/views/BI/ServiceDesigner/Forms/FTPForm/FTPConfigForm.tsx | Added onError event to available handler events |
| workspaces/ballerina/ballerina-visualizer/src/components/EntryPointTypeCreator/index.tsx | Added note prop support to entry point type creator |
| workspaces/ballerina/ballerina-extension/src/utils/project-artifacts.ts | Updated service display name to include FTP path/accessor information |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * Converts a PascalCase or camelCase type name to a camelCase parameter name. | ||
| * For CSV format, pluralizes the name since it represents an array of rows. | ||
| */ | ||
| const typeNameToParamName = (typeName: string, pluralize: boolean = false): string => { |
There was a problem hiding this comment.
The function name typeNameToParamName is ambiguous. Consider renaming to convertTypeNameToParameterName to better convey that it performs a conversion with pluralization rules.
| const typeNameToParamName = (typeName: string, pluralize: boolean = false): string => { | |
| const convertTypeNameToParameterName = (typeName: string, pluralize: boolean = false): string => { |
| parameters: ParameterModel[]; | ||
| onChange: (parameters: ParameterModel[]) => void; | ||
| onEditClick: (param: ParameterModel) => void; | ||
| onEditClick?: (param: ParameterModel) => void; |
There was a problem hiding this comment.
The onEditClick parameter has been made optional, but there's no documentation explaining when it should be provided versus when the inline editing should be used. Add a JSDoc comment explaining the two editing modes.
| <Divider /> | ||
| <AdvancedConfigsHeader onClick={() => setIsAdvancedConfigsExpanded(!isAdvancedConfigsExpanded)}> | ||
| <Codicon name={isAdvancedConfigsExpanded ? "chevron-down" : "chevron-right"} sx={{ marginRight: 4 }} /> | ||
| <Typography variant="body2">Advanced Configs</Typography> |
There was a problem hiding this comment.
All the other places ex: Kafka we use Advanced Parameters name. Shall we change this into Advanced Parameters wdyt?
|
|
||
| const haveServiceTypeName = serviceModel?.properties["serviceTypeName"]?.value; | ||
|
|
||
| const getFtpServiceTitle = () => { |
There was a problem hiding this comment.
This function determines the Main Panel's topic as well consider to use only on the side panel
Purpose
Goals
Approach
UI Component Development
npm run storybookfrom the root directory to view current components.Manage Icons
User stories
Release note
Documentation
Training
Certification
Marketing
Automation tests
Security checks
Samples
Related PRs
Migrations (if applicable)
Test environment
Learning