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 ThemeToggle to Typescript #666

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

guoda-puidokaite
Copy link
Contributor

@guoda-puidokaite guoda-puidokaite commented Dec 5, 2024

Summary

  • Migrated the ThemeToggle component to TypeScript, enhancing code quality, maintainability, and scalability.
  • Utilised static typing to minimize runtime errors and improve the development experience.

Changes Made

TypeScript Migration:

  • Converted ThemeToggle component files to TypeScript.
  • Added comprehensive type annotations.
  • Made necessary adjustments to address TypeScript-detected issues.

Testing:

  • Verified component behaviour using Storybook.
  • Updated tests to use vitest.

Cleanup:

  • Removed deprecated code. It wasn't needed for any .js components.

Documentation:

  • Updated Storybook documentation.

Release:

  • Generated a changeset file, mentioning the migration and bug fix.

Related Issues

Testing Instructions

  1. Run Storybook
  2. Run ThemeToggle tests

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 labels Dec 5, 2024
@guoda-puidokaite guoda-puidokaite self-assigned this Dec 5, 2024
Copy link

changeset-bot bot commented Dec 5, 2024

🦋 Changeset detected

Latest commit: 91e84fa

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 Dec 5, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-12-06 10:44 UTC

@guoda-puidokaite guoda-puidokaite marked this pull request as ready for review December 5, 2024 15:21
@guoda-puidokaite guoda-puidokaite requested review from franzheidl and a team as code owners December 5, 2024 15:21
Copy link
Contributor

@barsukov barsukov left a comment

Choose a reason for hiding this comment

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

One little thing

andypf
andypf previously approved these changes Dec 5, 2024
@guoda-puidokaite guoda-puidokaite merged commit a3c43a0 into main Dec 6, 2024
15 checks passed
@guoda-puidokaite guoda-puidokaite deleted the guoda-convert-theme-toggle-to-ts branch December 6, 2024 10:43
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.

4 participants