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 Select component to TypeScript #571

Merged
merged 18 commits into from
Nov 4, 2024
Merged

Conversation

barsukov
Copy link
Contributor

Summary

  • Migrated the Select, SelectOption, SelectDivider components to TypeScript
  • Deprecate components Select, SelectOption,
  • Utilised static typing.

Changes Made

TypeScript Migration:

  • Converted Select, SelectOption, SelectDivider component files to TypeScript.
  • Added comprehensive type annotations.
  • Introduced a deprecated Select, SelectOption component for Javascript files.
  • Modify and simplify SelectRow component

Refactoring:

  • Made necessary adjustments to address TypeScript-detected issues.
  • Further refactored for cleaner and more understandable code.

Testing:

  • Removed AppShellProvider component from tests and stories, as not yet converted. But replace it with PortalProvider cause it should be a more accurate use case, since stories use PortalProvider instead.
  • Verified component behaviour using Storybook.
  • Updated tests to use vitest.

Release:

  • Generated a changeset file.

Related Issues

Testing Instructions

  1. Run Storybook
  2. Run Select, SelectOption, SelectDivider 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.

@barsukov barsukov added the ui-components All tasks related to juno-ui-components library label Oct 28, 2024
@barsukov barsukov self-assigned this Oct 28, 2024
Copy link

changeset-bot bot commented Oct 28, 2024

🦋 Changeset detected

Latest commit: fbbad56

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 Patch

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

@barsukov barsukov added the draft label Oct 28, 2024
Copy link
Contributor

github-actions bot commented Oct 28, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-11-04 08:57 UTC

@barsukov barsukov marked this pull request as ready for review October 28, 2024 20:51
@barsukov barsukov requested review from franzheidl and a team as code owners October 28, 2024 20:51
@barsukov barsukov removed the draft label Oct 29, 2024
Copy link
Contributor

@guoda-puidokaite guoda-puidokaite left a comment

Choose a reason for hiding this comment

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

Starting to review this component now. Here's an initial observation regarding imports. Not a blocking change at all, but would love to see the imports cleaned up and default directory exports utilised.

@barsukov
Copy link
Contributor Author

@guoda-puidokaite regarding export/import lets focus on migration make same way it iwas before then we would decide where we wanna go with it later with whoel project.

@guoda-puidokaite
Copy link
Contributor

Yah, not a blocking change for this PR as I mentioned. 🤪 But wanted to bring it up and see what you think. We can talk about it in the future. 🚀

Copy link
Contributor

@guoda-puidokaite guoda-puidokaite left a comment

Choose a reason for hiding this comment

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

Looks greattt! 🚀

Just had a few curious questions, code improvements and one type addition (most important requested change for ticket).

Thank You!

@barsukov
Copy link
Contributor Author

I really think that some change requests are good improvements, but others I would not mix up with migration. Migration is migration, we need to move trhough as carefull and quick as possible. Then later on we could be more dedicated on refactoring topics, but it is nice that you point some staff out @guoda-puidokaite

@guoda-puidokaite
Copy link
Contributor

As mentioned, only the type addition boolean change is a requested change. Rest I'm asking questions about, maybe some topics are worth bringing to the improvements EPIC. And some not. 😉🚀

taymoor89
taymoor89 previously approved these changes Oct 30, 2024
Copy link
Contributor

@guoda-puidokaite guoda-puidokaite left a comment

Choose a reason for hiding this comment

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

Super niiice! One more down. Thank Youuu! 💪

Copy link
Contributor

@edda edda left a comment

Choose a reason for hiding this comment

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

👍 🚀
Only one small change request.

@edda edda dismissed stale reviews from guoda-puidokaite and taymoor89 via a71c9a7 November 1, 2024 09:57
Copy link
Contributor

@guoda-puidokaite guoda-puidokaite left a comment

Choose a reason for hiding this comment

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

Thank You! 🚀💪✅

@barsukov barsukov merged commit d4167c9 into main Nov 4, 2024
15 checks passed
@barsukov barsukov deleted the wowa-select-ts branch November 4, 2024 08:57
TilmanHaupt pushed a commit that referenced this pull request Nov 4, 2024
* chore(ui): migrate select component

* chore(ui): move FormRow to deprecated

* chore(ui): add components to deprecated

* chore(ui): last clean up

* chore(ui): bring the status quo for FormRow

* chore(ui): deprecated change

* chore(ui): fix select story

* chore(ui): rollback some changes and fix tests

* chore(ui): add changeset

* chore(ui): update index.js

* chore(ui): minor review changes

* chore(ui): minor ui issue

* chore(ui): remove redundancy

* fix(ui): removes html id prop from interface

* fix(ui): extend interface to mirror underlying HTML elem props

---------
fixes #249 

Co-authored-by: Esther Schmitz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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