Skip to content

Conversation

@roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Feb 23, 2023

Details

Implements new layouts for settings pages, and implements those layouts on the following pages:

  1. InitialSettingsPage
  2. WorkspacesListPage
  3. PreferencesPage
  4. SecuritySettingsPage
  5. AboutPage

Fixed Issues

$ #12261

Tests

  1. Sign into an account without any workspaces.
  2. Open the settings page. Verify it looks good.
  3. Open the Preferences page. Verify that the animation runs and the page looks good.
  4. Open the security settings page. Verify that the animations runs and the page looks good.
  5. Open the About page. Verify that the animation runs and the page looks good.
  6. Open the Workspace list page. Verify that the animation runs and the page looks good.
  7. Create a workspace. Verify that the page still looks good.
  • Verify that no errors appear in the JS console

Offline tests

n/a

QA Steps

Same as tests, just use your judgement and look for any layout issues or bugs.

  • 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 / Chrome
    • iOS / native
    • iOS / 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 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 correct English and 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 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(themeColors.componentBG)
  • 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 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 author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web image image image image image
Mobile Web - Chrome
Mobile Web - Safari
iOSWeb.mov
Desktop image image image image image
desktop.mov
iOS image image image
iOS.mov
Android

w/ updated animations:

screen-20230516-145611.mp4

@shawnborton
Copy link
Contributor

Woo! Any screenies available to preview?

@roryabraham
Copy link
Contributor Author

Woo! Any screenies available to preview?

Not yet, but I did manage to resolve this issue with this PR. Like I said, that was the biggest issue I was having. So hopefully we can get that merged soon and get this unblocked. It will also substantially simplify this PR.

@shawnborton
Copy link
Contributor

Sounds great! Keep me posted when there are some early screenshots to review please, thank you!

@roryabraham roryabraham changed the title [WIP] Redesign settings pages [HOLD][WIP] Redesign settings pages Feb 27, 2023
@roryabraham roryabraham force-pushed the Rory-SettingPageRevamp branch from 40013ce to 0704477 Compare April 6, 2023 02:15
@melvin-bot

This comment was marked as spam.

1 similar comment
@melvin-bot

This comment was marked as spam.

@shawnborton
Copy link
Contributor

Cool, started some conversation in the TCW room about this, we'll see what Augenblick says.

@roryabraham
Copy link
Contributor Author

I figured out an easy way to squeeze better performance out of these animations on web + to fix the weird display bug:

Before (svg renderer)

before.mov

After (canvas renderer)

after.mov

@roryabraham roryabraham requested a review from grgia May 12, 2023 09:17
Copy link
Contributor

@sobitneupane sobitneupane left a comment

Choose a reason for hiding this comment

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

Screenshots/Videos

Web
Screen.Recording.2023-05-12.at.16.23.17.mov
Mobile Web - Chrome
237861511-a814a867-2e34-4857-adc7-75b9ac408a41.mov
Mobile Web - Safari
Screen.Recording.2023-05-12.at.16.48.28.mov
Desktop
Screen.Recording.2023-05-12.at.16.30.48.mov
iOS
Screen.Recording.2023-05-12.at.16.54.28.mov
Android
Screen.Recording.2023-05-12.at.16.36.44.mov

@shawnborton
Copy link
Contributor

How is this screen happening here?
image

@sobitneupane
Copy link
Contributor

sobitneupane commented May 12, 2023

Everything is working great. Animations are working well. Few Questions:

  • "You appear to be offline" has background color same as the status bar/animation. Is it expected?
Screenshot 2023-05-12 at 17 00 46
  • Workspace General Settings page has purple background around the animation in Android/Native (tested in emulator).
Screenshot 2023-05-12 at 16 38 33
  • Transition of status bar is quite slow. Is it expected?
Screen.Recording.2023-05-12.at.17.13.45.mov
  • As already discussed here, About Page in Safari is quite jerky.

@grgia
Copy link
Contributor

grgia commented May 16, 2023

Do you think this should shrink? On a smaller page sizes, the animation takes up a load of screen real-estate whereas the info the user is attempting to access is pushed offscreen

image image

cc @shawnborton

@shawnborton
Copy link
Contributor

I think it's fine, as long as the page scrolls right?

# Conflicts:
#	src/libs/Navigation/linkingConfig.js
#	src/styles/styles.js
@melvin-bot
Copy link

melvin-bot bot commented May 16, 2023

npm has a package.json file and a package-lock.json file. It seems you updated one without the other, which is usually a sign of a mistake. If you are updating a package make sure that you update the version in package.json then run npm install

# Conflicts:
#	package.json
#	src/pages/settings/Payments/PaymentsPage.js
#	src/pages/settings/Preferences/PreferencesPage.js
#	src/styles/styles.js
import TestToolMenu from '../../../components/TestToolMenu';
import MenuItemWithTopDescription from '../../../components/MenuItemWithTopDescription';
import IllustratedHeaderPageLayout from '../../../components/IllustratedHeaderPageLayout';
import PreferencesDJAnimation from '../../../../assets/animations/PreferencesDJ.json';
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be importing these directly or port them through a file similar to how we handle illustrations/icons with Expensicons? That way if we reuse animations and need to update the file name or something we could do it in a single file

Comment on lines +218 to +233
<View style={styles.workspacesListPageFeatureContainer(workspaceFeatures.length)}>
{_.map(workspaceFeatures, ({icon, translationKey}) => (
<View
style={[styles.flexRow, styles.alignItemsCenter]}
key={translationKey}
>
<Icon
src={icon}
width={variables.iconSizeSuperLarge}
height={variables.iconSizeSuperLarge}
/>
<Text style={[styles.h3, styles.pl2]}>{this.props.translate(translationKey)}</Text>
</View>
))}
</View>
</View>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make these feature lists their own component? I think the illustration + feature pattern is likely to be repeated. Or should we save that refactor until it is repeated?

@roryabraham
Copy link
Contributor Author

Ok, so unfortunately this PR was completely blown up by the react-navigation refactor. So I'm going to try and take it more piece-by-piece and break it up into a few smaller PRs.

@roryabraham roryabraham changed the title Redesign settings pages [WIP] Redesign settings pages Jun 9, 2023
@roryabraham
Copy link
Contributor Author

Marking this a WIP as I break it up into more managable pieces and ultimately resolve all the conflicts from the react-navigation refactor.

@shawnborton
Copy link
Contributor

Sounds good. Do you have a rough ETA of when you might be able to finish this one by?

@roryabraham roryabraham mentioned this pull request Jun 29, 2023
57 tasks
@grgia
Copy link
Contributor

grgia commented Jul 14, 2023

any reason to keep this PR open? @roryabraham

@roryabraham
Copy link
Contributor Author

I have been referencing it but we can close it. @grgia feel free to review the latest
here: #21852

@roryabraham roryabraham deleted the Rory-SettingPageRevamp branch July 18, 2023 03:21
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.

5 participants