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

[TASK](ui): Migrate SearchInput component to TypeScript #247

Closed
6 tasks done
Tracked by #168
barsukov opened this issue Aug 19, 2024 · 3 comments · Fixed by #528
Closed
6 tasks done
Tracked by #168

[TASK](ui): Migrate SearchInput component to TypeScript #247

barsukov opened this issue Aug 19, 2024 · 3 comments · Fixed by #528
Assignees
Labels
enhancement New feature or request

Comments

@barsukov
Copy link
Contributor

barsukov commented Aug 19, 2024

Task Description

We need to convert SearchInput and all related components from @cloudoperators/juno-ui-components to TypeScript

List of potential dependencies

  • Check files that used with SearchInput

Sub-tasks

  • change the name to .tsx of all related components
  • Change the stories to .tsx and all related componetns
  • fix all errors related to npm run typecheck
  • Transfer all related tests to vitests from jest
  • Check if npm run build is working and prove the working parts in storybook or example app
  • Check that npm run lint is working correctly and fix all tslint errors

Related Issues

Additional Context
Please check this online codemode editor to change the PropTypes to a proper Ts interfaces

https://github.com/mskelton/ratchet
Online editor: https://ratchet.mskelton.dev/

We need to be pretty concious about migration to ts cause it could create a potential breaking changes. Also if there will be too much changes at once maybe consider to split up the task again. Also some dependencies could be hidden and only discovered while executing the migration, could also lead to potential reconsidering the order of task execution.

@barsukov barsukov added the enhancement New feature or request label Aug 19, 2024
@barsukov barsukov changed the title SearchInput [TASK](ui): Migrate SearchInput component to TypeScript Aug 19, 2024
@guoda-puidokaite guoda-puidokaite self-assigned this Oct 11, 2024
@guoda-puidokaite guoda-puidokaite linked a pull request Oct 17, 2024 that will close this issue
6 tasks
@guoda-puidokaite
Copy link
Contributor

guoda-puidokaite commented Oct 17, 2024

'onKeyPress' is deprecated 🔻

Screenshot 2024-10-17 at 09 12 44

Note: If we change it, would be really nice to rename the SearchInput prop to onKeyDown too

CC: @edda

@edda
Copy link
Contributor

edda commented Oct 17, 2024

'onKeyPress' is deprecated 🔻

Screenshot 2024-10-17 at 09 12 44 Note: If we change it, would be really nice to rename the `SearchInput` prop to `onKeyDown` too

CC: @edda

Removing onKeyPress completely would be a breaking change. What I would do as a first step is add an onKeyDown handler (that does the same thing as the current onKeyPress handler) and ensure the onKeyPress prop is marked as deprecated. Then when we release the next major version we can remove it together with the other deprecated components and options.

However, having said all that, there are other components that also have onKeyPress handlers (Pagination comes to mind, maybe others, too). They should all be changed at the same time. I'll add it to our ui-components umbrella epic.

@guoda-puidokaite
Copy link
Contributor

Perfect, Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants