Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ui): migrate ContentAreaToolbar component to Typescript and improve ContentContainer and ContentHeading #641

Merged
merged 9 commits into from
Nov 29, 2024

Conversation

guoda-puidokaite
Copy link
Contributor

@guoda-puidokaite guoda-puidokaite commented Nov 27, 2024

Summary

  • Migrated ContentAreaToolbar to TypeScript, enhancing code quality, maintainability, and scalability.
  • Utilised static typing to minimize runtime errors and improve the development experience.
  • Improved types of already converted ContentContainer and ContentHeading.
  • Moved deprecated ContentArea and ContentAreaWrapper to the /deprecated_js folder (for deletion when ready) and added it to deprecated section in Storybook.

Changes Made

TypeScript Migration:

  • Converted ContentAreaToolbar component files to TypeScript.
  • Added comprehensive type annotations.
  • Exported migrated ContentAreaToolbar, ContentArea and ContentAreaWrapper components instead of deprecated ones.
  • Moved deprecated ContentArea and ContentAreaWrapper component to /deprecated_js so they can be deleted when ready.

Testing:

  • Added edge cases:
    • ContentAreaToolbar
      • Renders without any props
      • Renders multiple children elements
      • Renders with no children
    • ContentContainer
      • Renders without any props
      • Renders multiple children elements
      • Renders with no children
    • ContentHeading
      • Renders without any text
      • Render with multiple children elements
      • Renders with no children
  • Organised tests by what they check for better readability and maintenance.
  • Verified components behaviour using Storybook.
  • Updated tests to use vitest.

Documentation:

  • Updated Storybook documentation.

Release:

  • Generated a changeset file.

Related Issues

Testing Instructions

  1. Check Storybook

Checklist

  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have made corresponding changes to the documentation (if applicable).
  • My changes generate no new warnings or errors.

@guoda-puidokaite guoda-puidokaite added enhancement New feature or request package All tasks related to package under packages/ ui-components All tasks related to juno-ui-components library refactor labels Nov 27, 2024
@guoda-puidokaite guoda-puidokaite self-assigned this Nov 27, 2024
@guoda-puidokaite guoda-puidokaite requested review from franzheidl and a team as code owners November 27, 2024 14:11
Copy link

changeset-bot bot commented Nov 27, 2024

🦋 Changeset detected

Latest commit: 2306c1a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cloudoperators/juno-ui-components Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Nov 27, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-11-29 14:06 UTC

@guoda-puidokaite guoda-puidokaite changed the title chore(ui): migrate ContentAreaToolbar, ContentContainer and ContentHeading components to Typescript chore(ui): migrate ContentAreaToolbar component to Typescript and improve ContentContainer and ContentHeading Nov 27, 2024
@andypf
Copy link
Collaborator

andypf commented Nov 28, 2024

reviewing....

andypf
andypf previously approved these changes Nov 29, 2024
Copy link
Collaborator

@andypf andypf left a comment

Choose a reason for hiding this comment

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

LGTM

@guoda-puidokaite
Copy link
Contributor Author

guoda-puidokaite commented Nov 29, 2024

Thank You for the review, @taymoor89. Please re-approve, @andypf.
Let's not merge as @ArtieReus would also like to have a look. But if not reviewed in the afternoon, I'll merge. 💪

@guoda-puidokaite guoda-puidokaite merged commit b99caff into main Nov 29, 2024
15 checks passed
@guoda-puidokaite guoda-puidokaite deleted the guoda-convert-content-to-ts branch November 29, 2024 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package All tasks related to package under packages/ ui-components All tasks related to juno-ui-components library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TASK](ui): Migrate Content component to TypeScript
4 participants