Repository navigation
[HOLD for payment 2023-11-09] [$500] Same page has different error text color for different errors #29812
Description
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.85-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697540779491219
Action Performed:
- Open the app
- Click on plus and click on request money
- In manual, without typing any numbers, click next
- Observe error text color is red
- Switch to distance and without selecting any waypoint, click next
- Observe that error text color is white
Expected Result:
App should maintain same error text color on same pages
Actual Result:
App displays manual request money errors in red but distance errors in white even though they are on same RHN page
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android: Native
- Android: mWeb Chrome
- iOS: Native
- iOS: mWeb Safari
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Android: Native
Android.native.same.page.different.error.color.mp4
Android: mWeb Chrome
Android.chrome.same.page.different.error.color.mp4
iOS: Native
ios.native.same.page.different.error.color.mov
iOS: mWeb Safari
ios.safari.same.page.different.error.color.mov
MacOS: Chrome / Safari
mac.chrome.same.page.different.error.colors.mov
Recording.112.mp4
MacOS: Desktop
mac.desktop.same.page.different.error.color.mov
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01f1225cd87883fded
- Upwork Job ID: 1714343355796758528
- Last Price Increase: 2023-10-17
- Automatic offers:
- Victor-Nyagudi | Contributor | 27357473
- dhanashree-sawant | Reporter | 27357475
Activity
[-]Same page has different error text color for different errors[/-][+][$500] Same page has different error text color for different errors[/+]melvin-bot commentedon Oct 17, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01f1225cd87883fded
melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to @alexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 17, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)saranshbalyan-1234 commentedon Oct 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Same page has different error text color for different errors
What is the root cause of that problem?
We are using different components to show error.
for example
App/src/components/DistanceRequest/index.js
Lines 227 to 233 in 75a2cc9
App/src/pages/iou/steps/MoneyRequestAmountForm.js
Lines 265 to 271 in cc6a1e3
What changes do you think we should make in order to solve the problem?
We can either use DotIndicatorMessage component in both the places
the solution would look something like this
What alternative solutions did you explore? (Optional)
We can also use FormHelpMessage compoenent in both the places
the solution would look something like this
melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)abdel-h66 commentedon Oct 17, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Inconsistent error message styling between the distance request page and the manual request pages.
What is the root cause of that problem?
In the manual request page we use a component called
FormHelpMessagethat has the red dot and a white text when it's an error. But on the Distance page we are currently using another component calledDotIndicatorMessage.What changes do you think we should make in order to solve the problem?
In the
MoneyRequestAmountFormwe can display use theDotIndicatorMessageto have the same stylingWhat alternative solutions did you explore? (Optional)
Depending on which one should be the standard look, there is also the option of using
FormHelpMessagein the distance request page, but I personally prefer to keep using theDotIndicatorMessagecomponent, as it's used in many other forms.DotIndicator.mp4
N/A
Victor-Nyagudi commentedon Oct 18, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Same page has different error text color for different errors
What is the root cause of that problem?
The error shown during a manual money request flow is from
FormHelpMessagecomponent while the one shown during a distance request comes fromDotIndicatorMessage.The manual money request error text is set to red by
styles.formError.App/src/styles/styles.ts
Lines 1193 to 1194 in 9d79fd1
App/src/styles/themes/default.ts
Line 53 in 9d79fd1
The distance request error text, however, is set to light greyish-green by
styles.offlineFeedback.text.App/src/styles/styles.ts
Lines 2871 to 2872 in 9d79fd1
App/src/styles/themes/default.ts
Line 19 in 9d79fd1
App/src/styles/colors.js
Line 21 in 9d79fd1
What changes do you think we should make in order to solve the problem?
I propose setting the text color to red (same as the one in manual money request error, for consistency's sake) in
DotIndicatorMessageby changing thecolorproperty ifprops.typeis equal toerror.This prop is also what we're currently using to determine the color of the dot indicator (line 60).
App/src/components/DotIndicatorMessage.js
Lines 58 to 61 in 9d79fd1
The duplicate error check could potentially be extracted to a variable like
hasErrorand used in both places to keep the code DRY.Short video after making changes
expensify-distance-request-error-red.mov
What alternative solutions did you explore? (Optional)
I was genuinely curious why the error text in a distance request was made light greyish-green in the first place whereas the other errors I've seen so far have been red.
I replaced the
styleproperty of the text inDotIndicatorMessageto bestyle={styles.formError}, and this also worked fine.Both
styles.formError, currently used byFormHelpMessage, andstyles.offlineFeedback.text, currently used byDotIndicatorMessage, adjust the font size (to the same value) and color.The main difference is
styles.formErroralso adjusts the line height and margin bottom whilestyles.offlineFeedback.textonly adjusts the vertical text alignment in addition.However, after further investigation, I discovered the light greyish-green text is most likely for success messages given the dot indicator has two colors - red for error, and green for success.
Victor-Nyagudi commentedon Oct 18, 2023
Proposal
Updated
30 remaining items
melvin-bot commentedon Nov 2, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.94-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-11-09. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 2, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
alexpensify commentedon Nov 3, 2023
@thesahindia - to prepare for the payment date, can you please complete the checklist? Thanks!
thesahindia commentedon Nov 3, 2023
It was an improvement. I think we just have to add a generic test case.
Steps -
alexpensify commentedon Nov 9, 2023
Here is the payment summary:
Upwork Job: https://www.upwork.com/jobs/~01f1225cd87883fded
*If applicable, the bonuses will be applied on the final payment
Extra Notes regarding payment: This one was before the pre-urgency bonus change, but it was merged in 4 business days-- no bonus here.
alexpensify commentedon Nov 9, 2023
I'll complete the payment process tomorrow since it will be 11-09.
Victor-Nyagudi commentedon Nov 9, 2023
@alexpensify Please take a look at the following with regard to the PR timeline and urgency bonus.
Exact time I got assigned
Exact time PR was marked ready for review
The PR was ready for review in roughly 8 hours (7h 49min), as seen from the above screenshots.
Exact time I bumped C+
By the time I bumped the C+, over 2 days had already elapsed since I marked my PR ready for review. The PR was ready on a Wednesday, and I bumped the C+ on a Friday.
Amount of time between when PR was ready and when I bumped C+
The feedback finally came on a Saturday, but the timer doesn't count weekends - only business days.
Exact time C+ provided initial feedback
I was available at the time and acted on the feedback immediately.
Mind you, I had already fixed this issue, but I had discovered other areas the bug occurred and was looking for feedback on if we should tackle those other areas as well.
After making the changes to address those other areas and fixing merge conflicts, the C+ approved the PR.
Exact time C+ approved the changes
It only took roughly 17 hours between the time I got some feedback to the time the C+ approved the changes.
Time between feedback and C+ approval
Given just how fast the changes were approved, had I gotten the feedback even one day sooner, the PR would've been merged within 3 business. days, and therefore eligible for the urgency bonus.
The PR got merged the following day after approval.
Exact time PR got merged
I humbly request you to take into account this information and to kindly reconsider your stance on the urgency bonus.
alexpensify commentedon Nov 9, 2023
Thank you @Victor-Nyagudi for this summary. After reviewing the payment summary again, I confirmed with the team that the PR for this one was created after the announcement (on October 24) related to the discontinuation of the urgency bonus. The conversation is here:
https://expensify.slack.com/archives/C01GTK53T8Q/p1698191269281379
My apology for not catching this sooner, but the base payment will remain the same.
alexpensify commentedon Nov 9, 2023
Closing - everyone has been paid via Upwork. Thank you!
Victor-Nyagudi commentedon Nov 9, 2023
@alexpensify Ah, I just missed the date then.
No worries. Thank you for the timely payment.
JmillsExpensify commentedon Nov 13, 2023
$500 payment approved for @thesahindia based on this summary.