-
Notifications
You must be signed in to change notification settings - Fork 591
Fix React Fragment key issues in multiple components #2823
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
Fix React Fragment key issues in multiple components #2823
Conversation
Signed-off-by: Parship Chowdhury <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2823 +/- ##
==========================================
+ Coverage 97.31% 97.39% +0.07%
==========================================
Files 256 256
Lines 7947 7975 +28
Branches 2077 2062 -15
==========================================
+ Hits 7734 7767 +33
+ Misses 213 208 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Parship Chowdhury <[email protected]>
...ges/jaeger-ui/src/components/common/FilteredList/__snapshots__/highlightMatches.test.js.snap
Outdated
Show resolved
Hide resolved
packages/jaeger-ui/src/components/common/FilteredList/highlightMatches.tsx
Outdated
Show resolved
Hide resolved
|
I created this PR because I noticed several places in the codebase where React fragments were used without keys inside lists, which can cause warnings in React, especially as the codebase evolvess. Acc to me these changes are about following React best practices for keys and rendering |
|
I don't have a problem with the overall direction, I asked specific question. |
|
Thanks for clarifying, I understand your feedbacks and will make the changes as suggested. |
Signed-off-by: Parship Chowdhury <[email protected]>
Signed-off-by: Parship Chowdhury <[email protected]>
Signed-off-by: Parship Chowdhury <[email protected]>
0147179
Which problem is this PR solving?
While working on some other issues in the codebase, I found additional components with similar React Fragment and key issues. These components had the same React Fragment and key patterns (like in #2812 ) that needed to be solved for consistency and react best practices
Description of the changes
KeyValuesTable.tsx<>to<React.Fragment key={i}>for proper key attributionhighlightMatches.tsx<span>elementsSearchResults/index.tsxReact.Fragmentelements in conditional renderingChecklist
jaeger:make lint testjaeger-ui:npm run lintandnpm run test