Skip to content

Conversation

2eha0
Copy link
Contributor

@2eha0 2eha0 commented Oct 14, 2025

Summary

In this PR:

  • Introduced useFreeFormStore() to manage all FreeForm-related state and methods.
  • Added an onChange callback with metadata to indicate the reason for the change.
  • Improved typing for inject keys.

@2eha0 2eha0 requested a review from Copilot October 14, 2025 07:26
Copy link

@Copilot 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 free-form component architecture to introduce a centralized store pattern using createInjectionState from VueUse. The main purpose is to replace the previous dependency injection system with a more structured store approach for managing form state, schema helpers, and configuration.

Key changes include:

  • Introduction of a new FreeFormStore using createInjectionState pattern
  • Removal of multiple individual injection keys in favor of centralized store access
  • Addition of field change tracking with metadata for better form state management

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
composables.ts Core refactor introducing the new store pattern and removing old injection-based system
Form.vue Updated to use the new store provider pattern instead of multiple individual providers
Multiple field components Updated imports and function calls to use the new useFreeformStore instead of useFormShared
RedisSelector.vue Enhanced field usage with proper error handling and instance ID tracking
ArrayField.vue Improved array item removal logic using filter instead of splice

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kongponents-bot
Copy link
Collaborator

Preview components from this PR in consuming application

In consuming application project install preview versions of shared packages generated by this PR:

@kong-ui-public/entities-plugins@pr-2560

@2eha0 2eha0 marked this pull request as ready for review October 14, 2025 08:24
@2eha0 2eha0 requested review from a team as code owners October 14, 2025 08:24
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