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

Updated placement of the user status icon #34795

Merged

Conversation

jayeshmangwani
Copy link
Contributor

@jayeshmangwani jayeshmangwani commented Jan 19, 2024

Details

Fixed Issues

$ #34380
PROPOSAL: #34380 (comment)

Tests

  1. Open App, Go to Settings > Profile > Status
  2. Select an emoji and Press Save
  3. Now go to the main chat app and observe the user icon and status placement
  4. Verify that it looks same as issue description
  • Verify that no errors appear in the JS console

Offline tests

Same as Tests

QA Steps

Same as Tests

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native Screenshot 2024-01-29 at 9 02 48 PM Screenshot 2024-01-29 at 9 03 14 PM
Android: mWeb Chrome Screenshot 2024-01-29 at 8 58 56 PM Screenshot 2024-01-29 at 8 59 15 PM
iOS: Native dark light
iOS: mWeb Safari dark light
MacOS: Chrome / Safari dark light
MacOS: Desktop dark web

@jayeshmangwani jayeshmangwani requested a review from a team as a code owner January 19, 2024 11:16
@melvin-bot melvin-bot bot requested review from mollfpr and removed request for a team January 19, 2024 11:16
Copy link

melvin-bot bot commented Jan 19, 2024

@mollfpr 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]

@jayeshmangwani
Copy link
Contributor Author

@mollfpr Below I am attaching the screenshots for these styling

  1. User profile picture height and width is 40px and 2px margins around, total height and width is 44 and backgrounnd color is componentBG(color is same as before)
  2. Height and width of the status container is 30 and background color is componentBG(color is same as before) too
  3. Font size of the emoji is 22 (font size is same as before)
  4. position of the emoji container is -7 from bottom and right

cc: @shawnborton @dannymcclain @dubielzyk-expensify

iOS: Native

Dark
Simulator Screenshot - iPhone SE (3rd generation) - 2024-01-19 at 14 41 41

Light
Simulator Screenshot - iPhone SE (3rd generation) - 2024-01-19 at 14 41 54

mWeb: Safari

Dark
Simulator Screenshot - iPhone SE (3rd generation) - 2024-01-19 at 14 41 27

Light

Simulator Screenshot - iPhone SE (3rd generation) - 2024-01-19 at 14 41 09

Desktop

Dark
Screenshot 2024-01-19 at 2 42 07 PM

Light
Screenshot 2024-01-19 at 2 42 21 PM

web: chrome

Dark
Screenshot 2024-01-19 at 2 42 30 PM

Light
Screenshot 2024-01-19 at 2 42 46 PM

@jayeshmangwani jayeshmangwani changed the title Updated placement of the user icon Updated placement of the user status icon Jan 19, 2024
@shawnborton
Copy link
Contributor

Hmm this doesn't quite seem to line up with the mockup I remember seeing. @dubielzyk-expensify or @dannymcclain can you provide some more direction on the specifics here?

@dubielzyk-expensify
Copy link
Contributor

Great progress, but a few measurements are off. Here's the detailed specs:
CleanShot 2024-01-22 at 10 23 54@2x

CleanShot 2024-01-22 at 10 24 19@2x

Also worth noting that on desktop the header background is different to on mobile which is why the border of the status circle need to change:
CleanShot 2024-01-22 at 10 25 13@2x

Hope that helps. Let me know when you got an update and I'll do another review 😄

@shawnborton
Copy link
Contributor

Also worth noting that on desktop the header background is different

Oh interesting, I did not realize that was the case. That seems like a bit of a bug... but regardless, all of this is changing with the new #ideal-nav restructuring, so I think we only need to worry about the darker appBG color being used here

@jayeshmangwani
Copy link
Contributor Author

jayeshmangwani commented Jan 23, 2024

Below I am attaching a screenshots for the ios, web and desktop, please have a look and give your feedback.

For the user status icon view, height and width of the background is 16px and background color is theme.border and border width is 2px and border color is same as background color of the page/header (theme.highlightBG), and emoji is text and in the screenshots fontsize is 9 for the emojis, if we are using greater then this fontsize then emoji is overlapping with the border

Also worth noting that on desktop the header background is different to on mobile which is why the border of the status circle need to change:

Right now desktop and all the other platform has same header background color (highlightBG), so not sure if we have to do anything extra for the desktop here
@shawnborton @dubielzyk-expensify

iOS

iOS-dark

iOS-light

web web-dark web-light
desktop desktop-dark desktop-light

@shawnborton
Copy link
Contributor

so not sure if we have to do anything extra for the desktop here

Sounds good. Just noting though that when we merge this into the new #ideal-nav branch, we'll need to change the status icon area border color from highlightBG to just our standard appBG.

@shawnborton
Copy link
Contributor

In your screenshots, things still appear to be off. I think they are too small because the width of that area is taking into account the border size. So if we want the ellipse area to be 16px with a 2px outer stroke, we might need to make that area at say 20x20? So we get 16px + 2px stroke + 2px stroke.

@jayeshmangwani
Copy link
Contributor Author

So if we want the ellipse area to be 16px with a 2px outer stroke, we might need to make that area at say 20x20? So we get 16px + 2px stroke + 2px stroke.

Screenshot 2024-01-23 at 1 26 38 PM

@shawnborton in this screenshot we have used 20px height width of the main view and 2px stroke and 12px for the emoji

@shawnborton
Copy link
Contributor

Nice, that seems better but let's see what @dubielzyk-expensify thinks

Also, is it just me, or is there a dark border around the user icon that shouldn't be there?
CleanShot 2024-01-23 at 09 30 30@2x

@jayeshmangwani
Copy link
Contributor Author

jayeshmangwani commented Jan 23, 2024

Nice, that seems better but let's see what @dubielzyk-expensify thinks

Lets wait for @dubielzyk-expensify feedback

Also, is it just me, or is there a dark border around the user icon that shouldn't be there?

It is added intentionally in code, background dimensions is 44 * 44 and avatar’s dimensions is 40 * 40, if we don’t want the outer stroke then we can set background dimensions to 40*40

@shawnborton
Copy link
Contributor

yeah, I don't know that we want that outer stroke there anymore.

@jayeshmangwani
Copy link
Contributor Author

then we can remove outer stroke it in this PR

@dubielzyk-expensify
Copy link
Contributor

Great work @jayeshmangwani . Like Shawn said, let's remove the outer border on the profile picture

It looks like some emoji's overstep the barrier of the circle:
CleanShot 2024-01-24 at 16 27 50@2x

Can we get a few screenshots with different emojis that are bigger? I think we might have to shrink it down ever so slightly

@jayeshmangwani
Copy link
Contributor Author

@dubielzyk-expensify Thanks for the review, I checked few emojis and it looks like that some large emojis goes a slight outside the view and overlap the stroke, in the attached images last one looks like that it goes outside the view, either we can hide the overflowed part or we can reduce emoji size.

In the below attached images, we have removed outer border of the profile picture

Screenshot 2024-01-24 at 1 16 59 PM Screenshot 2024-01-24 at 1 17 17 PM Screenshot 2024-01-24 at 1 17 44 PM Screenshot 2024-01-24 at 1 18 05 PM

@shawnborton
Copy link
Contributor

Hmm is it just me or does it feel like the ellipsis/background circle for the emoji is too small in those screenshots again?

@jayeshmangwani
Copy link
Contributor Author

@shawnborton Yes you are right, above screenshot is of the 16*16 total dimensions, sorry I had overwritten the changes, I am attaching the new screenshots please check that, in these screenshots I have used 2px stroke and 16px background and 9px font size.
Screenshot 2024-01-24 at 2 24 57 PM
Screenshot 2024-01-24 at 2 25 38 PM
t
Screenshot 2024-01-24 at 2 26 06 PM

@shawnborton
Copy link
Contributor

Cool, it might not be pulled down and to the right enough, but the sizing feels better. Will let Jon chime in with specifics though :)

@jayeshmangwani
Copy link
Contributor Author

Thanks for the review, some emojis alignment is off because we are using the text for showing the emojis and some emojis has default spacing

@shawnborton
Copy link
Contributor

I meant the entire circle area might need to be down and to the right some more, not the emoji inside of it.

@jayeshmangwani
Copy link
Contributor Author

ohh gotcha, in the attached screenshots its -2px from bottom and right

@dubielzyk-expensify
Copy link
Contributor

It should be -2px from the bottom and right to be consistent with the workspace changer we'll ship soon. Currently it doesn't look like it's positioned like that though. Is the border messing with the sizing and positioning here?

On the left is my mock and right is the screenshot:
CleanShot 2024-01-25 at 11 22 16@2x

Looks like size and font-size is correct but positioning is off

@jayeshmangwani
Copy link
Contributor Author

Thanks for the review Jon, in this attached screenshot we have used -4 from the right and bottom (2px stroke + 2px position from bottom and right), please confirm if this looks correct
Screenshot 2024-01-25 at 1 12 45 PM

@dubielzyk-expensify
Copy link
Contributor

That looks right to me. Thanks for the polish @jayeshmangwani !

@mollfpr
Copy link
Contributor

mollfpr commented Jan 29, 2024

@jayeshmangwani Let me know when it's ready to review!

@jayeshmangwani
Copy link
Contributor Author

@mollfpr PR is now ready for review

@mollfpr
Copy link
Contributor

mollfpr commented Jan 29, 2024

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
34795.Android.mp4
Android: mWeb Chrome
34795.mWeb-Chrome.mp4
iOS: Native
34795.iOS.mov
iOS: mWeb Safari
34795.mWeb-Safari.mov
MacOS: Chrome / Safari
34795.Web.mp4
MacOS: Desktop
34795.Desktop.mp4

@melvin-bot melvin-bot bot requested a review from johnmlee101 January 29, 2024 16:47
@johnmlee101
Copy link
Contributor

@shawnborton @dubielzyk-expensify just checking that this is fine to have both GBR and the status?
image

@shawnborton
Copy link
Contributor

just checking that this is fine to have both GBR and the status?

Nice find! But I do think that this is okay.

Copy link
Contributor

@johnmlee101 johnmlee101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@johnmlee101 johnmlee101 merged commit 31a7a3b into Expensify:main Jan 29, 2024
16 checks passed
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by https://github.com/johnmlee101 in version: 1.4.33-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 cancelled 🔪
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/francoisl in version: 1.4.33-5 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 failure ❌
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants