Fix/29812: Same page has different error text color for different errors#30325
Conversation
|
It appears this bug occurs in other places too like when you try uploading an image over 6MB as your avatar. Same thing if you input the wrong magic link numbers when trying to add another contact method. In addition, trying to unlink a login method with account errors (tried but not sure how to reproduce this one) or if it's detected you committed domain fraud (I prefer to stay out of jail, so I won't try reproducing this), the error shows up in the wrong text color. App/src/pages/signin/UnlinkLoginForm.js Lines 73 to 79 in 38d647e App/src/pages/settings/Wallet/ExpensifyCardPage.js Lines 89 to 96 in 38d647e The changes in this PR will address those cases. Here's a sample. However, during my testing, I stumbled on this other error that doesn't show red text if you deny location permissions when adding a start position to a distance request i.e. click on FAB -> Request money -> Distance -> Click start -> Select "Use your location" from dropdown when input is focused-> deny location permission The current changes won't apply because this particular error is rendered using App/src/components/LocationErrorMessage/BaseLocationErrorMessage.js Lines 43 to 52 in 2d6e8ef The text there is styled using I figured I'd ask first before making any changes other than the ones agreed upon in my proposal. Should we opt to fix the denied permission error in this PR, we could potentially create a helper method like We could even create a new style seeing as it will be used twice in locationErrorMessage {
...offlineFeedback.text,
color: formError.color
}Let me know your thoughts on this. |
|
I'm yet to find other places where the error text color is light greyish-green isn't of red. |
|
@thesahindia 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] |
|
Friendly bump @thesahindia for a review. |
Yeah, let's do it. |
|
I'm on it. |
|
All yours, @thesahindia. Tests well too. |
Reviewer Checklist
Screenshots/Videos |
|
@Victor-Nyagudi please resolve the conflicts. |
|
@thesahindia All conflicts have been resolved. We're good to move forward. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.3.94-0 🚀
|
1 similar comment
|
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.3.94-0 🚀
|
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.3.94-2 🚀
|
|
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.3.95-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 1.3.95-9 🚀
|











Details
Errors in Expensify are shown in red text, but the error shown when trying to create a distance request without adding waypoints has a red dot accompanied by light-greyish green text (the color of success messages when accompanied by a green dot).
This PR restores the red color to the error text.
Fixed Issues
$ #29812
PROPOSAL: #29812 (comment)
Tests
Offline tests
After logging into an account while online, turn off the wifi/internet connection and perform steps 2 through 6 in the "Tests" section above. You can also force offline by clicking on the avatar at the top left of the screen -> preferences -> toggle offline.
You can add a contact method while offline, but you won't be able to click it (step 11) to navigate to the screen with the green dot and light-greyish green text.
QA Steps
Same as above in the "Tests" section.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop