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

HOLD for payment 2024-04-05 [$500] Workspace - Error message is left and bottom aligned in WS menus #37770

Closed
2 of 6 tasks
lanitochka17 opened this issue Mar 5, 2024 · 50 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Mar 5, 2024

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.4.47-2
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): applausetester+emilio@applause.expensifail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Access staging.new.expensify.com
  2. Sign into applausetester+emilio@applause.expensifail.com
    account
  3. Go to WS settings and turn off internet
  4. Remove "emilio.utest@gmail.com"
    user and then turn the internet back on
    Another way to simulate this error message is by simply turning on "Simulate failing network requests" in Troubleshooting. This will work on any account and is much simpler to reproduce

Expected Result:

User expects the error message to match the rest of the UI

Actual Result:

The error message seems too much aligned to the left and also aligned to the bottom

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

Add any screenshot/video evidence

Bug6402951_1709652827058!Error_message_is_left_and_bottom_aligned

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015595ed66487a0e2e
  • Upwork Job ID: 1765366719409008640
  • Last Price Increase: 2024-04-05
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Mar 5, 2024
Copy link

melvin-bot bot commented Mar 5, 2024

Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@lanitochka17
Copy link
Author

@laurenreidexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@gijoe0295
Copy link
Contributor

gijoe0295 commented Mar 5, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Error message is left and bottom aligned in WS menus

What is the root cause of that problem?

We always add bottom margin to the list item:

App/src/styles/index.ts

Lines 4270 to 4279 in a509234

selectionListPressableItemWrapper: {
alignItems: 'center',
flexDirection: 'row',
paddingHorizontal: 16,
paddingVertical: 16,
marginHorizontal: 20,
marginBottom: 12,
backgroundColor: theme.highlightBG,
borderRadius: 8,
},

although the bottom margin should be on the outermost OfflineWithFeedback here.

What changes do you think we should make in order to solve the problem?

We should introduce a new prop in BaseListItem which allows passing custom style to the underneath OfflineWithFeedback component and move the marginBottom to that new prop (define a separate style key for that as well).

By this, we can make sure the error looks "stick" to its corresponding item and the error looks more horizontally aligned with the item.

Before

Screenshot 2024-03-05 at 23 28 18

After

Screenshot 2024-03-07 at 11 49 50

What alternative solutions did you explore? (Optional)

NA

@Krishna2323
Copy link
Contributor

Krishna2323 commented Mar 5, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Workspace - Error message is left and bottom aligned in WS menus

What is the root cause of that problem?

We have margin bottom applied to BaseListItem pressable inside TableListItem.

marginBottom: 12,

What changes do you think we should make in order to solve the problem?

We need to remove bottom margin from selectionListPressableItemWrapper style object and then introduce new prop (containerStyle)inside BaseListItem for passing a style object to OfflineWithFeedback. From TableListItem, now we need to pass containerStyle={styles.pb3} to BaseListItem. And from BaseListItem we will pass the style prop to OfflineWithFeedback as style={containerStyle}. We will also apply styles.pt3 to errorRowStyles to align the error message to center.

We might also want to reduce padding horizontal from listHeaderWrapperStyle because the first item will have some padding top.

listHeaderWrapperStyle={[styles.ph9, styles.pv3, styles.pb5]}

PS: I think the left alignment is fine, we have similar alignment in multiple places, we might want to just centre or move to top those error messages.

If we need some more margin, it can be added to errorRowStyle, but that can be handled in the PR after final decision is made by the design team

Result

Monosnap New Expensify 2024-03-05 22-15-09

Alternatively

We will remove bottom margin from selectionListPressableItemWrapper and check if the item has error or not and based on that we will add styles.m3, we will only add styles.m3 when we don't have any errors. Otherwise error message container is enough for spacing. Or we can also introduce a new prop for passing errorRowStyles to BaseListItem > OfflineWithFeedback for minor vertical margin.

const hasErrors = !isEmptyObject(item.errors);
pressableStyle={[[...otherstyles, !hasErrors && styles.mb3]]}
Monosnap New Expensify 2024-03-05 22-55-05

Result with vertical margin of 4px on error row:

image

Bug 2

There is also a bug in WorkspacesListPage, in that component we have nested OfflineWithFeedback inside PressableWithoutFeedback and due to that when we hover on error message it shows hand cursor and if we click it takes to workspace details page.

<PressableWithoutFeedback
role={CONST.ROLE.BUTTON}
accessibilityLabel="row"
style={[styles.mh5, styles.mb3]}
disabled={item.disabled}
onPress={item.action}
>
{({hovered}) => (
<OfflineWithFeedback
key={`${item.title}_${index}`}
pendingAction={item.pendingAction}
errorRowStyles={styles.ph5}
onClose={item.dismissError}
errors={item.errors}
>

bug_2_error_text.mp4

Solution for bug 2

I prefer to use my alternative solution fir this bug stylings also, apart from that we need to move OfflineWithFeedback outside PressableWithoutFeedback as a parent component of PressableWithoutFeedback. Then we need to add styles.mb3 only if there is no error & add some vertical spacing for errorRowStyles.

After fix

bug_2_fix.mp4

@Krishna2323
Copy link
Contributor

Proposal Update

  • Added alternative solution
  • Found similar bug and added solution for it

@laurenreidexpensify laurenreidexpensify added the External Added to denote the issue can be worked on by a contributor label Mar 6, 2024
Copy link

melvin-bot bot commented Mar 6, 2024

Job added to Upwork: https://www.upwork.com/jobs/~015595ed66487a0e2e

@melvin-bot melvin-bot bot changed the title Workspace - Error message is left and bottom aligned in WS menus [$500] Workspace - Error message is left and bottom aligned in WS menus Mar 6, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 6, 2024
Copy link

melvin-bot bot commented Mar 6, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

@laurenreidexpensify
Copy link
Contributor

@Expensify/design can you confirm this is a bug and not expected behaviour? It definitely sounds like an inconsistency

@shawnborton
Copy link
Contributor

@lanitochka17 can you elaborate more on your bug report, specifically this part here:

Expected result: User expects the error message to match the rest of the UI

Just want to clarify what "match the rest of the UI" means, and if this might have failed a certain test, etc?

@shawnborton
Copy link
Contributor

I agree though, we could probably just add some bottom margin to the error message and we should be good to go here. Do we want to have this as an external bug fix, or @luacmartins should we just have this fixed by whoever implemented it in the first place?

@luacmartins
Copy link
Contributor

luacmartins commented Mar 6, 2024

This view was introduced as part of ideal nav a few weeks ago and it's past the regression period, so I think we can keep it external.

@gijoe0295
Copy link
Contributor

@shawnborton Now we have two approaches for the error message to show as you can see in our proposal screenshots.I proposed to make the error more "stick" to the corresponding item. The other proposed to keep the space evenly between the items and errors.

@shawnborton
Copy link
Contributor

I think this style makes sense:
CleanShot 2024-03-06 at 11 43 42@2x

But maybe with slightly more margin below the error message so it feels more attached to the row above. Curious if @Expensify/design has any differing opinions though!

@gijoe0295
Copy link
Contributor

gijoe0295 commented Mar 6, 2024

But maybe with slightly more margin below the error message so it feels more attached to the row above

I think this is what you're looking for (from my proposal:

Screenshot 2024-03-05 at 23 23 31

@shawnborton
Copy link
Contributor

Not quite - I think the width of the error message in the other proposal might be better. I see where this one aligns with the content a little more, but I feel like we should avoid trying to be too crafty with these messages and just use the same standard style everywhere.

@gijoe0295
Copy link
Contributor

Updated my proposal to reflect the latest expectation since the solutions in both proposals are the same, just differ in CSS styling.

@Krishna2323
Copy link
Contributor

PS: Initially, I identified the correct styles, aiming to ensure consistency with the rest of the UI. Consequently, I invested time in exploring the similar UIs to determine the appropriate stylings, resulting in the addition of multiple different styles for demo. Additionally, during this exploration, I uncovered another bug that requires attention. I've included a fix for this issue in the 'Bug 2' section of my proposal.

@gijoe0295
Copy link
Contributor

gijoe0295 commented Mar 7, 2024

Initially, I identified the correct styles

That's not completely correct as per feedback here. My styles cover one aspect of the expectation while yours cover the other. We both had incomplete styles but the implementation idea was similar. Let's see what C+ weigh in here.

@melvin-bot melvin-bot bot added the Overdue label Mar 8, 2024
@laurenreidexpensify
Copy link
Contributor

Next step: @rushatgabhane to review

@melvin-bot melvin-bot bot removed the Overdue label Mar 11, 2024
@rushatgabhane
Copy link
Member

rushatgabhane commented Mar 11, 2024

@gijoe0295's proposal was first and it looks fine.
@Krishna2323 has given a more detailed solution.

I think we should hire @Krishna2323 because they have explained the implementation in more details 🎀 👀 🎀

Copy link

melvin-bot bot commented Apr 5, 2024

Payment Summary

Upwork Job

BugZero Checklist (@laurenreidexpensify)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1765366719409008640/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@laurenreidexpensify
Copy link
Contributor

Payment Summary -

@rushatgabhane please confirm if a regression test is required thanks

@melvin-bot melvin-bot bot removed the Overdue label Apr 8, 2024
@Krishna2323
Copy link
Contributor

Krishna2323 commented Apr 8, 2024

@laurenreidexpensify, there were a few issues with the merged PR. We have a follow-up PR that has just been approved by an internal engineer. IG we should hold.

@laurenreidexpensify laurenreidexpensify changed the title [HOLD for payment 2024-04-05] [$500] Workspace - Error message is left and bottom aligned in WS menus [HOLD for payment 2024-04-05 / #39226] [$500] Workspace - Error message is left and bottom aligned in WS menus Apr 8, 2024
@melvin-bot melvin-bot bot added the Overdue label Apr 10, 2024
@laurenreidexpensify
Copy link
Contributor

on Hold, not overdue

@melvin-bot melvin-bot bot removed the Overdue label Apr 11, 2024
@rushatgabhane
Copy link
Member

rushatgabhane commented Apr 13, 2024

  1. The PR that introduced the bug has been identified. Link to the PR: Tried finding the PR but it looks like this bug was there from the initial implementation of the page.

  2. The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N.A.

  3. A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N.A.

  4. Determine if we should create a regression test for this bug. - No

  5. If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again - N.A.

@JmillsExpensify
Copy link

$500 approved for @rushatgabhane

@melvin-bot melvin-bot bot added the Overdue label Apr 15, 2024
@laurenreidexpensify
Copy link
Contributor

@rushatgabhane @Krishna2323 can you confirm status of regression? Thanks

@melvin-bot melvin-bot bot removed the Overdue label Apr 16, 2024
@rushatgabhane
Copy link
Member

all resolved!

@laurenreidexpensify
Copy link
Contributor

laurenreidexpensify commented Apr 17, 2024

Great - updated payment summary

Payment Summary -

C+ @rushatgabhane requires payment through NewDot Manual Requests $500
Contributor @Krishna2323 requires payment upwork.com/jobs/~011ffc5dbaf530dd5b - please apply in Upwork $500

@rushatgabhane please confirm if a regression test is required thanks

@Krishna2323
Copy link
Contributor

@laurenreidexpensify applied on Upwork :)

@laurenreidexpensify
Copy link
Contributor

Payment Summary -

@rushatgabhane please confirm if a regression test is required thanks

@laurenreidexpensify laurenreidexpensify changed the title [HOLD for payment 2024-04-05 / #39226] [$500] Workspace - Error message is left and bottom aligned in WS menus HOLD for payment 2024-04-05 [$500] Workspace - Error message is left and bottom aligned in WS menus Apr 18, 2024
@JmillsExpensify
Copy link

$500 approved for @rushatgabhane

@melvin-bot melvin-bot bot added the Overdue label Apr 22, 2024
@laurenreidexpensify
Copy link
Contributor

Remaining step to close:

@rushatgabhane please confirm if a regression test is required thanks

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 22, 2024
@laurenreidexpensify
Copy link
Contributor

Remaining step to close:

@rushatgabhane please confirm if a regression test is required thanks

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 25, 2024
@rushatgabhane
Copy link
Member

No regression tests required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants