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

[No QA] Create InlineSystemMessage component #9168

Merged
merged 7 commits into from
May 26, 2022
Merged

[No QA] Create InlineSystemMessage component #9168

merged 7 commits into from
May 26, 2022

Conversation

Gonals
Copy link
Contributor

@Gonals Gonals commented May 25, 2022

Details

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/211552

Tests

We can't really display this component yet, since we don't store network errors on actions for now, so, to test this, you can call the component around here so it displays under all messages. You can pass anything as the message prop:

Screen Shot 2022-05-25 at 3 52 04 PM

We'll do more thorough testing of the component and its visual when we actually place it

@Gonals Gonals requested a review from a team as a code owner May 25, 2022 14:10
@Gonals Gonals self-assigned this May 25, 2022
@melvin-bot melvin-bot bot requested review from Julesssss and removed request for a team May 25, 2022 14:10
@Gonals
Copy link
Contributor Author

Gonals commented May 26, 2022

Ready for review!

};

const InlineSystemMessage = (props) => {
if (props.message.length() === 0) {
Copy link
Contributor

@Julesssss Julesssss May 26, 2022

Choose a reason for hiding this comment

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

I think this should be props.message.length === 0, as I'm getting a length is not a function error

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, totally right. My bad, as I added this at the end 😬

Copy link
Contributor

@Julesssss Julesssss left a comment

Choose a reason for hiding this comment

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

Looking good, left a couple of minor points.

@Julesssss
Copy link
Contributor

Julesssss commented May 26, 2022

I could only get it to display in the message header, please save me from my stupidity and help me figure out exactly where to place the component :D

Screenshot 2022-05-26 at 11 04 34

@Gonals
Copy link
Contributor Author

Gonals commented May 26, 2022

I could only get it to display in the message header, please save me from my stupidity and help me figure out exactly where to place the component :D

Screenshot 2022-05-26 at 11 04 34

Here:

                <>
                <ReportActionItemFragment
                    key={`actionFragment-${props.action.sequenceNumber}-${index}`}
                    fragment={fragment}
                    isAttachment={props.action.isAttachment}
                    attachmentInfo={props.action.attachmentInfo}
                    loading={props.action.loading}
                />
                <InlineSystemMessage
                    message={'This is the error message, yeah'}
                />
                </>

Make sure to group both components with <> </>

@Gonals
Copy link
Contributor Author

Gonals commented May 26, 2022

Comments addressed!

@Julesssss
Copy link
Contributor

Looks good to me on both mobile and web 👍

@Julesssss Julesssss merged commit d2484cb into main May 26, 2022
@Julesssss Julesssss deleted the alberto-inline branch May 26, 2022 18:11
@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @Julesssss in version: 1.1.68-1 🚀

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

}
return (
<View style={[styles.flexRow, styles.alignItemsCenter]}>
<Icon src={Expensicons.Exclamation} fill={colors.red} />
Copy link
Contributor

Choose a reason for hiding this comment

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

We should never reference colors directly in the UI – instead we should always reference themes. This is so that we can easily add darkmode (and potentially other themes?) later on.

Copy link
Contributor

Choose a reason for hiding this comment

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

Created a quick follow-up PR #9198

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, nice spot Rory. Thanks

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀

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

2 similar comments
@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀

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

@Julesssss
Copy link
Contributor

Please ignore these duplicated messages, we only deployed once but the message appears each the iOS deploy fails.

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.1.68-2 🚀

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.

4 participants