Skip to content

[HOLD for payment 2023-07-17] [$1000] Web- Eye icon position not aligned and nothing happen on click of eye icon #22183

Closed

Description

@kbecciv

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 any chat
  2. Click on + icon and select Add attachment option
  3. Select password protected PDF
  4. Click on enter password button
  5. Click on eye icon

Expected Result:

Should show password on click of eye icon

Actual Result:

Eye icon position not aligned and nothing happen on click of eye icon

Workaround:

Unknown

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.36-2
Reproducible in staging?: n/a
Reproducible in production?: n/a
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-07-04.at.4.57.49.PM.mov

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0175d4f2d46ea957ec
  • Upwork Job ID: 1676995758027735040
  • Last Price Increase: 2023-07-06

Activity

  1. added
    Daily
    Needs Reproduction
    Bug
    on Jul 4, 2023
  2. melvin-bot commented on Jul 4, 2023

    @melvin-bot

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

  3. melvin-bot commented on Jul 4, 2023

    @melvin-bot

    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
  4. Nikhil-Vats commented on Jul 4, 2023

    @Nikhil-Vats
    Contributor

    Proposal

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

    Eye icon position is not aligned and nothing happens on click of eye icon in password protected PDF form.

    What is the root cause of that problem?

    styles.flex1 was removed from the container of eye icon in this PR which is why the icon is not in center anymore.

    {Boolean(props.secureTextEntry) && (
    <Checkbox
    style={styles.textInputIconContainer}
    onPress={togglePasswordVisibility}
    onMouseDown={(e) => e.preventDefault()}
    accessibilityLabel={props.translate('common.visible')}
    >
    <Icon
    src={passwordHidden ? Expensicons.Eye : Expensicons.EyeDisabled}
    fill={themeColors.icon}
    />
    </Checkbox>
    )}

    Nothing happens on clicking of eye icon since we are calling the setPasswordHidden in togglePasswordVisibility in the wrong way. prevState is not an object but is instead the current value of passwordHidden.

    const togglePasswordVisibility = useCallback(() => {
    setPasswordHidden((prevState) => !prevState.passwordHidden);
    }, []);

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

    We need to add styles.flex1 again in line 350 -

    style={[styles.flex1, styles.textInputIconContainer]}

    For fixing the click behaviour of eye icon, we need to call setPasswordHidden in the correct way in togglePasswordVisibility by not using prevState.passwordHidden and directly using prevState -

    We need to simply call it like -

    const togglePasswordVisibility = useCallback(() => { 
       setPasswordHidden((prevState) => !prevState); 
    }, []); 

    We can change the name of variable prevState to something else for better understanding.

    What alternative solutions did you explore? (Optional)

    NA

    Result -

    Screen.Recording.2023-07-04.at.8.50.55.PM.mov
  5. Nikhil-Vats commented on Jul 4, 2023

    @Nikhil-Vats
    Contributor

    This is a regression from #20186.

  6. added
    DeployBlockerCash
    and removed
    Needs Reproduction
    on Jul 6, 2023
  7. changed the title [-]Dev: Eye icon position not aligned and nothing happen on click of eye icon[/-] [+]Web- Eye icon position not aligned and nothing happen on click of eye icon[/+] on Jul 6, 2023
  8. 60 remaining items

  9. Santhosh-Sellavel commented on Jul 17, 2023

    @Santhosh-Sellavel
    Collaborator

    @michaelhaxhiu I will collect via ND

  10. Santhosh-Sellavel commented on Jul 17, 2023

    @Santhosh-Sellavel
    Collaborator

    @Julesssss This qualifies for Bonus too right?

  11. michaelhaxhiu commented on Jul 18, 2023

    @michaelhaxhiu
    Contributor

    @Santhosh-Sellavel yep just checked as part of the BZ payment step, and you are correct.

    Let's do payments now!

  12. michaelhaxhiu commented on Jul 18, 2023

    @michaelhaxhiu
    Contributor

    Payments:

  13. michaelhaxhiu commented on Jul 18, 2023

    @michaelhaxhiu
    Contributor

    @Santhosh-Sellavel will you require payment via newdot?

  14. Nikhil-Vats commented on Jul 18, 2023

    @Nikhil-Vats
    Contributor

    Offer accepted @michaelhaxhiu.

  15. michaelhaxhiu commented on Jul 18, 2023

    @michaelhaxhiu
    Contributor

    2/3 paid. Just waiting for Santhosh to confirm if he's gonna get paid via upwork or newdot.

  16. Santhosh-Sellavel commented on Jul 18, 2023

    @Santhosh-Sellavel
    Collaborator

    @michaelhaxhiu I will let you know here once done!

  17. michaelhaxhiu commented on Jul 18, 2023

    @michaelhaxhiu
    Contributor

    Please do!

  18. michaelhaxhiu commented on Jul 18, 2023

    @michaelhaxhiu
    Contributor

    I'll check your box last

  19. Santhosh-Sellavel commented on Jul 20, 2023

    @Santhosh-Sellavel
    Collaborator

    Requested on ND

  20. michaelhaxhiu commented on Jul 20, 2023

    @michaelhaxhiu
    Contributor

    Perfect

  21. anmurali commented on Jul 23, 2023

    @anmurali

    Approved $1500 to Santhosh based on #22183 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyEngineeringExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions