Skip to content

Conversation

creativoma
Copy link
Contributor

Description of change

This PR addresses issue #656, which requested a reduction in the minimum width for paragraphs, text components, and inputs.


Changes Made:

  1. Centralized Constant:

    • Introduced DEFAULT_MIN_WIDTH in BASIC_SHAPE to define a shared minimum width for all relevant components.
    • Ensures consistency and avoids magic numbers.
  2. Updated Components:

    • Refactored the following components to use the centralized constant:
      • TextAreaShape
      • TextScribbledShape
      • ParagraphShape
      • SmalltextShape
      • Other related shapes.
  3. Improved Maintainability:

    • Removed hardcoded values for minWidth across components.
    • Ensured all shapes now reference BASIC_SHAPE.DEFAULT_MIN_WIDTH.

Technical Implementation:

  • Updated shape.const.ts to include DEFAULT_MIN_WIDTH in BASIC_SHAPE.
  • Refactored ShapeSizeRestrictions in all relevant components to use the centralized constant.
  • Verified that no other components were missed during the refactor.

Test Results:

  • Unit Tests:
    • ✅ All existing tests passed (npm run test).
  • E2E Tests:
    • ✅ Verified no regressions using Playwright (npm run e2e).
  • Manual Testing:
    • ✅ Confirmed minimum width is applied correctly across all affected components.

Closes Issue:

Closes #656.

@brauliodiez brauliodiez merged commit 5f83193 into Lemoncode:dev Aug 12, 2025
2 checks passed
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.

Decrease paragraph min width

2 participants