You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-10-12] [$500] Web - Focus outline for checkbox not aligned with border in TaskView #27872
Go to FAB > Assign task. Enter title, share somewhere and create a new task.
In task view, click on composer and press shift + TAB 4 times (or more if there are comments in report).
Notice that, focus outline is not aligned with border, radius is less for outline.
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?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
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
changed the title [-]Web - Focus outline for checkbox not aligned with border in TaskView[/-][+][$500] Web - Focus outline for checkbox not aligned with border in TaskView[/+]on Sep 20, 2023
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 -
So, except TaskView, outline is aligned for all checkboxes since they have 4pxborder-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 border-radius of PressableWithFeedback dynamic by making it 2px more than the border-radius of Checkbox. For this, we can make a function in StyleUtils similar to getCheckboxContainerStyle which was created for dynamic border-radius for checkbox.
Then, we can remove checkboxPressable styles from styles.jshere and use the above utility function instead -
<PressableWithFeedbackdisabled={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 CheckboxonKeyDown={handleSpaceKey}accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}accessibilityState={{checked: props.isChecked}}accessibilityLabel={props.accessibilityLabel}pressDimmingValue={1}>
What alternative solutions did you explore? (Optional)
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 -
So, except TaskView, outline is aligned for all checkboxes since they have 4pxborder-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 border-radius of PressableWithFeedback dynamic by making it 2px more than the border-radius of Checkbox. For this, we can make a function in StyleUtils similar to getCheckboxContainerStyle which was created for dynamic border-radius for checkbox.
Then, we can remove checkboxPressable styles from styles.jshere and use the above utility function instead -
<PressableWithFeedbackdisabled={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 CheckboxonKeyDown={handleSpaceKey}accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}accessibilityState={{checked: props.isChecked}}accessibilityLabel={props.accessibilityLabel}pressDimmingValue={1}>
What alternative solutions did you explore? (Optional)
Activity
[-]Web - Focus outline for checkbox not aligned with border in TaskView[/-][+][$500] Web - Focus outline for checkbox not aligned with border in TaskView[/+]melvin-bot commentedon Sep 20, 2023
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 20, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01d815e4b5fabb24f4
melvin-bot commentedon Sep 20, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Sep 20, 2023
Triggered auto assignment to @jliexpensify (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.melvin-bot commentedon Sep 20, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)kbecciv commentedon Sep 20, 2023
Proposal by: @Nikhil-Vats
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695154519892849
Proposal
Please 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
border-radiusof8px. We pass it via props.App/src/components/ReportActionItem/TaskView.js
Line 92 in 6d67552
In all other places, we use the default
border-radiusfor checkbox that is4px.App/src/components/Checkbox.js
Line 65 in 6d67552
In order for the outline to be aligned, the
border-radiusforPressableWithFeedback(ancestor of Checkbox) should be2pxmore than theborder-radiusofCheckboxbut right nowborder-radiusofPressableWithFeedbackis fixed -App/src/styles/styles.js
Lines 2642 to 2643 in 6d67552
So, except
TaskView, outline is aligned for all checkboxes since they have4pxborder-radius.This was finalized in this PR but
TaskViewcomponent 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
border-radiusofPressableWithFeedbackdynamic by making it2pxmore than theborder-radiusofCheckbox. For this, we can make a function inStyleUtilssimilar to getCheckboxContainerStyle which was created for dynamicborder-radiusfor checkbox.Then, we can remove
checkboxPressablestyles fromstyles.jshere and use the above utility function instead -What alternative solutions did you explore? (Optional)
NA
Result -
https://github.com/Expensify/App/assets/31413407/48c6ec3d-c302-47ba-8d72-b2ef2c88fbad
Nikhil-Vats commentedon Sep 20, 2023
Reposting the proposal as the video is not visible in the one above.
Proposal
Please 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
border-radiusof8px. We pass it via props.App/src/components/ReportActionItem/TaskView.js
Line 92 in 6d67552
In all other places, we use the default
border-radiusfor checkbox that is4px.App/src/components/Checkbox.js
Line 65 in 6d67552
In order for the outline to be aligned, the
border-radiusforPressableWithFeedback(ancestor of Checkbox) should be2pxmore than theborder-radiusofCheckboxbut right nowborder-radiusofPressableWithFeedbackis fixed -App/src/styles/styles.js
Lines 2642 to 2643 in 6d67552
So, except
TaskView, outline is aligned for all checkboxes since they have4pxborder-radius.This was finalized in this PR but
TaskViewcomponent 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
border-radiusofPressableWithFeedbackdynamic by making it2pxmore than theborder-radiusofCheckbox. For this, we can make a function inStyleUtilssimilar to getCheckboxContainerStyle which was created for dynamicborder-radiusfor checkbox.Then, we can remove
checkboxPressablestyles fromstyles.jshere and use the above utility function instead -What alternative solutions did you explore? (Optional)
NA
Result -
Screen.Recording.2023-09-20.at.2.04.16.AM.mov
29 remaining items
melvin-bot commentedon Oct 16, 2023
@deetergp, @sonialiap, @jjcoffee, @Nikhil-Vats Whoops! This issue is 2 days overdue. Let's get this updated quick!
sonialiap commentedon Oct 17, 2023
@jjcoffee review + bonus = $750 - paid ✔️
@Nikhil-Vats report + fix + bonus = $800 - offer sent
melvin-bot commentedon Oct 17, 2023
Triggered auto assignment to @jliexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.sonialiap commentedon Oct 17, 2023
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
jjcoffee commentedon Oct 17, 2023
@jliexpensify Offer accepted!
sonialiap commentedon Oct 17, 2023
I've issued payment to Joel ✔️
Nikhil-Vats commentedon Oct 17, 2023
@sonialiap @jliexpensify I have accepted the offer.
jliexpensify commentedon Oct 17, 2023
Paid and job closed!