-
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
Move Leave button into a row of the Report Details page #40979
Move Leave button into a row of the Report Details page #40979
Conversation
@DylanDylann Please 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] |
@DylanDylann The only thing is that I did not update the avatar size |
Reviewer Checklist
Screenshots/Videos |
src/pages/ReportDetailsPage.tsx
Outdated
@@ -312,6 +333,7 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD | |||
)} | |||
</View> | |||
</View> | |||
{(isGroupChat || isChatRoom) && <ChatDetailsQuickActionsBar report={report} />} |
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.
@ZhenjaHorbach Why we move the position of ChatDetailsQuickActionsBar
to above description
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.
Screen.Recording.2024-04-25.at.23.07.50.mov@ZhenjaHorbach Bug: The leave button still appears after user leave room |
Good catch) |
@ZhenjaHorbach Could you merge the latest main? |
Hello ) |
src/pages/ReportDetailsPage.tsx
Outdated
const isPrivateNotesFetchTriggered = report?.isLoadingPrivateNotes !== undefined; | ||
|
||
const isSelfDM = useMemo(() => ReportUtils.isSelfDM(report), [report]); | ||
const canJoinOrLeave = !isSelfDM && !isGroupChat && (isChatThread || isUserCreatedPolicyRoom || canLeaveRoom || canLeavePolicyExpenseChat); | ||
const canJoin = report.notificationPreference === CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN; |
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.
canJoinOrLeave
is only used once. I think we should remove this variable
src/pages/ReportDetailsPage.tsx
Outdated
@@ -194,21 +200,42 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD | |||
}); | |||
} | |||
|
|||
if (isGroupChat || (isChatRoom && canJoinOrLeave && !canJoin)) { |
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.
if (isGroupChat || (isChatRoom && canJoinOrLeave && !canJoin)) { | |
if (isGroupChat || (isChatRoom && canLeave)) { |
@DylanDylann |
@JmillsExpensify should we just be getting rid of this menu here, and make it so that the three dots just takes you to the details view? Or are we saving that for a different project? |
@ZhenjaHorbach About this point, I think it is out of scope here. But let's hear a thought from @marcaaron and @JmillsExpensify |
Maybe you're right ) |
Gonna defer to @shawnborton and @JmillsExpensify on this one. My understanding is that we want people to use the |
I think we're planning to make that change with Jason's Details revamp project though, right @JmillsExpensify ? Not sure if we should just wait or do it here. |
Still no update, I think we should revert the unrelated change to avoid blocking this PR |
I thought we are waiting for @JmillsExpensify decision ) |
@DylanDylann |
@marcaaron As for this comment, are we good to move forward? |
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
isAnonymousAction: true, | ||
action: () => Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS_SHARE_CODE.getRoute(report?.reportID ?? '')), | ||
}); | ||
} |
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.
Yeah so - in removing this for all chats we need to show the ChatDetailsQuickActionsBar
to more than just (isGroupChat || isChatRoom)
🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.71-6 🚀
|
Details
Move the "Share" row into the ChatDetailsQuickActionsBar
Move the "Leave" button out of this component and into it's own row here.
Fixed Issues
$ #40256
PROPOSAL: #40256 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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
Android: Native
android_w5JoDfzq.mp4
Android: mWeb Chrome
android_w5JoDfzq.mp4
iOS: Native
ios_C82AYGGZ.mp4
iOS: mWeb Safari
ios-web_D4Z5n1mS.mp4
MacOS: Chrome / Safari
web_YDYEn9BO.mp4
MacOS: Desktop
desktop_7RFrq62O.mp4