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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

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
Copy link

changeset-bot bot commented Nov 27, 2024

🦋 Changeset detected

Latest commit: 00a1c57

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
🚀 Deployed preview to https://cloudoperators.github.io/juno/pr-preview/pr-641/
on branch gh-pages at 2024-11-27 15:04 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
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
1 participant