Closed kbecciv closed 11 months ago
Cursor is not disabled in SelectCircle
when the option is disabled.
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
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.
The paid by row Pressable is disabled but hand cursor is shown on the selectRow even though it is unclickable
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
We should use the same disabling here
https://github.com/Expensify/App/blob/ee023d8ab36dd722a465c89bf4edff1b8e79aadf/src/components/OptionRow.js#L288
for this Pressable
as well.
Job added to Upwork: https://www.upwork.com/jobs/~01e8f7be88bc37af93
Triggered auto assignment to @muttmuure (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)Triggered auto assignment to @tjferriss (External
), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External
)
Cursor Remains as Hand Icon on Checkbox in "Paid By" Section During Split Bill
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
First, Let's see the transaction report, If we hover detail transactions, it display default cursor
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:
(!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
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} />
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;
3. Make another style object(I name as disabledSelectCircle) inside styles.js file
disableSelectCircle: {
...cursor.cursorDisabled,
},
What alternative solutions did you explore? (Optional) NA
Video Attachment
https://github.com/Expensify/App/assets/135354140/adf46228-aa7c-4670-bb9a-738dcb18fdca
@muttmuure it looks like MelvinBot assigned me after you. I'm going to un-assign myself.
The cursor remains a hand icon when hovering over the checkbox in the 'Paid By' section during the Split bill process.
In the OptionRow
component, there's a missing pass of the 'disabled' props to the SelectCircle
component wrapped within PressableWithFeedback
.
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:
@muttmuure, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
@muttmuure, @aimane-chnaif Still overdue 6 days?! Let's take care of this!
@muttmuure, @aimane-chnaif 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
@aimane-chnaif 3 proposals to review when you have time. Thank you!
@esh-g's proposal looks good to me. π π π C+ reviewed
Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @aimane-chnaif π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @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 π
π£ @tewodrosGirmaA π An offer has been automatically sent to your Upwork account for the Reporter role π Thanks for contributing to the Expensify app!
@esh-g's proposal LGTM.
Thanks @lakchote Here is the PR: https://github.com/Expensify/App/pull/28850 π
cc @aimane-chnaif
π― β‘οΈ 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 π
Reviewing
label has been removed, please complete the "BugZero Checklist".
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:
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:
@aimane-chnaif please complete the checklist in order to close the issue.
No need regression test
@lakchote can you please re-open the issue? I haven't received payment yet
@lakchote can you please re-open the issue? I haven't received payment yet
Contracts extended
@muttmuure there's contract already - https://github.com/Expensify/App/issues/28064#issuecomment-1748110387
This is eligible for bonus
Bonus sent
Hello @muttmuure, I have not received payment?
Hello @muttmuure, I have not received payment?
@muttmuure I still haven't received the payment as well...
Oops, sorry!
Offers sent
Offers sent
Thank you @muttmuure I accepted the offer
Thanks, accepted the offer @muttmuure
@muttmuure Please also make sure to check the bonus... thanks
@muttmuure were you able to check the bonus? Thanks!
$750 inc Bonus paid to @esh-g @tewodrosGirmaA also paid
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:
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