Skip to content

Conversation

@0721Betty
Copy link
Member

No description provided.

This comment was marked as outdated.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the flow function node feature by splitting components and hooks, adds comprehensive i18n support for rule functions, and introduces new utility functions.

  • Extend useLocale to return an existence checker (te) and include ruleFunction messages.
  • Add general-purpose utilities (waitAMoment, createRandomString, splitOnSymbol, etc.) and re-export them.
  • Restructure flow UI into standalone components, composables, and JSON definitions with updated dependencies and Vite config.

Reviewed Changes

Copilot reviewed 30 out of 32 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/utils/lib/useLocale.ts Extend locale hook with te and ruleFunction messages
packages/utils/lib/tools.ts Introduce timing, random string, trimming, and split utils
packages/utils/lib/index.ts Remove old rule exports, add tools export
packages/i18n/lib/zh/ruleFunction.ts Add alias/validation messages in Chinese
packages/i18n/lib/zh/common.ts Add common labels (field, alias, actions) in Chinese
packages/i18n/lib/ja/ruleFunction.ts Add alias/validation messages in Japanese
packages/i18n/lib/ja/common.ts Add common labels in Japanese
packages/i18n/lib/en/ruleFunction.ts Add alias/validation messages in English
packages/i18n/lib/en/common.ts Add common labels in English
packages/constants/constants.ts Define regex constants for alias validation
packages/components/vite.config.ts Mark @vue-flow/core as external with global
packages/components/package.json Add async-validator and @vue-flow/core
packages/components/index.ts Export new common and flow components/hooks
packages/components/flow/types.ts Define enums and types for flow functions
packages/components/flow/json/ruleField.json Remove deprecated server_unavailable field
packages/components/flow/index.ts Register FunctionForm plugin and re-export flow modules
packages/components/flow/form/processing/OperatorTag.vue Add OperatorTag UI component
packages/components/flow/form/processing/FunctionParamsColumnContent.vue Add parameter inputs for function forms
packages/components/flow/form/processing/FunctionFuncColumnContent.vue Add function selector for parameter forms
packages/components/flow/form/processing/FunctionForm.vue Implement the full function form (Form/SQL toggle)
packages/components/flow/form/processing/FunctionFieldColumnContent.vue Add field autocomplete input component
packages/components/flow/form/CommonFields.vue Add shared field autocomplete component
packages/components/flow/composables/useRuleFunc.ts Refactor rule function hook to use useFlowLocale
packages/components/flow/composables/useNodeForm.ts New creators for function items and forms
packages/components/flow/composables/useHandleFlowDataUtils.ts Convert form data to SQL expression
packages/components/flow/composables/useGenerateFlowDataUtils.ts Parse SQL expression back to form data
packages/components/flow/composables/useFormRules.ts Provide factory for required rules
packages/components/flow/composables/useFlowLocale.ts Wrap useLocale to provide t, te, and locale
packages/components/common/CustomInputPassword.vue Add custom password input with show/hide
packages/components/common/CustomFormItem.vue Add custom form item wrapper supporting read-only display
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

packages/utils/lib/tools.ts:30

  • The comment is ambiguous—consider rephrasing to clarify that splitting should not occur inside quotes or brackets.
 * do not support single/double quote and bracket

@Kinplemelon
Copy link
Member

🐮🐮🐮

@Kinplemelon Kinplemelon merged commit 1d11837 into sg/flow Jul 2, 2025
1 check passed
@Kinplemelon Kinplemelon deleted the sg/main branch July 2, 2025 07:04
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.

4 participants