Skip to content

Conversation

@younocode
Copy link
Contributor

No description provided.

@younocode younocode requested a review from Copilot November 6, 2025 09:30
Copy link
Contributor

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 adds a confirmation dialog feature for button field clicks in the application. When enabled, users will be prompted to confirm before executing button actions.

Key changes:

  • Added confirm property to button field options schema
  • Implemented confirmation dialog using the useConfirm hook before button execution
  • Optimized the useConfirm hook with useCallback to prevent unnecessary re-renders

Reviewed Changes

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

Show a summary per file
File Description
packages/ui-lib/src/base/dialog/confirm-modal/confirm.ts Wrapped confirm function with useCallback for performance optimization
packages/sdk/src/hooks/use-button-click-status.ts Added confirmation logic before button click execution
packages/sdk/src/components/grid/renderers/cell-renderer/buttonCellRenderer.ts Passed confirm option to buttonClick handler
packages/sdk/src/components/editor/button/Editor.tsx Passed confirm option to buttonClick handler
packages/core/src/models/field/derivate/button-option.schema.ts Added confirm boolean field to button options schema
packages/common-i18n/src/locales/zh/table.json Added Chinese translation for click confirmation label
packages/common-i18n/src/locales/zh/sdk.json Added Chinese translations for automation confirmation messages
packages/common-i18n/src/locales/en/table.json Added English translation for click confirmation label
packages/common-i18n/src/locales/en/sdk.json Added English translations for automation confirmation messages
apps/nextjs-app/src/features/app/components/field-setting/options/ButtonOptions.tsx Added UI switch control for enabling/disabling confirmation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@younocode younocode force-pushed the feat/button-field-confirm-click branch from 213a1f9 to f806378 Compare November 6, 2025 15:13
@younocode younocode force-pushed the feat/button-field-confirm-click branch from f54eedb to 7b0df7d Compare November 14, 2025 06:58
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.

2 participants