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

[Update Account Settings] Header: icons, height, and font changes #35564

Conversation

kosmydel
Copy link
Contributor

@kosmydel kosmydel commented Feb 1, 2024

Details

This pull request adds icons to the HeaderWithBackButton component and uses it to add icons to screens in the Account Settings menu. It also adjusts header heights with new designs and applies new fonts.

Fixed Issues

$ #35609
$ #35571
$ #35632
PROPOSAL: N/A

Tests

  • Verify that no errors appear in the JS console
  • Go to the Account Settings.
  • Verify icons in the central pane header on screens:
    • Profile
    • Wallet
    • Share code
    • Preferences
    • Security
    • General
    • About
  • Verify header heights:
    • All headers should have 73px height except for ones in the Account Settings page.

Offline tests

Turn off network, verify the icons work.

QA Steps

  • Verify that no errors appear in the JS console
  • Do the tests from above.

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-02-02 at 14 03 01

Before font & height changes:
https://github.com/Expensify/App/assets/104823336/cb156757-4de1-4bc0-89bb-00e0ab28fa7a

Android: mWeb Chrome Screenshot 2024-02-02 at 14 02 16

Before font & height changes:
https://github.com/Expensify/App/assets/104823336/a8ba84df-743b-491d-8eed-b376a9486605

iOS: Native

simulator_screenshot_53D7409A-2AC4-4A41-9F5B-87696B75C86F

Before font & height changes:
https://github.com/Expensify/App/assets/104823336/1377c268-f3dd-4294-8090-aa60905c4dfd

iOS: mWeb Safari

simulator_screenshot_DB63CC27-288A-4D82-A146-05318CFA1A40

Before font & height changes:
https://github.com/Expensify/App/assets/104823336/8ec29a34-b4bb-471a-82bd-ca4da0aeab26

MacOS: Chrome / Safari

Screenshot 2024-02-02 at 13 18 18

Before font & height changes:
https://github.com/Expensify/App/assets/104823336/a20a6ae9-aa5e-4700-b6a1-eb93d711f5ee

MacOS: Desktop

Before font & height changes:
https://github.com/Expensify/App/assets/104823336/9f750591-467a-41c7-938f-e39c2da318c0

@kosmydel kosmydel marked this pull request as ready for review February 2, 2024 11:27
@kosmydel kosmydel requested a review from a team as a code owner February 2, 2024 11:27
@melvin-bot melvin-bot bot requested review from shubham1206agra and removed request for a team February 2, 2024 11:27
Copy link

melvin-bot bot commented Feb 2, 2024

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

@shubham1206agra
Copy link
Contributor

@mountiny Can you trigger an adhoc build to check the icons on physical devices?

@kosmydel kosmydel marked this pull request as draft February 2, 2024 12:12
@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 2, 2024

Converting to draft, as I will solve this issue in this PR as well. Going to reopen it in a moment.

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 2, 2024

The PR is ready for review.

We are waiting for confirmation if the 80px increased height should also be applied to the small screen or not. If yes, we just have to revert the last commit. So please keep this in mind when reviewing.

Got confirmation: 80px is always applied when there is an icon, no matter if it is mobile or desktop.

@kosmydel kosmydel marked this pull request as ready for review February 2, 2024 12:49
@kosmydel kosmydel changed the title [Update Account Settings] Header icons [Update Account Settings] Header: icons, height, and font changes Feb 2, 2024
@shawnborton
Copy link
Contributor

Happy to help test this one too if we have more screenshots.

As you saw from my comment, my thinking is that:

  • Any time a page header has an icon + h2 font style, it's always 80px, regardless of mobile or desktop
  • If the page header does not have that fancy style (like page headers for the RHP, etc) we just use the style we previously had before the #ideal-nav changes

One thing that I am unsure of is what to do for page headers for chats on desktop. I think our mockups had it so that on desktop, the chat header was 80px to match the height of the new switcher on the left. It looks something like this:
CleanShot 2024-02-02 at 08 32 29@2x

This is so that we get a nice alignment going from the left nav area to the main content pane. However, I can see an argument that on mobile, we don't need the chat header to be a bit taller since you don't see the chat header next to the LHN - they are separate pages. So perhaps we only need to modify the chat header height on desktop? Thoughts on that @Expensify/design ?

@dannymcclain
Copy link
Contributor

@shawnborton oh boy alright, this is starting to get a little messy.

I think we need to SIMPLIFY all these padding and spacing values to make this a touch less headache inducing.

Here's what I'm measuring in the Figma comps:
image

Here's what I think we should do:
image

I agree that we should adjust the chat headers on desktop so that they're 80px. If we simply the padding values (as in my proposal) this will mean that all the avatars sit perfectly in line, 20px off the top of the viewport.

Let me know if this doesn't make any sense or if you'd like to take the convo to Slack. I just think we need to streamline as many of these values as we can so that it's easier to keep track of what's "right".

@shawnborton
Copy link
Contributor

Super super down with that! I agree that it's a nice simplification.

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 2, 2024

If we reach a consensus, please update the Figma designs, and post an update with changes, so I can update the PR.

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 5, 2024

Hey, can I ask for the final summary of the decisions? As in this thread, we are talking about 80px on desktop, while in this issue we've decided to 72px. I'm a bit confused.

  • What should be the central pane header height (mobile/desktop)?
  • What should all other heights (mobile/desktop) be?

cc @shawnborton @dannymcclain

@dannymcclain
Copy link
Contributor

The profile Illustration looks oddly misaligned slightly. Can you please check the SVG to align it maybe?

@shubham1206agra can you explain a bit more? If you're referring to what I'm showing in my screenshots here, it is to be expected and I don't think it's an issue. It stems from all our illustrations using a fixed size of 48x48px and having to optically resize each illustration inside those bounds to make them visually feel about the same size.

You'll notice a similar thing happening with the lock illustration on the security page because that illustration is much taller than it is wide.

If you're talking about something else—please let me know!

CleanShot 2024-02-06 at 09 53 04@2x

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 6, 2024

The Profile icon is not aligned vertically on Figma. It might be this.

Screenshot 2024-02-06 at 16 46 17

@shubham1206agra
Copy link
Contributor

The Profile icon is not aligned vertically on Figma. It might be this.

Screenshot 2024-02-06 at 16 46 17

Yes. I am talking about this only.

@shubham1206agra
Copy link
Contributor

See alignment with back button
image

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 6, 2024

I can align it in InkScape, but it would be better to fix it on Figma as well.
Wrapping paths in a group and applying this transform fixes it: <g id="g4" transform="translate(-1e-4,1.41179)">

@shawnborton
Copy link
Contributor

Can you inspect and show us how the views are all lining up? As long as everything is vertically centered, I think we're fine. I don't think we need to modify the svgs...

@dannymcclain
Copy link
Contributor

Ahh gotcha! Thanks for pointing that out. I just updated it in Figma but I'll attach the SVG here as well.
simple-illustration__profile.svg.zip

@shawnborton We did actually need to edit the SVG—it was not quite right and I think this is better now.

@shawnborton
Copy link
Contributor

Can you show me a before/after? I'm not disagreeing, but I don't think I am seeing it so just want to make sure I can spot the misalignment.

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 6, 2024

Before:
Screenshot 2024-02-06 at 17 06 36

After:
Screenshot 2024-02-06 at 17 06 09

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 6, 2024

Ahh gotcha! Thanks for pointing that out. I just updated it in Figma but I'll attach the SVG here as well. simple-illustration__profile.svg.zip

@shawnborton We did actually need to edit the SVG—it was not quite right and I think this is better now.

I've downloaded it from Figma, as it was updated (I guess)?

@dannymcclain
Copy link
Contributor

Can you show me a before/after? I'm not disagreeing, but I don't think I am seeing it so just want to make sure I can spot the misalignment.

It's weird because basically that "user" shape was using a lot of sub-pixel values so it couldn't sit in the center properly. I tweaked the sizing of it a bit so it could sit on the pixel grid a bit better—but the change from before and after is going to be pretty subtle.

I've downloaded it from Figma, as it was updated (I guess)?

Haha yes, I believe you grabbed it after I updated it there.

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 6, 2024

Cc @shubham1206agra ready!

@shubham1206agra
Copy link
Contributor

Looks fine to me now. I will post the checklist in the morning.

@shubham1206agra
Copy link
Contributor

shubham1206agra commented Feb 7, 2024

Screenshot 2024-02-07 at 8 25 14 PM

@shawnborton Can you confirm the height here?

@shawnborton
Copy link
Contributor

shawnborton commented Feb 7, 2024

I think all of those are going to be changed with the upcoming account settings and simplified collect project. I think @kosmydel might be able to confirm that.

@shubham1206agra
Copy link
Contributor

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 Image
Android: mWeb Chrome Screenshot 2024-02-07 at 8 32 35 PM
iOS: Native Screenshot 2024-02-07 at 8 41 17 PM
iOS: mWeb Safari Screenshot 2024-02-07 at 8 30 01 PM
MacOS: Chrome / Safari Screenshot 2024-02-07 at 8 27 45 PM
MacOS: Desktop Screenshot 2024-02-07 at 8 35 08 PM

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 7, 2024

I think all of those are going to be changed with the upcoming account settings and simplified collect project. I think @kosmydel might be able to confirm that.

I haven't changed the Workspace Settings at all, as there are no illustrations. This is probably a part of future project.

Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, lets update the name variable in a follow up

@@ -50,6 +52,9 @@ import MoneyBadge from '@assets/images/simple-illustrations/simple-illustration_
import MoneyIntoWallet from '@assets/images/simple-illustrations/simple-illustration__moneyintowallet.svg';
import MoneyWings from '@assets/images/simple-illustrations/simple-illustration__moneywings.svg';
import OpenSafe from '@assets/images/simple-illustrations/simple-illustration__opensafe.svg';
import PalmTree from '@assets/images/simple-illustrations/simple-illustration__palmtree.svg';
import Profile from '@assets/images/simple-illustrations/simple-illustration__profile.svg';
import QrCode from '@assets/images/simple-illustrations/simple-illustration__qr-code.svg';
Copy link
Contributor

Choose a reason for hiding this comment

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

Naming styling, can be fixed in a follow up

Suggested change
import QrCode from '@assets/images/simple-illustrations/simple-illustration__qr-code.svg';
import QRCode from '@assets/images/simple-illustrations/simple-illustration__qr-code.svg';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Going to rename it here.

@mountiny mountiny merged commit a839310 into Expensify:main Feb 7, 2024
17 checks passed
@OSBotify
Copy link
Contributor

OSBotify commented Feb 7, 2024

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

@kosmydel
Copy link
Contributor Author

kosmydel commented Feb 8, 2024

There is one regression comming from this PR: missing background color of illustration in workspace empty state.

It's going to be fixed in this PR.

simulator_screenshot_F3A32940-09BD-466C-B7D6-85CC5B3C18E1

cc @mountiny, @shubham1206agra

@OSBotify
Copy link
Contributor

OSBotify commented Feb 8, 2024

🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.39-0 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.39-8 🚀

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

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

Successfully merging this pull request may close these issues.

8 participants