-
Notifications
You must be signed in to change notification settings - Fork 516
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
[Bug]: Support for defaultProps in Function Components to be Removed #2596
Comments
Updated defaultProps to use destructuring to avoid deprecation. Snapshots have been updated to match the changes. Resolves jaegertracing#2596. Signed-off-by: Abhishek <[email protected]>
Resolves jaegertracing#2596 Updated the components to fix broken working. Signed-off-by: Abhishek <[email protected]>
Resolves jaegertracing#2596 Updated the ScatterPlot component to remove defaultProps Signed-off-by: Abhishek <[email protected]>
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 <[email protected]>
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 <[email protected]>
Partially Resolves jaegertracing#2596 - Updated the LoadingIndicator component to remove LoadingIndicatorProps so as to avoid redundancy. Signed-off-by: Abhishek <[email protected]>
Partially Resolves jaegertracing#2596 - Removed optional availability from multiple fields Signed-off-by: Abhishek <[email protected]>
Partially Resolves jaegertracing#2596 - Added optional availability to multiple fields Signed-off-by: Abhishek <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## 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 - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: Abhishek <[email protected]> Signed-off-by: Yuri Shkuro <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
@its-me-abhishek could you enumerate the scope of this issue? How many components need to be updated? |
@its-me-abhishek I suggest putting them in the description as a checkbox list (using |
Done! will try to fix them in a similar sequence asap |
## Which problem is this PR solving? - Resolves #2596 ## Description of the changes - Wherever the default value was undefined, I have not added a default value for it since it is automatically undefined. ## How was this change tested? - npm run lint test ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: cs-308-2023 <[email protected]>
Partially Resolves jaegertracing#2596 - Remove defaultProps and updated the snapshots for the same Signed-off-by: Abhishek <[email protected]>
Partially Resolves jaegertracing#2596 - Remove defaultProps from the component, replace with destructuring Signed-off-by: Abhishek <[email protected]>
@yurishkuro, |
Partially Resolves jaegertracing#2596 - Remove defaultProps from the TimelineRow component, replace with destructuring Signed-off-by: Abhishek <[email protected]>
Partially Resolves jaegertracing#2596 Signed-off-by: Abhishek <[email protected]>
@its-me-abhishek @yurishkuro SearchForm is a class component, not a functional component, so I think it is okay to use defaultProps in it since it's not deprecated for React 18. So I don't think there is any need to change it. Also, there is the following issue #2610 that deals with converting the class components to functional components. So, maybe we can convert the class component into a functional component directly. |
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: cs-308-2023 <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: cs-308-2023 <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` Signed-off-by: cs-308-2023 <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` Signed-off-by: cs-308-2023 <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: cs-308-2023 <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: cs-308-2023 <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: cs-308-2023 <[email protected]> Co-authored-by: Yuri Shkuro <[email protected]>
## Which problem is this PR solving? - Part of #2596 ## Description of the changes - ## How was this change tested? - ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: cs-308-2023 <[email protected]>
Partially Resolves jaegertracing#2596 Signed-off-by: Abhishek <[email protected]>
Partially Resolves jaegertracing#2596 Signed-off-by: Abhishek <[email protected]>
What happened?
The following warning appears in the console while running the application:
Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
This warning points to the
LoadingIndicator
component here (and exists in other components as well), which currently relies ondefaultProps
for setting default values. As this feature will be deprecated in upcoming React versions, the codebase should transition to using default parameter values in function component definitions.Steps to reproduce
Expected behavior
The defaultProps should be removed from the codebase and migration should be done similar to this as discussed previously on Slack
Relevant log output
Components to be updated
The text was updated successfully, but these errors were encountered: