Hide agent timezone from profile page and composer - #91347
Conversation
Add isAgentEmail checks to hide local time display when viewing an agent's profile page and in the composer area of agent DMs. Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
|
🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
This comment has been minimized.
This comment has been minimized.
|
@ShridharGoel 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] |
|
@MelvinBot add tests to increase coverage |
Add unit tests to verify that ComposerLocalTime hides the local time display for agent accounts (agent_*@expensify.ai) while still showing it for regular participants. Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
|
@NicolasBonet 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] |
|
Added tests for
Both tests pass locally. The |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariIn the issue description |
- Use for…of instead of .forEach() (unicorn/no-array-for-each) - Use getByText instead of queryByText for presence assertion (testing-library/prefer-presence-queries) Co-authored-by: Nicolás Bonet <NicolasBonet@users.noreply.github.com>
|
Fixed the failing ESLint check: replaced |
|
🚧 @NicolasBonet has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/NicolasBonet in version: 9.3.80-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes required. I reviewed the PR changes and searched all help site articles under |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.81-2 🚀
|
Explanation of Change
Agent accounts (
agent_*@expensify.ai) currently show their local time in two places: on the agent's profile page and above the composer in agent DMs. This PR hides the local time display for agent accounts by addingisAgentEmailchecks in both locations.!isAgentEmail(login)to theshouldShowLocalTimeconditionisAgentEmail(reportRecipient?.login)early return checkFixed Issues
$ #91346
PROPOSAL: #91346 (comment)
Tests
Offline tests
N/A — This change only affects UI visibility logic and has no offline implications.
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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./** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari