Skip to content

IBX-10158: Adjust transform props#5

Merged
dew326 merged 12 commits intomainfrom
IBX-10158
Jun 30, 2025
Merged

IBX-10158: Adjust transform props#5
dew326 merged 12 commits intomainfrom
IBX-10158

Conversation

@GrabowskiM
Copy link
Copy Markdown
Contributor

🎫 Issue IBX-10158

Description:

For QA:

Documentation:

@GrabowskiM GrabowskiM marked this pull request as draft June 12, 2025 11:19
Base automatically changed from IBX-10153 to main June 18, 2025 08:21
@GrabowskiM GrabowskiM force-pushed the IBX-10158 branch 2 times, most recently from 14004a0 to 835da99 Compare June 25, 2025 12:38
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 adjusts how story IDs and properties are transformed in Storybook, and aligns input component props and defaults across BaseInput and InputText.

  • Convert camelCase story titles and args to snake_case and wrap the iframe for dynamic resizing
  • Make type optional in BaseInput and set its default in BaseInput component
  • Rename readOnly prop to readonly in InputText API and map it correctly to the underlying input

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
src/storybook/addons/framework-selector/FrameworkSelectorDecorator.tsx Add camelCaseToSnakeCase, update getStoryId, wrap iframe for resizing
packages/components/src/internal/partials/BaseInput/BaseInput.types.ts Change type in BaseInputVisibleProps to optional
packages/components/src/internal/partials/BaseInput/BaseInput.tsx Remove type destructure, set default, and simplify class logic
packages/components/src/InputText/InputText.types.ts Rename readOnly prop to readonly
packages/components/src/InputText/InputText.tsx Update destructured prop to readonly and map to readOnly attribute
Comments suppressed due to low confidence (2)

packages/components/src/InputText/InputText.types.ts:20

  • Renaming the prop from 'readOnly' to 'readonly' diverges from React’s standard readOnly prop and may confuse consumers. Consider retaining readOnly or providing a clear deprecation path.
    readonly?: boolean;

src/storybook/addons/framework-selector/FrameworkSelectorDecorator.tsx:24

  • There are no unit tests covering the new camelCaseToSnakeCase and getStoryId functions. Adding tests would help catch edge cases in string transformations.
const camelCaseToSnakeCase = (str: string) => str

return accumulator;
}

const properyFinalName = camelCaseToSnakeCase(propertyName);
Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

Typo in variable name: 'properyFinalName' should be 'propertyFinalName' to avoid confusion.

Suggested change
const properyFinalName = camelCaseToSnakeCase(propertyName);
const propertyFinalName = camelCaseToSnakeCase(propertyName);

Copilot uses AI. Check for mistakes.
@GrabowskiM GrabowskiM marked this pull request as ready for review June 25, 2025 12:39
@dew326 dew326 merged commit 27a1d28 into main Jun 30, 2025
4 checks passed
@dew326 dew326 deleted the IBX-10158 branch June 30, 2025 08:11
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