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
[HOLD for payment 2024-04-15] Split button has incorrect hover styles #39020
Remove ...sizing.h100 from buttonSuccessDivider & buttonDivider, it will look overflowed if we have ...sizing.h100 because the buttons have 1px padding.
Update the height of the divider based on the button size.
Next, add flex row style to the Button innerStyles.
Last, add styles.flex1, styles.justifyContentCenter styles to the dropdown view wrapper. This will align the arrow to the center and take all available space.
changed the title [-]Split button has incorrect hover styles[/-][+][HOLD for payment 2024-04-15] Split button has incorrect hover styles[/+]on Apr 8, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
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:
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] 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:
[@akinwale] 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:
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] 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.
[@CortneyOfstad] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] 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:
[@akinwale] 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:
Not a regression. This is a design change following a global button refactor.
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] 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.
Regression Test Steps
Launch Expensify
Click on the global create menu and select Send Money
Enter an amount and click Next
Select a recipient and continue to the confirmation page
Hover the mouse on each side of the button separated by the divider (text on the lhs, icon on the rhs).
Verify that the hover effect is separated by the divider.
Activity
melvin-bot commentedon Mar 26, 2024
Triggered auto assignment to @CortneyOfstad (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.nkdengineer commentedon Mar 26, 2024
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?
What alternative solutions did you explore? (Optional)
Krishna2323 commentedon Mar 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Split button has incorrect hover styles
What is the root cause of that problem?
The divider is in the
Buttonwhich shows the arrow.App/src/components/ButtonWithDropdownMenu/index.tsx
Line 102 in f7a697a
What changes do you think we should make in order to solve the problem?
We need to move the
dividerbetween both buttons and have update styles.Steps:
App/src/components/ButtonWithDropdownMenu/index.tsx
Line 102 in f7a697a
to:
App/src/components/ButtonWithDropdownMenu/index.tsx
Line 88 in f7a697a
...sizing.h100frombuttonSuccessDivider&buttonDivider, it will look overflowed if we have...sizing.h100because the buttons have1pxpadding.Optional: We can create a util function to get the divider styles based on sizes just like we have for buttons (
getButtonStyleWithIcon)Result
allgandalf commentedon Mar 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Split button has incorrect hover styles
What is the root cause of that problem?
We mixup style for
Largebutton sizes.What changes do you think we should make in order to solve the problem?
I have some different approach but it has a downside, so maybe we can ask @shawnborton whether it would be fine
We need to pass a optional prop
isButtonSizeLargetoIconcomponent fromSettlement Buttoni.e. :App/src/components/Button/index.tsx
Line 319 in f7a697a
the default value of
isButtonSizeLargewould be falseWe do get the line aligned but here we shrink the text a little, i have compared both of them below
What alternative solutions did you explore? (Optional)
N/A
neonbhai commentedon Mar 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Split button has incorrect hover styles
What is the root cause of that problem?
We added support for
mediumsize dropdown buttonUsed here
But the new styles added caused alignment issues with the large size, as we didn't update the margin styles here:
App/src/components/ButtonWithDropdownMenu/index.tsx
Line 101 in 7257a0f
What changes do you think we should make in order to solve the problem?
Update the styles to use bigger margins when
isButtonSizeLargeis trueRecommending to use
18pxon left and right margins to center the icon:Update this line to use larger margins when
isButtonSizeLargeis true:Alternatively
We can use the style names as to
dropDownButtonArrowContainMediumanddropDownButtonArrowContainLargeResult:
Screen.Recording.2024-03-27.at.5.51.15.AM.mov
bernhardoj commentedon Mar 27, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The hover doesn't take the full width of the button.
What is the root cause of that problem?
This only happens when the
ButtonWithDropdownMenuhas abuttonSizeof large. When we set the size to large, the button will have a minimum size of 52.App/src/styles/index.ts
Lines 598 to 601 in 1bbb594
App/src/styles/variables.ts
Line 22 in 1bbb594
However, the total width of the arrow and divider is only 43 (16 arrow icon + 26 margin horizontal + 1 border width).

Then, the button has an align items center style which puts the children to the center.
Screen.Recording.2024-03-27.at.12.01.55.mov
You can also notice that this doesn't happen in a smaller size.
Screen.Recording.2024-03-27.at.12.02.35.mov
What changes do you think we should make in order to solve the problem?
First, move the divider element to the direct child of the Button.
App/src/components/ButtonWithDropdownMenu/index.tsx
Line 102 in 1bbb594
Next, add flex row style to the Button
innerStyles.Last, add
styles.flex1, styles.justifyContentCenterstyles to the dropdown view wrapper. This will align the arrow to the center and take all available space.App/src/components/ButtonWithDropdownMenu/index.tsx
Line 101 in 1bbb594
What alternative solutions did you explore? (Optional)
Adjust the arrow icon margin left and right based on the button size so the whole width is equal or bigger than the button min width.
shawnborton commentedon Mar 27, 2024
Actually @narefyev91 is saying that this is fixed on production already?
Screen.Recording.2024-03-27.at.13.56.53.mov
narefyev91 commentedon Mar 27, 2024
will take this one as it was coming from global button refactoring
8 remaining items
[-]Split button has incorrect hover styles[/-][+][HOLD for payment 2024-04-15] Split button has incorrect hover styles[/+]melvin-bot commentedon Apr 8, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Apr 8, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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 2024-04-15. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Apr 8, 2024
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:
CortneyOfstad commentedon Apr 15, 2024
For some reason job link did not post — https://www.upwork.com/ab/applicants/1779868341125738496/job-details
CortneyOfstad commentedon Apr 15, 2024
@akinwale I sent you an offer for the job in Upwork. Please let me know once you accept.
Also, can you complete the checklist here by EOD? Thank you!
akinwale commentedon Apr 15, 2024
@CortneyOfstad Accepted. Thanks!
akinwale commentedon Apr 15, 2024
Not a regression. This is a design change following a global button refactor.
Regression Test Steps
Do we agree 👍 or 👎?
CortneyOfstad commentedon Apr 15, 2024
Payment Summary
@akinwale — paid $500 via Upwork
CortneyOfstad commentedon Apr 15, 2024
Regression test created here — https://github.com/Expensify/Expensify/issues/387839. Closing!