fix: selecting multiple messages doesn't work as expected#82507
fix: selecting multiple messages doesn't work as expected#82507NJ-2020 wants to merge 14 commits intoExpensify:mainfrom
Conversation
|
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2149a8f032
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
patches/react-native-web/react-native-web+0.21.2+013+fix-selection-bug.patch
Show resolved
Hide resolved
JmillsExpensify
left a comment
There was a problem hiding this comment.
No concerns from product.
|
I am still exploring good working solution |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
eh2077
left a comment
There was a problem hiding this comment.
initial review looks good overall, next I'll look into the patch and do tests at the meanwhile.
|
Same here, I am still investigating... |
|
Review is ongoing |
|
will update tmr |
|
Update: I tried fixing
|
|
Sorry for the delay Update: I've tried also adding |
|
Done fixed RCA:This code, we're using _this._indicesToKeys.set(ii, key);
if (stickyIndicesFromProps.has(ii + stickyOffset)) {
this.pushOrUnshift(stickyHeaderIndices, cells.length);Example: cells = []
stickyHeaderIndices = []
// push `A` to cells as [sticky] element
stickyHeaderIndices.unshift(cells.length) // cells.length = [0] >> so record item `A` as index 0 in the arrays
cells.unshift('A') // because props.inverted are true
// push another item `B` as non sticky element
stickyHeaderIndices.unshift(cells.length) // skip
cells.unshift('B')⬇️ cells = ['B', 'A']
stickyHeaderIndices = [0]Wrong here!, it records Solution:Reverse if (this.props.inverted && stickyHeaderIndices.length > 0) {
var totalCells = cells.length;
stickyHeaderIndices = stickyHeaderIndices.map(function(recordedIndex) {
/**
* cells.length = 2, and then minus 1 (because we're calculating for index value)
* and minus at the current index sticky header (which is listed above ^^ [0]), so the math is: 2 - 1 - 0
* So now `stickyHeaderIndices` will become >> = [1] which is correct index for `cells`
*/
return totalCells - 1 - recordedIndex;
});
}
// 4. Render the ScrollView
var scrollProps = _objectSpread(_objectSpread({}, this.props), {}, {
...Another bug I also found while applying this solution, where only the last item are sticky & other elements are not-sticky, after digging, it's because of how HTML works, where the last element will always placed over by other element, since we're reversing the DOM items (using unshift) the last view item is also placed at the last list item in the DOM tree, but in normal And also since all items (sticky-mode) has the same z-index (10), other elements will be placed over by the last element causing to not showing I fixed this (inside ScrollView/index.js) by changing the value of cc: @eh2077 |
|
@NJ-2020 Thanks for the fix! I'll look into it. |
|
@NJ-2020 It doesn't work.
Screen.Recording.2026-03-10.at.10.16.02.PM.mov |
|
@eh2077 Have you tried running Chrome: Screen.Recording.2026-03-10.at.21.57.03.movSafari: Screen.Recording.2026-03-10.at.21.58.40.mov |
|
Oh yeah, then it works! Maybe it's unrelated but I'm curious why timestamp is selected but the user name. Screen.Recording.2026-03-10.at.11.04.18.PM.mov |
Explanation of Change
accessibilityRole={CONST.ROLE.BUTTON}when not on web platform, more details: Fix: Remove accessible={false} blocking Appium automation #78527 (comment)More details regarding the RCA can be seen here
Fixed Issues
$ #37447
PROPOSAL: #37447 (comment)
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Video
MacOS: Chrome / Safari
Screen.Recording.2026-02-27.at.23.57.34.mov