You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$1000] Workspace - Margin of error is slightly shifted to the left compared to other items #22242
DotIndicatorMessage uses only styles.errorDot for styling container of icon due to which there is a mismatch in the styles used for menu item icons and error dot icon.
What changes do you think we should make in order to solve the problem?
We can't simply add styles.popoverMenuIcon to container of icon in DotIndicatorMessage as it will break styling on other pages like WorkspaceMembersPage.
We should create a new prop named errorIconContainerStyles in OfflineWithFeedback and DotIndicatorMessage.
From WorkspaceInitialPage we can pass a new prop to OfflineWithFeedback -
changed the title [-]Workspace - Margin of error is slightly shifted to the left compared to other items[/-][+][$1000] Workspace - Margin of error is slightly shifted to the left compared to other items[/+]on Jul 5, 2023
We were not showing errors for this component before but in this PR, AvatarWithImagePicker was changed to use OfflineWithFeedback and errors prop was passed (though it had nothing to do with PR) so that's why this looks completely messed up because it was not intentionally added -
The following pages have alignment issues in my opinion -
5, 6 - left align the red dot with icons in buttons
8 - both errors need alignment
12 (this issue) - left align red dot with icons
13, 15 - align close icon
16 - remove error prop as we were not showing it before and it was added in this PR unintentionally.
I actually don't think this is a bug. We used to try to get cheeky with making sure the red dot lined up with the content above it, but we ran into way too many different cases where sometimes the item above was further right than others. So in the spirit of consistency, we just made it so we have one default RBR error message style, which is what you see. Persnoally I don't think this looks broken, and I think we should just close this out.
Activity
melvin-bot commentedon Jul 5, 2023
Triggered auto assignment to @puneetlath (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 5, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)jeet-dhandha commentedon Jul 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
marginLeft: 10inerrorRowStylesofOfflineWithFeedbackinWorkspaceInitialPage.js.10value was perfect for this scenario.Screenshot after changes
What alternative solutions did you explore? (Optional)
Nikhil-Vats commentedon Jul 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace - Dot error icon is not left aligned with other items.
What is the root cause of that problem?
WorkspaceInitialPageusesMenuItemwhich usesstyles.popoverMenuIconfor styling icons of menu items.App/src/components/MenuItem.js
Line 152 in 11b8908
styles.popoverMenuIconhas a width of40pxand alignment properties for centering the icon horizontally and vertically.App/src/styles/styles.js
Lines 1309 to 1313 in 11b8908
The error message on
WorkspaceInitialPageis shown by passingerrors={policy.errors}toOfflineWithFeedbackwhich rendersDotIndicatorMessage.App/src/components/DotIndicatorMessage.js
Lines 57 to 62 in 11b8908
DotIndicatorMessageuses onlystyles.errorDotfor styling container of icon due to which there is a mismatch in the styles used for menu item icons and error dot icon.App/src/styles/styles.js
Lines 2846 to 2848 in 11b8908
What changes do you think we should make in order to solve the problem?
We can't simply add
styles.popoverMenuIconto container of icon inDotIndicatorMessageas it will break styling on other pages likeWorkspaceMembersPage.We should create a new prop named
errorIconContainerStylesinOfflineWithFeedbackandDotIndicatorMessage.From
WorkspaceInitialPagewe can pass a new prop toOfflineWithFeedback-Then in
OfflineWithFeedbackwe simply pass on the prop toDotIndicatorMessage.In
DotIndicatorMessagewe can add this prop to the container of icon. We can change line 57 to -This will fix the issue while also not causing any regressions on other pages like
WorkspaceMembersPage.What alternative solutions did you explore? (Optional)
NA
Result -
Screen.Recording.2023-07-05.at.12.05.58.PM.mov
[-]Workspace - Margin of error is slightly shifted to the left compared to other items[/-][+][$1000] Workspace - Margin of error is slightly shifted to the left compared to other items[/+]melvin-bot commentedon Jul 5, 2023
Job added to Upwork: https://www.upwork.com/jobs/~014ed9881792dde5c5
melvin-bot commentedon Jul 5, 2023
Current assignee @puneetlath is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jul 5, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)thesahindia commentedon Jul 6, 2023
Let's fix this for payments page too. I think we should also align the dismiss button.
@Nikhil-Vats, can you look into other pages as well? Le't fix all the instances here.
Nikhil-Vats commentedon Jul 6, 2023
Sure, I will come up with a list today and update the proposal.
Nikhil-Vats commentedon Jul 7, 2023
@thesahindia Here is the list of components that use
OfflineWithFeedbackto show errors -1. IOUPreview
2. ReportActionItem
3. ReportActionItemCreated
4. ReportActionItemParentAction
5. ContinueBankAccountSetup
6. EnableStep
7. PaymentMethodList
8. BasePaymentsPage
9. ContactMethodDetailsPage
10. BaseValidateCodeForm
11. ReportSettingsPage
12. WorkspaceInitialPage
13. WorkspaceMembersPage
14. WorkspacesListPage
15. WorkspaceRateAndUnitPage
16. AvatarWithImagePicker - Definitely needs fixing
We were not showing errors for this component before but in this PR, AvatarWithImagePicker was changed to use OfflineWithFeedback and errors prop was passed (though it had nothing to do with PR) so that's why this looks completely messed up because it was not intentionally added -

Nikhil-Vats commentedon Jul 7, 2023
The following pages have alignment issues in my opinion -
5, 6 - left align the red dot with icons in buttons
8 - both errors need alignment
12 (this issue) - left align red dot with icons
13, 15 - align close icon
16 - remove error prop as we were not showing it before and it was added in this PR unintentionally.
thesahindia commentedon Jul 10, 2023
Cool, thanks for looking into it.
@Nikhil-Vats's proposal looks good to me!
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Jul 10, 2023
Triggered auto assignment to @madmax330, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
puneetlath commentedon Jul 12, 2023
@madmax330 thoughts on the proposal?
madmax330 commentedon Jul 13, 2023
Proposal looks good, but
Cc @shawnborton can you confirm that this looks good before we move forward?
shawnborton commentedon Jul 13, 2023
I actually don't think this is a bug. We used to try to get cheeky with making sure the red dot lined up with the content above it, but we ran into way too many different cases where sometimes the item above was further right than others. So in the spirit of consistency, we just made it so we have one default RBR error message style, which is what you see. Persnoally I don't think this looks broken, and I think we should just close this out.
madmax330 commentedon Jul 13, 2023
Alright thanks, closing