Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.54k stars 2.89k forks source link

[HOLD for payment 2023-10-18] [$500] Web - Cursor Remains as Hand Icon on Checkbox in "Paid By" Section During Split Bill #28064

Closed kbecciv closed 11 months ago

kbecciv commented 1 year ago

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. Click on FAB and select "Send Message"
  2. Add two emails and create a group with the two emails
  3. Inside the chat, click on the plus sign and select "Split Bill"
  4. Add the desired amount and click "Next"
  5. Hover over email (cursor is disabled)
  6. Hover over the checkbox (cursor changes to hand icon, but remains delectable)

Expected Result:

When hovering over the checkbox in the "Paid By" section during split bill, the cursor should be disabled, just like when hovering over the associated email.

Actual Result:

While hovering over the email, the cursor is properly disabled. However, when hovering over the checkboxes, the cursor changes to a hand icon during split bill.

Workaround:

Unknown

Platforms:

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

Version Number: 1.3.73.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

https://github.com/Expensify/App/assets/93399543/52729e0f-869a-4063-8694-7243168c3c52

https://github.com/Expensify/App/assets/93399543/1d6eec3e-54f6-429c-aa36-7a95b6febe00

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e8f7be88bc37af93
  • Upwork Job ID: 1705585682941407232
  • Last Price Increase: 2023-09-30
  • Automatic offers:
    • aimane-chnaif | Reviewer | 27031408
    • esh-g | Contributor | 27031411
    • tewodrosGirmaA | Reporter | 27031412
esh-g commented 1 year ago

Proposal

Please re-state the issue

Cursor is not disabled in SelectCircle when the option is disabled.

What is the root cause of this issue?

The reason that the cursor is disabled on the rest of the row option is because we are passing the isDisabled prop to the PressableWithFeedback component wrapping the whole OptionRow. https://github.com/Expensify/App/blob/5aa7f6da94ddb1c8ca55a6cce714555f819c1dd0/src/components/OptionRow.js#L199

We are not passing the isDisabled prop to the PressableWithFeedback which wraps the SelectCircle component here: https://github.com/Expensify/App/blob/5aa7f6da94ddb1c8ca55a6cce714555f819c1dd0/src/components/OptionRow.js#L286-L292

What changes do you think should be made to fix this problem?

We should pass the isDisabled prop the same way we pass it to the root PressableWithFeedback of the OptionRow as mentioned in the root cause.

Optional: We can also pass isDisabled prop to the Button element (the one which says 'split' or 'add to group' in the options) for consistency but since I don't see a case where the row with a button will be disabled, this is not required.

What other alternative options did you explore? (Optional)

c3024 commented 1 year ago

Proposal

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

The paid by row Pressable is disabled but hand cursor is shown on the selectRow even though it is unclickable

What is the root cause of that problem?

We are not disabling this Pressable https://github.com/Expensify/App/blob/ee023d8ab36dd722a465c89bf4edff1b8e79aadf/src/components/OptionRow.js#L286-L292 like we do here https://github.com/Expensify/App/blob/ee023d8ab36dd722a465c89bf4edff1b8e79aadf/src/components/OptionRow.js#L199

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

We should use the same disabling here https://github.com/Expensify/App/blob/ee023d8ab36dd722a465c89bf4edff1b8e79aadf/src/components/OptionRow.js#L288 for this Pressable as well.

What alternative solutions did you explore? (Optional)

melvin-bot[bot] commented 1 year ago

Job added to Upwork: https://www.upwork.com/jobs/~01e8f7be88bc37af93

melvin-bot[bot] commented 1 year ago

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

melvin-bot[bot] commented 1 year ago

Bug0 Triage Checklist (Main S/O)

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @tjferriss (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

melvin-bot[bot] commented 1 year ago

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

DylanDylann commented 1 year ago

Proposal

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

Cursor Remains as Hand Icon on Checkbox in "Paid By" Section During Split Bill

What is the root cause of that problem?

We are using disable props for OptionRow https://github.com/Expensify/App/blob/5aa7f6da94ddb1c8ca55a6cce714555f819c1dd0/src/components/OptionRow.js#L199

But we don't do that for the checkbox https://github.com/Expensify/App/blob/5aa7f6da94ddb1c8ca55a6cce714555f819c1dd0/src/components/OptionRow.js#L286-L293

It causes the consistency

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

First, Let's see the transaction report, If we hover detail transactions, it display default cursor

Screenshot 2023-09-24 at 01 46 52

and cancelled task case: https://expensify.slack.com/archives/C049HHMV9SM/p1695024078116809?thread_ts=1694080698.301029&cid=C049HHMV9SM In this case, we also should use the default cursor instead of disabled cursor for all option row (include checkbox) if want to disable that.

To do that:

  1. remove disable prop here https://github.com/Expensify/App/blob/5aa7f6da94ddb1c8ca55a6cce714555f819c1dd0/src/components/OptionRow.js#L199
  2. replace this style
    (!this.props.onSelectRow || this.props.isDisabled) ? styles.cursorDefault : null,

in https://github.com/Expensify/App/blob/5aa7f6da94ddb1c8ca55a6cce714555f819c1dd0/src/components/OptionRow.js#L208 and add in https://github.com/Expensify/App/blob/5aa7f6da94ddb1c8ca55a6cce714555f819c1dd0/src/components/OptionRow.js#L286

What alternative solutions did you explore? (Optional)

JawadSadiq01 commented 1 year ago

Proposal

Please re-state the problem that we are trying to solve in this issue. Cursor Remains as Hand Icon on Checkbox in "Paid By" Section During Split Bill

What is the root cause of that problem? SelectCircle is a re-usable common component. It's only working with one prop name as isChecked. There is nothing else, that tells either its disable or clickable.

What changes do you think we should make in order to solve the problem? You just have to add one more prop into SelectCircle that tells, either its active or disabled.

Do the followings;

1. You have to pass a disable prop with a particular name(I named that isDisabled) from OptionsRow Component(line#291).

<SelectCircle isChecked={this.props.isSelected} isDisabled={this.props.isDisabled} />

image

2. Apply this isDisable prop inside the SelectCircle Component

import React from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import styles from '../styles/styles';
import Icon from './Icon';
import * as Expensicons from './Icon/Expensicons';
import themeColors from '../styles/themes/default';

const propTypes = {
    /** Should we show the checkmark inside the circle */
    isChecked: PropTypes.bool,
    isDisabled: PropTypes.bool,
};

const defaultProps = {
    isChecked: false,
    isDisabled: false,
};

function SelectCircle(props) {
    return (
        <View style={[styles.selectCircle, styles.alignSelfCenter, props.isDisabled ? styles.disableSelectCircle : '']}>
            {props.isChecked && (
                <Icon
                    src={Expensicons.Checkmark}
                    fill={themeColors.iconSuccessFill}
                />
            )}
        </View>
    );
}

SelectCircle.propTypes = propTypes;
SelectCircle.defaultProps = defaultProps;
SelectCircle.displayName = 'SelectCircle';

export default SelectCircle;
image

3. Make another style object(I name as disabledSelectCircle) inside styles.js file

disableSelectCircle: {
        ...cursor.cursorDisabled,
},
image

What alternative solutions did you explore? (Optional) NA

Video Attachment

https://github.com/Expensify/App/assets/135354140/adf46228-aa7c-4670-bb9a-738dcb18fdca

tjferriss commented 1 year ago

@muttmuure it looks like MelvinBot assigned me after you. I'm going to un-assign myself.

astrohunter62 commented 1 year ago

Proposal

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

The cursor remains a hand icon when hovering over the checkbox in the 'Paid By' section during the Split bill process.

What is the root cause of that problem?

In the OptionRow component, there's a missing pass of the 'disabled' props to the SelectCircle component wrapped within PressableWithFeedback.

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

We can pass the 'disabled' props to PressableWithFeedback.

<PressableWithFeedback
    onPress={() => this.props.onSelectedStatePressed(this.props.option)}
    accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
    accessibilityLabel={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
    disabled={this.state.isDisabled}
>
    <SelectCircle isChecked={this.props.isSelected} />
</PressableWithFeedback>

Result:

28064(chrome).webm

28064(safari).webm

melvin-bot[bot] commented 1 year ago

@muttmuure, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] commented 1 year ago

πŸ“£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πŸ’Έ

melvin-bot[bot] commented 1 year ago

@muttmuure, @aimane-chnaif Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] commented 1 year ago

@muttmuure, @aimane-chnaif 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

muttmuure commented 1 year ago

@aimane-chnaif 3 proposals to review when you have time. Thank you!

aimane-chnaif commented 1 year ago

@esh-g's proposal looks good to me. πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed

melvin-bot[bot] commented 1 year ago

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

melvin-bot[bot] commented 1 year ago

πŸ“£ @aimane-chnaif πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reviewer role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

melvin-bot[bot] commented 1 year ago

πŸ“£ @esh-g πŸŽ‰ An offer has been automatically sent to your Upwork account for the Contributor role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

melvin-bot[bot] commented 1 year ago

πŸ“£ @tewodrosGirmaA πŸŽ‰ An offer has been automatically sent to your Upwork account for the Reporter role πŸŽ‰ Thanks for contributing to the Expensify app!

Offer link Upwork job

lakchote commented 1 year ago

@esh-g's proposal LGTM.

esh-g commented 1 year ago

Thanks @lakchote Here is the PR: https://github.com/Expensify/App/pull/28850 πŸš€

cc @aimane-chnaif

melvin-bot[bot] commented 1 year ago

🎯 ⚑️ Woah @aimane-chnaif / @esh-g, great job pushing this forwards! ⚑️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus πŸŽ‰

On to the next one πŸš€

melvin-bot[bot] commented 1 year ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 1 year ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.80-3 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-18. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

melvin-bot[bot] commented 1 year ago

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:

lakchote commented 1 year ago

@aimane-chnaif please complete the checklist in order to close the issue.

aimane-chnaif commented 1 year ago

No need regression test

aimane-chnaif commented 1 year ago

@lakchote can you please re-open the issue? I haven't received payment yet

tewodrosGirmaA commented 1 year ago

@lakchote can you please re-open the issue? I haven't received payment yet

muttmuure commented 1 year ago

Contracts extended

aimane-chnaif commented 1 year ago

@muttmuure there's contract already - https://github.com/Expensify/App/issues/28064#issuecomment-1748110387

aimane-chnaif commented 12 months ago

This is eligible for bonus

muttmuure commented 12 months ago

Bonus sent

tewodrosGirmaA commented 12 months ago

Hello @muttmuure, I have not received payment?

tewodrosGirmaA commented 12 months ago

Hello @muttmuure, I have not received payment?

esh-g commented 12 months ago

@muttmuure I still haven't received the payment as well...

muttmuure commented 12 months ago

Oops, sorry!

muttmuure commented 12 months ago

Offers sent

tewodrosGirmaA commented 12 months ago

Offers sent

Thank you @muttmuure I accepted the offer

esh-g commented 12 months ago

Thanks, accepted the offer @muttmuure

esh-g commented 11 months ago

@muttmuure Please also make sure to check the bonus... thanks

lakchote commented 11 months ago

@muttmuure were you able to check the bonus? Thanks!

muttmuure commented 11 months ago

$750 inc Bonus paid to @esh-g @tewodrosGirmaA also paid