Skip to content
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

[HOLD for payment 2024-08-02] [$250] Name of the Expensify user is not centered in the profile detail view #45346

Closed
1 of 6 tasks
m-natarajan opened this issue Jul 12, 2024 · 25 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Jul 12, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.6-2
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1720777243552389

Action Performed:

  1. Open Expensify chat report
  2. Click on the header to see the details

Expected Result:

"Expensify" name should be centered like "Chronos"

Actual Result:

The name for the Expensify user is not centered in the details view

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

CleanShot 2024-07-12 at 11 40 50@2x
CleanShot 2024-07-12 at 11 40 07@2x
Snip - (56) New Expensify - Google Chrome

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d58bde936bd4c0a6
  • Upwork Job ID: 1812986703312855628
  • Last Price Increase: 2024-07-15
  • Automatic offers:
    • nkdengineer | Contributor | 103218448
Issue OwnerCurrent Issue Owner: @strepanier03
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 12, 2024
Copy link

melvin-bot bot commented Jul 12, 2024

Triggered auto assignment to @strepanier03 (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@Krishna2323
Copy link
Contributor

Krishna2323 commented Jul 12, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Name of the Expensify user is not centered in the profile detail view

What is the root cause of that problem?

The text is not centered when isSystemChat is true.

const nameSectionGroupWorkspace = (
<OfflineWithFeedback
pendingAction={report?.pendingFields?.reportName}
errors={report?.errorFields?.reportName}
errorRowStyles={[styles.ph5]}
onClose={() => Report.clearPolicyRoomNameErrors(report?.reportID)}
>
<View style={[styles.flex1, !shouldDisableRename && styles.mt3]}>
<MenuItemWithTopDescription
shouldShowRightIcon={!shouldDisableRename}
interactive={!shouldDisableRename}
title={reportName}
titleStyle={styles.newKansasLarge}
shouldCheckActionAllowedOnPress={false}
description={!shouldDisableRename ? roomDescription : ''}
furtherDetails={chatRoomSubtitle && !isGroupChat ? additionalRoomDetails : ''}
onPress={() => Navigation.navigate(ROUTES.REPORT_SETTINGS_NAME.getRoute(report.reportID))}
/>
</View>
</OfflineWithFeedback>

What changes do you think we should make in order to solve the problem?

We should check for isSystemChat and add marginHorizontal: auto to titleStyle prop if it is true.

What alternative solutions did you explore? (Optional)

We can add flex:1 and textAlign: center if isSystemChat is true. We should also check for other similar cases.

@Tony-MK
Copy link
Contributor

Tony-MK commented Jul 12, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

What is the root cause of that problem?

When the header of the report is clicked the app navigates to the report details page through the navigateToDetailsPage function.

Instead of the profile page since the CONST.ACCOUNT_ID.NOTIFICATIONS account id is part of the CONST.RESTRICTED_ACCOUNT_IDS in the profile page.

const shouldShowBlockingView = (!isValidAccountID && !isLoading) || CONST.RESTRICTED_ACCOUNT_IDS.includes(accountID);

The report detail page does not align the title to the center while the profile page does.

const nameSectionGroupWorkspace = (
<OfflineWithFeedback
pendingAction={report?.pendingFields?.reportName}
errors={report?.errorFields?.reportName}
errorRowStyles={[styles.ph5]}
onClose={() => Report.clearPolicyRoomNameErrors(report?.reportID)}
>
<View style={[styles.flex1, !shouldDisableRename && styles.mt3]}>

What changes do you think we should make in order to solve the problem?

We should include the styles.alignItemsCenter for the nameSectionGroupWorkspace with the condition that the account id is the main participant to be displayed and is CONST.ACCOUNT_ID.NOTIFICATIONS or chat is a system chat, isSystemChat.

<View style={[styles.flex1, !shouldDisableRename && styles.mt3]}>

We could change the line of code above with the one below for the isSystemChat solution option.

 <View style={[styles.flex1, !shouldDisableRename && styles.mt3, isSystemChat && styles.alignItemsCenter]}>

What alternative solutions did you explore? (Optional)

Create a different section like nameSectionGroupWorkspace and nameSectionTitleField to align the titles to the center for chats with the CONST.ACCOUNT_ID.NOTIFICATIONS account id, unlike other reports where it is aligned to the left.

Centered Result

@nkdengineer
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

What is the root cause of that problem?

In ReportDetailPage, the report name is not aligned

<MenuItemWithTopDescription
shouldShowRightIcon={!shouldDisableRename}
interactive={!shouldDisableRename}
title={reportName}
titleStyle={styles.newKansasLarge}
shouldCheckActionAllowedOnPress={false}
description={!shouldDisableRename ? roomDescription : ''}

What changes do you think we should make in order to solve the problem?

This bug happens for all reports that are not DM and the report name can not be edited.
If the report name cannot be edited we should add titleContainerStyle prop with style styles.alignItemsCenter to MenuItemWithTopDescription. This change will also work when the report has the description.

titleContainerStyle={shouldDisableRename && styles.alignItemsCenter}

<MenuItemWithTopDescription
shouldShowRightIcon={!shouldDisableRename}
interactive={!shouldDisableRename}
title={reportName}
titleStyle={styles.newKansasLarge}
shouldCheckActionAllowedOnPress={false}
description={!shouldDisableRename ? roomDescription : ''}

And add style styles.mw100 here to avoid the title overflowing.

<View style={[styles.flexRow, styles.alignItemsCenter]}>

What alternative solutions did you explore? (Optional)

NA

Screen.Recording.2024-07-15.at.14.36.14.mov

Result

@melvin-bot melvin-bot bot added the Overdue label Jul 15, 2024
Copy link

melvin-bot bot commented Jul 15, 2024

@strepanier03 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@strepanier03 strepanier03 added the External Added to denote the issue can be worked on by a contributor label Jul 15, 2024
Copy link

melvin-bot bot commented Jul 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01d58bde936bd4c0a6

@melvin-bot melvin-bot bot changed the title Name of the Expensify user is not centered in the profile detail view [$250] Name of the Expensify user is not centered in the profile detail view Jul 15, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 15, 2024
Copy link

melvin-bot bot commented Jul 15, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

Copy link

melvin-bot bot commented Jul 19, 2024

@strepanier03, @fedirjh Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Jul 19, 2024
@fedirjh
Copy link
Contributor

fedirjh commented Jul 22, 2024

Thanks everyone for the proposal. I think @nkdengineer has the correct solution. Center alignment should be applied to all report names that are not editable.

@melvin-bot melvin-bot bot removed the Overdue label Jul 22, 2024
@fedirjh
Copy link
Contributor

fedirjh commented Jul 22, 2024

@nkdengineer's proposal looks good to me.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 22, 2024

Triggered auto assignment to @blimpich, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@Krishna2323
Copy link
Contributor

@fedirjh thanks for the review but can we please confirm the expected behaviour here? I don't think we need to centre all the report names that are not editable. Using shouldDisableRename will centre thread report, public room, expense report and few others as well. @shawnborton can you please confirm?

App/src/libs/ReportUtils.ts

Lines 6229 to 6238 in e3ebeff

isDefaultRoom(report) ||
isArchivedRoom(report, getReportNameValuePairs(report?.reportID)) ||
isPublicRoom(report) ||
isThread(report) ||
isMoneyRequest(report) ||
isMoneyRequestReport(report) ||
isPolicyExpenseChat(report) ||
isInvoiceRoom(report) ||
isInvoiceReport(report) ||
isSystemChat(report)

@nkdengineer
Copy link
Contributor

Just a note here. For the expense report, we will render it in another section. For other cases like thread, admin room, and public room, ... it displays the same as system chat and I think there is no reason that we do not centralize these report names if we center the system chat name.

Screenshot 2024-07-22 at 16 54 18

@fedirjh
Copy link
Contributor

fedirjh commented Jul 22, 2024

Using shouldDisableRename will centre thread report, public room, expense report and few others as well

@Krishna2323 I think that's the expected behaviour. Following the mockups shared in this issue #44149 you can see that non-editable expenses titles are centered

image

@Krishna2323
Copy link
Contributor

@fedirjh, thanks for the confirmation, I was not sure because expected result states "Expensify" name should be centered like "Chronos" and both are system chats.

@shawnborton
Copy link
Contributor

Yeah, just chiming in to say that if the room name is not editable, we should be centering it in all cases. CC @Expensify/design for the gut check there

@dannymcclain
Copy link
Contributor

Agree—that's what we had previously talked about and decided.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 Weekly KSv2 labels Jul 23, 2024
@melvin-bot melvin-bot bot changed the title [$250] Name of the Expensify user is not centered in the profile detail view [HOLD for payment 2024-08-02] [$250] Name of the Expensify user is not centered in the profile detail view Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.12-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-02. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jul 26, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@fedirjh] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@fedirjh
Copy link
Contributor

fedirjh commented Aug 2, 2024

BugZero Checklist:

Regression Test Proposal

1. Open the Expensify chat report or any other, where the report title cannot be edited.
2. Click on the header of the report to see the details.
3. Observe the report title and ensure it is centered on the page.
  • Do we agree 👍 or 👎

Copy link
Contributor

github-actions bot commented Aug 2, 2024

true

@strepanier03
Copy link
Contributor

strepanier03 commented Aug 2, 2024

Payment Summary

@JmillsExpensify payment request incoming.

@JmillsExpensify
Copy link

$250 approved for @fedirjh. Going to close this once since regression issue is added and all payments approved. @fedirjh Please submit an expense in New Expensify when you get a chance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

10 participants