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

Empty State Design #13647

Merged
merged 36 commits into from
Jan 31, 2023
Merged

Empty State Design #13647

merged 36 commits into from
Jan 31, 2023

Conversation

dangrous
Copy link
Contributor

@dangrous dangrous commented Dec 15, 2022

cc @shawnborton

Details

This is updating the new chat imagery to match the new designs. This shows when a new chat is created, or when you scroll to the top of an existing chat.

Some things to note:

  • The original designs were not in dark mode, they have been adapted appropriately.
  • The new headline font is not available yet; this currently only changes the sizing (but it will be a quick swap in the styles file when it is ready). I believe this should NOT block this PR, however. Is that correct @shawnborton?
  • There is one spelling fix I noticed in an unrelated translation name. If we feel strongly I can remove this, but it was a quick fix (and I made sure that it is changed in all usages)
  • Translations and copy are currently being reviewed/approved but I wanted to get this out for review sooner rather than later.
  • The code handling the background image, frankly, a bit messy. React Native was not playing well with the background image and so it feels a bit hacky. However, after about a week of struggle, this is the best I could come up with. If you can figure out a better alternative please let me know! I will not be sad if you criticize.

Fixed Issues

$ #12256

Tests

  1. Create a new chat with any user and make sure the visuals match the design.
  2. Create a new group chat with 2 users and make sure the visuals match the design (this should not be different except for having more than one user icon).
  3. Create a new group chat with 6-8 users and make sure the visuals match the design (this should not be different except for having more than one user icon).
  4. Create a new room and make sure the visuals match the design (this should not be different other than the text changes).
  • Verify that no errors appear in the JS console

Offline tests

  1. Create a new chat with any user and make sure the visuals match the design.
  2. Create a new group chat with 2 users and make sure the visuals match the design (this should not be different except for having more than one user icon).
  3. Create a new group chat with 6-8 users and make sure the visuals match the design (this should not be different except for having more than one user icon).
  4. Create a new room and make sure the visuals match the design (this should not be different other than the text changes).

QA Steps

  1. Create a new chat with any user and make sure the visuals match the design.
  2. Create a new group chat with 2 users and make sure the visuals match the design (this should not be different except for having more than one user icon).
  3. Create a new group chat with 6-8 users and make sure the visuals match the design (this should not be different except for having more than one user icon).
  4. Create a new room and make sure the visuals match the design (this should not be different other than the text changes).
  • 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:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • 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
    • 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.
  • I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

Screen Shot 2022-12-22 at 16 11 13
Screen Shot 2022-12-22 at 16 11 20
Screen Shot 2022-12-22 at 16 11 31
Screen Shot 2022-12-22 at 16 11 39

Mobile Web - Chrome

Screen Shot 2022-12-22 at 16 15 59
Screen Shot 2022-12-22 at 16 16 12
Screen Shot 2022-12-22 at 16 16 45
Screen Shot 2022-12-22 at 16 16 55

Mobile Web - Safari

Screen Shot 2022-12-22 at 16 17 30
Screen Shot 2022-12-22 at 16 17 47
Screen Shot 2022-12-22 at 16 18 05
Screen Shot 2022-12-22 at 16 17 36

Desktop

Screen Shot 2022-12-22 at 16 25 56
Screen Shot 2022-12-22 at 16 08 22
Screen Shot 2022-12-22 at 16 08 54
Screen Shot 2022-12-22 at 16 08 32

iOS

Screen Shot 2022-12-22 at 16 09 38
Screen Shot 2022-12-22 at 16 09 45
Screen Shot 2022-12-22 at 16 09 53
Screen Shot 2022-12-22 at 16 10 03

Android

Screen Shot 2022-12-22 at 16 13 50
Screen Shot 2022-12-22 at 16 14 09
Screen Shot 2022-12-22 at 16 14 40
Screen Shot 2022-12-22 at 16 14 53

@dangrous dangrous self-assigned this Dec 15, 2022
@dangrous dangrous marked this pull request as ready for review December 19, 2022 23:56
@dangrous dangrous requested a review from a team as a code owner December 19, 2022 23:56
@melvin-bot melvin-bot bot requested review from grgia and parasharrajat and removed request for a team December 19, 2022 23:56
@melvin-bot
Copy link

melvin-bot bot commented Dec 19, 2022

@grgia @parasharrajat One of you needs to 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]

@shawnborton
Copy link
Contributor

Nice! A couple of minor comments:

For the empty state area, can we give the text area a padding of 40px horizontal, 20px top and 32px bottom? This way it will feel slightly inset from the content, and make it feel a bit more airy.
image

Distance between the avatar and the headline below should be 12px

Can we have the text area overlap the faded BG image some more? Almost as if the text area had something like top: -60px so that it overlaps by 60px.

@shawnborton shawnborton self-requested a review December 20, 2022 03:01
@dangrous
Copy link
Contributor Author

dangrous commented Dec 20, 2022

Updated based on your notes @shawnborton! Just to note, I think there's a bit of extra padding when it's a FULLY new chat, vs. one at the top of an existing chat. This is what the new designs look like with messages below them, which I think is 32px (so matching the new mock). Looks like it's more like 40 when there aren't other messages, which I think is padding for the compose bar maybe?

Screen Shot 2022-12-20 at 15 50 52

I think we should be good to go once we confirm the copy! As soon as we get that I'll take it off of WIP.

@shawnborton
Copy link
Contributor

Ah got it, thanks for sharing. Well, maybe we should just standardize on padding: 40px for all sides (vertical, horizontal) and all scenarios (totally new chat, or existing chat). I think that will make things easier for us, thoughts?

@dangrous dangrous changed the title [WIP] Empty State Design Empty State Design Dec 21, 2022
@dangrous
Copy link
Contributor Author

So the trick with the bottom padding is that this "action item" - i.e. the welcome message - has its own padding, and then the full list of items (including any chat messages) also has ITS own padding. When there are other messages, we only see the padding of this welcome message (as the list padding is below the messages). When there aren't we see both together, which is why it's bigger when there aren't messages. I can't see an easy way to make it the same in both situations... Basically it'll always be ~8px more (it's actually more, but the chat messages have their own padding so that's what it looks like). Should we keep it as is in this PR for now? The difference isn't huge.

In other news, translations and copy are ready to go so this is good to test/review!

@shawnborton
Copy link
Contributor

Cool, I think it's fine to keep as-is then, thanks for explaining!

@shawnborton
Copy link
Contributor

For the mobile sizes, I wonder if we can make the background a little bit smaller so we squeeze in some more detail from the illustration? Something more like this:

image

@dangrous
Copy link
Contributor Author

Updated based on @shawnborton's feedback (screenshots updated as well). Man, every time I think "this will be an easy fix" the image conspires to make things more challenging. This is messy but still works, I think. As always, clean up ideas are appreciated.

@dangrous
Copy link
Contributor Author

Updated with the bug fixed about pointer events! I don't think we should change the accessibilityLabel in this PR because it affects other things, but do agree that it should be changed. We can make another issue to investigate things overall, once this is pushed.

@shawnborton
Copy link
Contributor

Awesome, thanks @dangrous - hopefully we can get this merged soon!

@parasharrajat
Copy link
Member

Testing...

@parasharrajat
Copy link
Member

I know this is not changed in this PR but need confirmation. @shawnborton Is it fine that clicking on the square area around the avatar opens the details modal? I guess we are not applying the same border radius to the click handler as the avatar.

screen-2023-01-30_22.52.13.mp4

@parasharrajat
Copy link
Member

Should there be a gap between the two lines like the normal chat for room chat as well based on the following image?
image

Group Chat/Single Chat/Normal Chat

Screenshot 2023-01-30 23:05:02

Room Chat
Screenshot 2023-01-30 23:06:00

@shawnborton
Copy link
Contributor

shawnborton commented Jan 30, 2023 via email

@parasharrajat
Copy link
Member

parasharrajat commented Jan 30, 2023

Screenshots

🔲 iOS / native

screen-2023-01-31_00.30.12.mp4

🔲 iOS / Safari

screen-2023-01-31_00.35.43.mp4

🔲 MacOS / Desktop

screen-2023-01-31_00.28.19.mp4

🔲 MacOS / Chrome

screen-2023-01-31_00.33.38.mp4

🔲 Android / Chrome

screen-2023-01-31_00.49.10.mp4

🔲 Android / native

screen-2023-01-31_01.01.17.mp4

@shawnborton
Copy link
Contributor

Looks great! Merge is all you @grgia

Copy link
Member

@parasharrajat parasharrajat left a comment

Choose a reason for hiding this comment

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

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 / Chrome
    • iOS / native
    • iOS / 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 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 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 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(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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

cc: @grgia

🎀 👀 🎀 C+ reviewed

@parasharrajat
Copy link
Member

parasharrajat commented Jan 30, 2023

Good collab on this issue. Really happy with the thorough review and changes.

@shawnborton
Copy link
Contributor

Awesome. @grgia all you for the merge!

@JmillsExpensify
Copy link

Let's click the button on this one! It's a great improvement worth getting in the hands of users.

Copy link
Contributor

@grgia grgia left a comment

Choose a reason for hiding this comment

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

Looks great!

@grgia
Copy link
Contributor

grgia commented Jan 31, 2023

Great job on this @dangrous !

@grgia grgia merged commit 07462cf into main Jan 31, 2023
@grgia grgia deleted the dangrous-emptystatedesign branch January 31, 2023 19:47
@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.

@dangrous
Copy link
Contributor Author

Amazing, thanks all for pushing this through! It's been a long road haha but it looks great.

@OSBotify
Copy link
Contributor

OSBotify commented Feb 2, 2023

🚀 Deployed to staging by https://github.com/grgia in version: 1.2.64-0 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Feb 4, 2023

🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀

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

@OSBotify
Copy link
Contributor

OSBotify commented Feb 4, 2023

🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀

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

1 similar comment
@OSBotify
Copy link
Contributor

OSBotify commented Feb 4, 2023

🚀 Deployed to production by https://github.com/thienlnam in version: 1.2.64-7 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 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