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

[$1000] Separator line removes margin from either side on hover #17535

Closed
1 of 6 tasks
kavimuru opened this issue Apr 17, 2023 · 16 comments
Closed
1 of 6 tasks

[$1000] Separator line removes margin from either side on hover #17535

kavimuru opened this issue Apr 17, 2023 · 16 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kavimuru
Copy link

kavimuru commented Apr 17, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to settings -> Preferences
  2. Priority mode
  3. Hover on both option and observe Separator

Expected Result:

Separator should maintain margin from left and right

Actual Result:

Separator line removes margin from either side on hover.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.0
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
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-04-16.at.7.28.25.PM.mov
Recording.254.mp4

Expensify/Expensify Issue URL:
Issue reported by: @DinalJivani
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681653552296999

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01627ca117ea2d2ea0
  • Upwork Job ID: 1672220019786428416
  • Last Price Increase: 2023-06-23
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 17, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@daraksha-dk
Copy link
Contributor

daraksha-dk commented Apr 19, 2023

Proposal

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

Separator line removes margin from either side on hover

What is the root cause of that problem?

We're using horizontal padding for styles.ph5 for parent container and disabling padding for row's padding then only increasing the width using negative margin and padding when option is hovered like here which makes it look like separator's length increases.
I think we should increase the separator's length to full cover the full width which will resolve this issue.

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

This happens for both Language and Priority Mode Pages.
We can fix this by completing removing shouldDisableRowInnerPadding & contentContainerStyles props and defining optionHoveredStyle like below for PriorityModePage & LanguagePage :

                optionHoveredStyle={styles.hoveredComponentBG}

Demo

Screen.Recording.2023-04-19.at.8.19.58.PM.mov

@melvin-bot melvin-bot bot added the Overdue label Apr 20, 2023
@isabelastisser
Copy link
Contributor

Reviewing this now.

@melvin-bot melvin-bot bot removed the Overdue label Apr 20, 2023
@isabelastisser isabelastisser added the Needs Reproduction Reproducible steps needed label Apr 20, 2023
@isabelastisser
Copy link
Contributor

I cannot reproduce this!

@daraksha-dk
Copy link
Contributor

@isabelastisser I'm still able to reproduce this on production (v1.3.3-2)

Screen.Recording.2023-04-24.at.6.38.42.PM.mov

@DinalJivani
Copy link

@isabelastisser
I just rechecked, I am still able to Reproduce.

See the Left and Right side of Separator line between Most recent & #focus

You will see when I hover First item it shows Margin for separator from both Right and Left and when I hover on Second item there is no margin from Right and Left.

Screen.Recording.2023-04-27.at.2.26.29.PM.mov

@Beamanator
Copy link
Contributor

I see this too still :D

@Beamanator Beamanator reopened this Jun 23, 2023
@melvin-bot melvin-bot bot added the Overdue label Jun 23, 2023
@Beamanator Beamanator added the External Added to denote the issue can be worked on by a contributor label Jun 23, 2023
@melvin-bot melvin-bot bot changed the title Separator line removes margin from either side on hover [$1000] Separator line removes margin from either side on hover Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01627ca117ea2d2ea0

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

Current assignee @isabelastisser is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 23, 2023

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

@shawnborton
Copy link
Contributor

I don't think this is a bug, and we are actually going to just get rid of the separator line with some upcoming list refactors. So I say let's just close this out.

@Beamanator Beamanator removed the Needs Reproduction Reproducible steps needed label Jun 23, 2023
@Beamanator
Copy link
Contributor

Aah ok @shawnborton - do you know if we have any issue we can link here to show the plan? Maybe not necessary but could be helpful

@melvin-bot melvin-bot bot removed the Overdue label Jun 23, 2023
@shawnborton
Copy link
Contributor

I believe this is it: #11795

@nitin-kukreti
Copy link

nitin-kukreti commented Jun 23, 2023

Proposal


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

Separator line removes margin from either side on hover

What is the root cause of that problem?

The root cause of the problem seems to be related to the inconsistent dimensions between the hover box and the specified borderTop styling. This inconsistency results in the outlined border extending beyond its intended size when the hover event occurs.

  <PressableWithFeedback
                            ref={(el) => (pressableRef = el)}
                            onPress={(e) => {
                                if (!this.props.onSelectRow) {
                                    return;
                                }

                                this.setState({isDisabled: true});
                                if (e) {
                                    e.preventDefault();
                                }
                                let result = this.props.onSelectRow(this.props.option, pressableRef);
                                if (!(result instanceof Promise)) {
                                    result = Promise.resolve();
                                }
                                InteractionManager.runAfterInteractions(() => {
                                    result.finally(() => this.setState({isDisabled: this.props.isDisabled}));
                                });
                            }}
                            disabled={this.state.isDisabled}
                            style={[
                                styles.flexRow,
                                styles.alignItemsCenter,
                                styles.justifyContentBetween,
                                styles.sidebarLink,
                                this.props.shouldDisableRowInnerPadding ? null : styles.sidebarLinkInner,
                                this.props.optionIsFocused ? styles.sidebarLinkActive : null,
                                this.props.shouldHaveOptionSeparator && styles.borderTop,    // This line is root cause of problem on hover it it will expand
                                !this.props.onSelectRow && !this.props.isDisabled ? styles.cursorDefault : null,
                            ]}
                            accessibilityLabel={this.props.option.text}
                            accessibilityRole="button"
                            hoverDimmingValue={1}
                            hoverStyle={this.props.hoverStyle}
                            focusStyle={this.props.hoverStyle}
                        >

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

If you want to ensure that the outlined component's dimensions remain unaffected when hovering, one solution is to create a dedicated component specifically for the outlined border. This way, the dimensions of the outlined component will remain consistent, and you can apply hover effects to a separate component without impacting the outlined border.

 <View style={[this.props.shouldHaveOptionSeparator && styles.borderTop]}></View>

Before Fixed

Screencast.from.23-06-23.11.53.17.PM.IST.webm

After Fixed

Screencast.from.23-06-23.11.54.45.PM.IST.webm

@Serg-Kochkin
Copy link

A simple fix is to remove a border-top (as a separator) style from "PressableWithFeedback" to the child "View" component at OptionRow.js:

<View style={[sidebarInnerRowStyle, this.props.shouldHaveOptionSeparator && styles.borderTop]}>

This should fix, please take a look at the video.

Serhiy.Kochkin.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

10 participants