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

Replace PropTypes with TypeScript types #407

Conversation

kofta999
Copy link
Contributor

The Pull Request is ready

Overview

Replaces runtime type checking introduced with PropTypes package with static type checking using TypeScript

Also added keys to the list items in breadcrumbs component to fix React warning about not using keys in list items
See: https://sentry.io/answers/unique-key-prop/

Website

  • mobile view is usable
  • desktop view is usable
  • no a-tags are used directly (NavLink, MailLink, ExternalLink instead)
  • all new texts are added to the translation files (at least the english one)
  • tests have been added (if required)
  • shared code has been extracted in a different file

Notes

Please check if using name as a key is unique enough, couldn't think of anything else.
Didn't intend to add the keys in this PR but I found it by chance while checking if everything is fine in the website

@kofta999 kofta999 marked this pull request as draft March 16, 2024 20:47
Copy link

@github-actions github-actions bot 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 for contributing!
Please make sure the actions pass. Once your pull request has been merged, you will automatically be added to the contributor's list on the website.
If you want to be shouted out on Linkedin, have a look for the shoutout issue of the specific version.

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@kofta999
Copy link
Contributor Author

I'm not sure why did code coverage decrease even I haven't changed anything in most components' code, so will mark for review and wait for the maintainer's opinion on this.

@kofta999 kofta999 marked this pull request as ready for review March 16, 2024 21:09
@Idrinth
Copy link
Member

Idrinth commented Mar 17, 2024

I'm not sure why did code coverage decrease even I haven't changed anything in most components' code, so will mark for review and wait for the maintainer's opinion on this.

that happens, because you defined the interfaces in the file they are used in to my knowledge.

@kofta999
Copy link
Contributor Author

So should I create a separate interfaces.ts file and add all of them there? I doubt that's what normally happens with component props though

Or it's fine for coverage to decrease? It's up to you anyway.

@Idrinth
Copy link
Member

Idrinth commented Mar 17, 2024

So should I create a separate interfaces.ts file and add all of them there? I doubt that's what normally happens with component props though

Or it's fine for coverage to decrease? It's up to you anyway.

sorry about the late reply, the drop is fine - we'll recover from that

@Idrinth Idrinth merged commit 6c88e6e into idrinth-api-bench:master Mar 17, 2024
21 of 23 checks passed
@kofta999 kofta999 deleted the issue-403-replace-propTypes-typescript branch March 17, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace propTypes with typescript implementation
2 participants