Repository navigation
[TS migration] Migrate AttachmentCarousel to typescript - #36658
puneetlath merged 36 commits into
Conversation
| isSingleItem={items.length === 1} | ||
| index={index} |
There was a problem hiding this comment.
why those props were removed?
There was a problem hiding this comment.
It's no longer used by CarouselItem, probably smb forgot to remove this.
|
@SzymczakJ We have a failing performance test. Can you please merge |
|
@s77rt had to merge it twice but it passed 😄 |
|
@SzymczakJ Thank you! |
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25152 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
puneetlath
left a comment
There was a problem hiding this comment.
Just some minor comments/questions.
| import type {FileObject} from '@components/AttachmentModal'; | ||
| import type IconAsset from '@src/types/utils/IconAsset'; | ||
|
|
||
| // This can be either a string, function, or number |
There was a problem hiding this comment.
This comment doesn't really add any value. The line below makes that clear. If we think this is an interesting or important point, it'd be good to add "why".
|
@puneetlath fixed your comments! |
|
@puneetlath looks like this was merged without a test passing. Please add a note explaining why this was done and remove the |
|
All the tests did pass. |
| const {isAttachmentHidden} = useContext(ReportAttachmentsContext); | ||
| // eslint-disable-next-line es/no-nullish-coalescing-operators | ||
| const [isHidden, setIsHidden] = useState(() => isAttachmentHidden(item.reportActionID) ?? item.hasBeenFlagged); | ||
| const [isHidden, setIsHidden] = useState(() => (item.reportActionID ? isAttachmentHidden(item.reportActionID) : item.hasBeenFlagged)); |
There was a problem hiding this comment.
This change has caused a regression in #58912, we should fall back to item.hasBeenFlagged whenever isAttachmentHidden is undefined.
Details
Fixed Issues
$ #25152
PROPOSAL: N/A
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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/Videos
Android: Native
android.mov
Android: mWeb Chrome
android.web.mov
iOS: Native
ios.mov
iOS: mWeb Safari
iosweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov