-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2023-10-12] [$500] Web - Focus outline for checkbox not aligned with border in TaskView #27872
Comments
Triggered auto assignment to @sonialiap ( |
Job added to Upwork: https://www.upwork.com/jobs/~01d815e4b5fabb24f4 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @jliexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
Proposal by: @Nikhil-Vats ProposalPlease re-state the problem that we are trying to solve in this issue.Focus outline for checkbox is not aligned with border in TaskView. It is aligned at all other places. What is the root cause of that problem?In TaskView, size of checkbox is larger than all other places so we use larger
In all other places, we use the default border-radius for checkbox that is 4px .App/src/components/Checkbox.js Line 65 in 6d67552
In order for the outline to be aligned, the border-radius for PressableWithFeedback (ancestor of Checkbox) should be 2px more than the border-radius of Checkbox but right now border-radius of PressableWithFeedback is fixed -Lines 2642 to 2643 in 6d67552
So, except TaskView , outline is aligned for all checkboxes since they have 4px border-radius .This was finalized in this PR but TaskView component was redesigned later and the checkbox size was made larger without keeping outline in mind which created this bug.
What changes do you think we should make in order to solve the problem?We need to make the /**
* Returns the checkbox pressable style
*/
function getCheckboxPressableStyle(borderRadius: number): ViewStyle | CSSProperties {
return {
padding: 2,
justifyContent: 'center',
alignItems: 'center',
// eslint-disable-next-line object-shorthand
borderRadius: borderRadius,
};
} Then, we can remove <PressableWithFeedback
disabled={props.disabled}
onPress={firePressHandlerOnClick}
onMouseDown={props.onMouseDown}
ref={props.forwardedRef}
style={[props.style, StyleUtils.getCheckboxPressableStyle(props.containerBorderRadius + 2)]} // to align outline, border-radius of pressable should be 2px more than Checkbox
onKeyDown={handleSpaceKey}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
accessibilityState={{checked: props.isChecked}}
accessibilityLabel={props.accessibilityLabel}
pressDimmingValue={1}
> What alternative solutions did you explore? (Optional)NA |
Reposting the proposal as the video is not visible in the one above. ProposalPlease re-state the problem that we are trying to solve in this issue.Focus outline for checkbox is not aligned with border in TaskView. It is aligned at all other places. What is the root cause of that problem?In TaskView, size of checkbox is larger than all other places so we use larger
In all other places, we use the default App/src/components/Checkbox.js Line 65 in 6d67552
In order for the outline to be aligned, the Lines 2642 to 2643 in 6d67552
So, except TaskView , outline is aligned for all checkboxes since they have 4px border-radius .
This was finalized in this PR but What changes do you think we should make in order to solve the problem?We need to make the /**
* Returns the checkbox pressable style
*/
function getCheckboxPressableStyle(borderRadius: number): ViewStyle | CSSProperties {
return {
padding: 2,
justifyContent: 'center',
alignItems: 'center',
// eslint-disable-next-line object-shorthand
borderRadius: borderRadius,
};
} Then, we can remove <PressableWithFeedback
disabled={props.disabled}
onPress={firePressHandlerOnClick}
onMouseDown={props.onMouseDown}
ref={props.forwardedRef}
style={[props.style, StyleUtils.getCheckboxPressableStyle(props.containerBorderRadius + 2)]} // to align outline, border-radius of pressable should be 2px more than Checkbox
onKeyDown={handleSpaceKey}
accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
accessibilityState={{checked: props.isChecked}}
accessibilityLabel={props.accessibilityLabel}
pressDimmingValue={1}
> What alternative solutions did you explore? (Optional)NA Result - Screen.Recording.2023-09-20.at.2.04.16.AM.mov |
Removing myself as I was the 2nd B0 assigned |
Reviewing on Monday! |
@Nikhil-Vats has a really nice clear proposal with the correct RCA and the solution makes sense, so happy to go with them! 🎀👀🎀 C+ reviewed |
Triggered auto assignment to @deetergp, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Thanks for a very nicely-written proposal, @Nikhil-Vats 👍 |
Working on the PR now and will have it ready for review tonight. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.77-7 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 2023-10-12. 🎊 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:
|
|
@sonialiap Checklist complete! |
@deetergp, @sonialiap, @jjcoffee, @Nikhil-Vats Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@jjcoffee review + bonus = $750 - paid ✔️ |
Triggered auto assignment to @jliexpensify ( |
I'm OOO Oct 16-23. Adding leave buddy @jliexpensify Requires payment once offers are accepted. Can be closed once paid https://www.upwork.com/ab/applicants/1704525429405278208/hired |
@jliexpensify Offer accepted! |
I've issued payment to Joel ✔️ |
@sonialiap @jliexpensify I have accepted the offer. |
Paid and job closed! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Radius of outline on focus should be aligned with border like we have for TaskPreview and all other components.
Actual Result:
Focus outline is not aligned with border.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.72.6
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
vid2.mov
vid1.mov
Expensify/Expensify Issue URL:
Issue reported by: @Nikhil-Vats
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695154519892849
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: