Skip to content

Conversation

@erdemcaygor
Copy link
Contributor

@erdemcaygor erdemcaygor commented Oct 16, 2025

Description

Resolves #23955

Includes

  • abp-form-field
  • abp-input
  • abp-form-field-hint

@erdemcaygor erdemcaygor requested a review from Copilot October 16, 2025 06:13
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 introduces a new AbpInputComponent as a secondary entry point for the ABP Angular components library, providing a reusable form input component with built-in validation display and localization support.

  • Adds a new AbpInputComponent that implements ControlValueAccessor for Angular reactive forms integration
  • Creates a secondary entry point @abp/ng.components/abp-input for modular imports
  • Updates TypeScript configuration to support the new component structure

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
npm/ng-packs/tsconfig.base.json Adds path mapping for the new abp-input secondary entry point
npm/ng-packs/packages/components/tsconfig.lib.json Fixes exclude path for test-setup.ts
npm/ng-packs/packages/components/abp-input/src/public-api.ts Exports the AbpInputComponent for public API
npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.ts Main component implementation with form integration and validation
npm/ng-packs/packages/components/abp-input/src/lib/abp-input.component.html Template with form controls, labels, and error display
npm/ng-packs/packages/components/abp-input/src/index.ts Re-exports component from lib directory
npm/ng-packs/packages/components/abp-input/ng-package.json Package configuration for Angular library build
npm/ng-packs/packages/components/abp-input/README.md Documentation for the new secondary entry point

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

});
}

writeValue(value: any[]): void {
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The writeValue method expects an array type (any[]) but the component appears to handle single values based on the template and form control setup. This should be writeValue(value: any): void instead.

Suggested change
writeValue(value: any[]): void {
writeValue(value: any): void {

Copilot uses AI. Check for mistakes.
Comment on lines +95 to +97
return []
}
return []
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

The errors getter always returns an empty array regardless of whether there are actual errors. It should return the actual error messages when this.control.errors exists.

Suggested change
return []
}
return []
return Object.keys(this.control.errors);
}
return [];

Copilot uses AI. Check for mistakes.
}
</div>
}
<div></div>
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

Empty div element serves no purpose and should be removed to keep the template clean.

Suggested change
<div></div>

Copilot uses AI. Check for mistakes.
abpInputFormGroup: FormGroup;

ngOnInit() {

Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

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

[nitpick] Extra blank line after method declaration should be removed for consistency.

Suggested change

Copilot uses AI. Check for mistakes.
@erdemcaygor erdemcaygor changed the title Angular - Abp form input component Angular - Abp form field component Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Angular - Create ABP forms component

2 participants