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

[LoadingIndicator]: Replace defaultProps with destructuring #2601

Merged

Conversation

its-me-abhishek
Copy link
Contributor

@its-me-abhishek its-me-abhishek commented Jan 20, 2025

Which problem is this PR solving?

Description of the changes

  • Updated the LoadingIndicator component to remove defaultProps so as to avoid the deprecation warnings.
  • Updated the snapshots so as to match the new LoadingIndicator.

How was this change tested?

  • Running npm ci npm run update-snapshots and npm test passes all the tests
  • Tested manually by rendering LoadingIndicator using various props

Checklist

Partially Resolves jaegertracing#2596
- Updated the LoadingIndicator component to remove defaultProps so as to avoid the deprecation warnings.
- Updated the snapshots so as to match the new LoadingIndicator.

Signed-off-by: Abhishek <bumblebee31304@gmail.com>
@its-me-abhishek its-me-abhishek requested a review from a team as a code owner January 20, 2025 08:45
@its-me-abhishek its-me-abhishek requested review from pavolloffay and removed request for a team January 20, 2025 08:45
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.61%. Comparing base (7104ef3) to head (8d44145).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2601   +/-   ##
=======================================
  Coverage   96.61%   96.61%           
=======================================
  Files         255      255           
  Lines        7745     7745           
  Branches     1999     1988   -11     
=======================================
  Hits         7483     7483           
  Misses        262      262           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

its-me-abhishek and others added 2 commits January 21, 2025 11:06
Partially Resolves jaegertracing#2596
- Updated the LoadingIndicator component to remove LoadingIndicatorProps so as to avoid redundancy.

Signed-off-by: Abhishek <bumblebee31304@gmail.com>
Partially Resolves jaegertracing#2596
- Removed optional availability from multiple fields

Signed-off-by: Abhishek <bumblebee31304@gmail.com>
yurishkuro
yurishkuro previously approved these changes Jan 21, 2025
@yurishkuro yurishkuro changed the title [refactor]: Replace defaultProps with destructuring in LoadingIndicator [LoadingIndicator]: Replace defaultProps with destructuring Jan 21, 2025
@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Jan 21, 2025
@yurishkuro
Copy link
Member

make sure npm run lint is successful on your machine

@its-me-abhishek
Copy link
Contributor Author

its-me-abhishek commented Jan 22, 2025

this linting issue (similar but not the same)

Type '{ className: string; }' is missing the following properties from type '{ centered: boolean; vcentered?: boolean | undefined; className: string; small: boolean; style?: CSSProperties | undefined; }': centered, smallts(2739)

is there in all the components, either i will have to explicitly mention all the non optional props that are not passed yet, from all the components that use loading indicator, or make these optional in the loading indicator itself.
what shall i proceed with?

@yurishkuro
Copy link
Member

maybe make centered, small optional again?

Partially Resolves jaegertracing#2596
- Added optional availability to multiple fields

Signed-off-by: Abhishek <bumblebee31304@gmail.com>
@its-me-abhishek
Copy link
Contributor Author

Done, the lint tests pass now

yurishkuro
yurishkuro previously approved these changes Jan 23, 2025
Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro merged commit 2159753 into jaegertracing:main Jan 23, 2025
9 checks passed
@yurishkuro
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants