-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor ReportActionItem
to use hooks
#16635
Conversation
@0xmiroslav @marcaaron One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@0xmiroslav this one requires an Expensify account to test so I took you off the review. |
Looks good so far! Let's merge |
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. I just had one small question, but not sure if it's a blocker.
} | ||
function ReportActionItem(props) { | ||
const [isContextMenuActive, setIsContextMenuActive] = useState(ReportActionContextMenu.isActiveReportAction(props.action.reportActionID)); | ||
const previousDraftMessageRef = useRef(''); |
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.
Does this component ever do an initial render with a value for draftMessage
? If so, maybe this should be initialized with props.draftMessage
?
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.
ooo that's a good point, I think it actually does now that I think of it since the edit message input can be open right when this component is mounted, updating.
Why does this require an Expensify account to test? We could add people to the beta if there's some feature they are unable to access? |
I raised similar request on slack
|
ReportActionItem
to use hooksReportActionItem
to use hooks
EDIT: updated testing steps |
@0xmiroslav I've updated the testing steps to remove anything that requires internal access. Reassigning ya! |
…eady-opened-carousel Fix: Don't add new content an already opened carousel
…-in-the-chat-input-field Fix: Auto focus on mWeb when open report with enough chat history
Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com>
Co-authored-by: Aimane Chnaif <96077027+aimane-chnaif@users.noreply.github.com>
Use goBack so that the `<` works for threads and other chats
Prevent duplicate requests on network failure
Reupgrade react-native-image-manipulator package to allow Android GIF avatars
Fix keyboard flicker and input overlap in SignInPage
Reset the min supported iOS version to 13
…4543-B68F-E80CA9182564 Update version to 1.3.13-1 on main
Add betas settings for threads
Fix - On increasing the screen size the user can see the previous image in the list #17760
I had some weird git issues where |
No idea what happened.. opened up a new PR here, closing this out |
ah too bad you could have got 250 commit points for this one haha 😂 |
Details
Fixed Issues
$ #16264
Tests/QA Steps
[If testing locally perform these using the web proxy]
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
web.mov
Mobile Web - Chrome
mweb-chrome.mov
Mobile Web - Safari
mweb-safari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mov