Skip to content

Added persistent Created Room Header to the Chat#7445

Merged
marcaaron merged 13 commits into
Expensify:mainfrom
sig5:fix-#7077
Feb 2, 2022
Merged

Added persistent Created Room Header to the Chat#7445
marcaaron merged 13 commits into
Expensify:mainfrom
sig5:fix-#7077

Conversation

@sig5

@sig5 sig5 commented Jan 27, 2022

Copy link
Copy Markdown
Contributor

Details

We needed to replace the initial Room header with a persistent room header. I have added a new component that renders when action-type is CREATED.
I have also updated the names of a component and styles to reflect the change (Hope that's fine).

Fixed Issues

$ #7077

Tests

  1. Open a new/existing chat.
  2. Verify the position of the header and scroll-ability within the chat.
  • Verify that no errors appear in the JS console

QA Steps

  1. Open a new/existing chat.
  2. Verify the position of the header and scroll-ability within the chat.
  • [X ] Verify that no errors appear in the JS console

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Screencast.from.27-01-22.08_07_07.PM.IST.mp4

Mobile Web

WhatsApp Image 2022-01-28 at 4 36 22 PM

Desktop

iOS

Android

WhatsApp Image 2022-01-28 at 4 36 23 PM

@sig5 sig5 requested a review from a team as a code owner January 27, 2022 15:12
@MelvinBot MelvinBot requested review from marcaaron and parasharrajat and removed request for a team January 27, 2022 15:12
@sig5

sig5 commented Jan 27, 2022

Copy link
Copy Markdown
Contributor Author

@parasharrajat I do not have a mac or an iOS device atm, can you test it if it looks okay on those devices? Thanks :D

@parasharrajat parasharrajat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Testing now...

Comment thread src/pages/home/report/ReportActionItemCreated.js Outdated
Comment thread src/pages/home/report/ReportActionItemCreated.js Outdated
Comment thread src/pages/home/report/ReportActionsView.js Outdated
@parasharrajat

parasharrajat commented Jan 27, 2022

Copy link
Copy Markdown
Member

Apart from it, I think there is more gap between first message and the Created view.

@shawnborton Could you please review the design here? Thank you 🙇 .

Leaving some images for broader view.

When Chat is empty

image

@shawnborton

Copy link
Copy Markdown
Contributor

Is this just for rooms or does this fix this behavior for all new chat types? Like 1:1, group messages, etc?

From our mockups, it looks like we have 32px padding at the bottom of the chat header:
image

@parasharrajat

parasharrajat commented Jan 27, 2022

Copy link
Copy Markdown
Member

Tested on IOS and Desktop. looks good code-wise. But Should the text in the center extend more on the mobile? It seems shrunk.
image

@shawnborton

Copy link
Copy Markdown
Contributor

I think we might be able to widen that area a bit. In your screenshot, you can see how "him" falls to a third line because of how skinny that area is currently.

@sig5

sig5 commented Jan 28, 2022

Copy link
Copy Markdown
Contributor Author

Is this just for rooms or does this fix this behavior for all new chat types? Like 1:1, group messages, etc?

From what I know, this is supposed to be added in the beginning of all Chat Reports (#7077 (comment))

I think we might be able to widen that area a bit. In your screenshot, you can see how "him" falls to a third line because of how skinny that area is currently.

EDIT: My bad, Width is set as 70% in ReportWelcomeText which is causing the wrapping of the text, will fix and push.
I think adding a slack of 4px on each side should be the sweet spot for us. It should cover most of the names and looks almost as good as 20px padding. Opinions?

20px padding 16px padding
Screenshot from 2022-01-28 04-53-42 Screenshot from 2022-01-28 04-54-56

cc: @shawnborton , @parasharrajat

@parasharrajat

Copy link
Copy Markdown
Member

Not a design expert. but I think it can be widened more. The Left and right side gap should be a minimum of 20px from screen edges. Thus there is enough space around so that history with can fit in a single line.

@shawnborton

Copy link
Copy Markdown
Contributor

I agree, I think we can just do 20px padding on the left and right with no max-width (just let it go full container) and we should be good to go.

@sig5

sig5 commented Jan 28, 2022

Copy link
Copy Markdown
Contributor Author

Updated Changes, the width specification matches that of the mockup now.Updated screenshots in the PR.

@sig5 sig5 changed the title Added persistent created room header to Chat Added persistent Created Room Header to the Chat Jan 28, 2022

@parasharrajat parasharrajat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

UI looks good. Just a small tweaks.

Comment thread src/pages/home/report/ReportActionItemCreated.js Outdated
Comment thread src/styles/styles.js Outdated
Comment thread src/styles/styles.js Outdated
parasharrajat
parasharrajat previously approved these changes Jan 28, 2022

@parasharrajat parasharrajat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. leaving a few no blocker comments.

cc: @marcaaron

🎀 👀 🎀 C+ reviewed

Comment thread src/pages/home/report/ReportActionItemCreated.js Outdated
Comment thread src/styles/utilities/spacing.js Outdated
Comment on lines +303 to +306
pt5: {
paddingTop: 20,
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please only add styles when they are used.

Suggested change
pt5: {
paddingTop: 20,
},

Comment on lines +26 to +29
<View style={[styles.chatContent,
styles.pb8,
styles.p5,
]}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
<View style={[styles.chatContent,
styles.pb8,
styles.p5,
]}
<View style={[
styles.chatContent,
styles.pb8,
styles.p5,
]}

parasharrajat
parasharrajat previously approved these changes Jan 29, 2022
shawnborton
shawnborton previously approved these changes Jan 31, 2022
.filter(action => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
|| action.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT
|| action.actionName === CONST.REPORT.ACTIONS.TYPE.RENAMED)
.filter(action => _.contains(_.values(CONST.REPORT.ACTIONS.TYPE), action.actionName))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't seem like a safe change. We might have action types that should not be rendered in the future added to this list. Can we just add the new action to this list?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

            .filter(action => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
                    || action.actionName === CONST.REPORT.ACTIONS.TYPE.ADDCOMMENT
                    || action.actionName === CONST.REPORT.ACTIONS.TYPE.RENAMED
                    || action.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, that makes sense. Will do!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good.

@sig5 sig5 dismissed stale reviews from shawnborton and parasharrajat via 96c6441 January 31, 2022 18:57
@sig5

sig5 commented Feb 2, 2022

Copy link
Copy Markdown
Contributor Author

Updated with the requested changes!

@marcaaron marcaaron merged commit 9d6e07a into Expensify:main Feb 2, 2022
@OSBotify

OSBotify commented Feb 2, 2022

Copy link
Copy Markdown
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

OSBotify commented Feb 4, 2022

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by @marcaaron in version: 1.1.36-0 🚀

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

@OSBotify

OSBotify commented Feb 7, 2022

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.36-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 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.

5 participants