-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix issue with non-unique keys React warning #9025
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 issue with non-unique keys React warning #9025
Conversation
parasharrajat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please update QA steps to test the Formatting of messages on all platforms. This change should not introduce any formatting changes.
cc: @AndrewGable
🎀 👀 🎀 C+ reviewed
Done |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by @AndrewGable in version: 1.1.63-0 🚀
|
|
🚀 Deployed to staging by @AndrewGable in version: 1.1.63-0 🚀
|
|
🚀 Deployed to production by @AndrewGable in version: 1.1.63-2 🚀
|
Details
Using
dangerouslyDisableWhitespaceCollapsing=truewas causing@native-html/transient-render-engineto produce a faulty tree in certain situations, where indexes are not reflecting real position, hence we were ending up with multiple elements that had index of 0. This PR removesdangerouslyDisableWhitespaceCollapsing, but we actully need to disable whitespace collapsing, so we setwhite-space: prein global HTML renderer styles in order to achieve that.Fixed Issues
#8655
Tests
```
some code
```
```

some more code
```
2.1
Web: Open JS console, verify that there is no warning sayingWarning: Encountered two children with the same key, 02.2
Native platfroms: Launch the app, verify that there is no yellow box warning on the bottom of the screen that saysWarning: Encountered two children with the same key, 03.
All platforms: send the following message in any chatPR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followed/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
Screenshots
Web
cinnamon-20220516-4.mp4
Mobile Web
cinnamon-20220516-5.mp4
Desktop
I'm unable to launch the desktop app due to #8888. It is not present if you downgrade to certain node and npm versions, but since I use MacinCloud, I'm unable to do so. So if someone with a mac could test it and upload a video, I would highly appreciate it.
iOS
cinnamon-20220516-6.mp4
Android
22-05-16-17-34-38.mp4