Skip to content

IBX-10469: Stateful Inputs HOC#13

Merged
dew326 merged 3 commits intomainfrom
IBX-10469
Aug 19, 2025
Merged

IBX-10469: Stateful Inputs HOC#13
dew326 merged 3 commits intomainfrom
IBX-10469

Conversation

@GrabowskiM
Copy link
Copy Markdown
Contributor

🎫 Issue IBX-10469

Description:

For QA:

Documentation:

@GrabowskiM GrabowskiM requested a review from Copilot August 7, 2025 14:21
Copy link
Copy Markdown

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 stateful Higher-Order Component (HOC) for input components, specifically implementing it for the InputText component to manage internal state automatically.

  • Creates a withStateValue HOC that adds internal state management to wrapped components
  • Introduces InputTextStateful as a stateful version of InputText using the new HOC
  • Updates Storybook stories to use the stateful variant and removes manual state management decorators

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/components/src/internal/hoc/withStateValue.tsx New HOC that provides internal state management for input components
packages/components/src/inputs/InputText/index.ts Exports the new InputTextStateful component alongside the original
packages/components/src/inputs/InputText/InputText.tsx Renames component variable and creates stateful variant using the HOC
packages/components/src/inputs/InputText/InputText.test.stories.tsx Updates test stories to use stateful variant and adds clear button test
packages/components/src/inputs/InputText/InputText.stories.tsx Simplifies stories by using stateful variant and removing manual state decorators

@GrabowskiM GrabowskiM requested a review from a team August 7, 2025 14:35
@ezrobot ezrobot requested review from OstafinL, RopRaptor, albozek, dew326 and tischsoic and removed request for a team August 7, 2025 14:36
@dew326 dew326 merged commit aca3f70 into main Aug 19, 2025
4 checks passed
@dew326 dew326 deleted the IBX-10469 branch August 19, 2025 12:25
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.

5 participants