Skip to content

Commit

Permalink
refactor(app): border radius overrides feedback (#14680)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjhuff authored and Carlos-fernandez committed May 20, 2024
1 parent a66f6a0 commit f1de923
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 20 deletions.
4 changes: 2 additions & 2 deletions app/src/atoms/MenuList/OverflowBtn.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { css } from 'styled-components'
import { Btn, COLORS, SPACING } from '@opentrons/components'
import { Btn, BORDERS, COLORS, SPACING } from '@opentrons/components'

export const OverflowBtn: (
props: React.ComponentProps<typeof Btn>,
Expand All @@ -13,7 +13,7 @@ export const OverflowBtn: (
return (
<Btn
css={css`
border-radius: ${SPACING.spacing4};
border-radius: ${BORDERS.borderRadius8};
max-height: ${SPACING.spacing32};
&:hover {
Expand Down
4 changes: 2 additions & 2 deletions app/src/molecules/ToggleGroup/useToggleGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ const BUTTON_GROUP_STYLES = css`
}
button:first-child {
border-radius: ${BORDERS.borderRadius4} 0 0 ${BORDERS.borderRadius8};
border-radius: ${BORDERS.borderRadius8} 0 0 ${BORDERS.borderRadius8};
border-right: none;
}
button:last-child {
border-radius: 0 ${BORDERS.borderRadius4} ${BORDERS.borderRadius8} 0;
border-radius: 0 ${BORDERS.borderRadius8} ${BORDERS.borderRadius8} 0;
border-left: none;
}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function AddFixtureModal({
justifyContent={JUSTIFY_SPACE_BETWEEN}
padding={`${SPACING.spacing8} ${SPACING.spacing16}`}
backgroundColor={COLORS.grey20}
borderRadius={BORDERS.borderRadius8}
borderRadius={BORDERS.borderRadius4}
>
<StyledText css={TYPOGRAPHY.pSemiBold}>
{fixtureDisplayName}
Expand Down Expand Up @@ -253,7 +253,7 @@ export function AddFixtureModal({
const FIXTURE_BUTTON_STYLE = css`
background-color: ${COLORS.grey35};
cursor: default;
border-radius: ${BORDERS.borderRadiusFull};
border-radius: ${BORDERS.borderRadius16};
box-shadow: none;
&:focus {
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/Navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const TouchNavLink = styled(NavLink)`
`

const IconButton = styled('button')`
border-radius: ${SPACING.spacing4};
border-radius: ${BORDERS.borderRadius8};
max-height: 100%;
background-color: ${COLORS.white};
Expand Down
2 changes: 1 addition & 1 deletion app/src/organisms/ProtocolSetupLabware/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ function RowLabware({
<Flex
alignItems={ALIGN_CENTER}
backgroundColor={COLORS.grey35}
borderRadius={BORDERS.borderRadius16}
borderRadius={BORDERS.borderRadius8}
padding={`${SPACING.spacing16} ${SPACING.spacing24}`}
gridGap={SPACING.spacing32}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ function ModuleTableItem({
? COLORS.grey35
: COLORS.yellow35
}
borderRadius={BORDERS.borderRadius12}
borderRadius={BORDERS.borderRadius8}
cursor={isDuplicateModuleModel ? 'pointer' : 'inherit'}
gridGap={SPACING.spacing24}
padding={`${SPACING.spacing16} ${SPACING.spacing24}`}
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/TaskList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function SubTask({
? BORDERS.activeLineBorder
: `1px solid ${COLORS.grey30}`
}
borderRadius={BORDERS.borderRadius4}
borderRadius={BORDERS.borderRadius8}
gridGap={SPACING.spacing24}
width="100%"
>
Expand Down Expand Up @@ -366,7 +366,7 @@ function Task({
border={
isActiveTask && !isTaskOpen ? BORDERS.activeLineBorder : undefined
}
borderRadius={BORDERS.borderRadius4}
borderRadius={BORDERS.borderRadius8}
width="100%"
>
<Flex
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/Devices/RobotSettings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export function RobotSettings(): JSX.Element | null {
<Box minWidth={SIZE_6} height="max-content" padding={SPACING.spacing16}>
<Flex
backgroundColor={COLORS.white}
borderRadius={BORDERS.borderRadius4}
borderRadius={BORDERS.borderRadius8}
flexDirection={DIRECTION_COLUMN}
marginBottom={SPACING.spacing16}
minHeight="calc(100vh - 3.5rem)"
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/Labware/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export function Labware(): JSX.Element {
<Flex
flexDirection={DIRECTION_ROW}
alignItems={ALIGN_CENTER}
borderRadius={BORDERS.borderRadius4}
borderRadius={BORDERS.borderRadius8}
marginLeft={SPACING.spacing8}
css={SORT_BY_BUTTON_STYLE}
onClick={toggleSetShowSortByMenu}
Expand Down
2 changes: 1 addition & 1 deletion app/src/pages/ProtocolDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const Summary = ({ author, description, date }: SummaryProps): JSX.Element => {
</StyledText>
<Flex
backgroundColor={COLORS.grey35}
borderRadius={BORDERS.borderRadius4}
borderRadius={BORDERS.borderRadius8}
marginTop={SPACING.spacing24}
width="max-content"
padding={`${SPACING.spacing8} ${SPACING.spacing12}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { fireEvent, screen } from '@testing-library/react'
import '@testing-library/jest-dom/vitest'
import { ALIGN_CENTER, JUSTIFY_CENTER } from '../../../styles'
import { renderWithProviders } from '../../../testing/utils'
import { COLORS } from '../../../helix-design-system'
import { BORDERS, COLORS } from '../../../helix-design-system'
import { TYPOGRAPHY, SPACING } from '../../../ui-style-constants'
import { CheckboxField } from '..'

Expand Down Expand Up @@ -43,7 +43,9 @@ describe('CheckboxField', () => {
expect(checkBoxIcon).toHaveStyle(`min-width: 1.25rem`)
expect(checkBoxIcon).toHaveStyle(`color: ${String(COLORS.grey60)}`)
expect(checkBoxIcon).toHaveStyle(`display: flex`)
expect(checkBoxIcon).toHaveStyle(`border-radius: 1px`)
expect(checkBoxIcon).toHaveStyle(
`border-radius: ${String(BORDERS.borderRadius2)}`
)
expect(checkBoxIcon).toHaveStyle(
`justify-content: ${String(JUSTIFY_CENTER)}`
)
Expand Down Expand Up @@ -82,7 +84,9 @@ describe('CheckboxField', () => {
expect(checkBoxIcon).toHaveStyle(`min-width: 1.25rem`)
expect(checkBoxIcon).toHaveStyle(`color: ${String(COLORS.blue60)}`)
expect(checkBoxIcon).toHaveStyle(`display: flex`)
expect(checkBoxIcon).toHaveStyle(`border-radius: 1px`)
expect(checkBoxIcon).toHaveStyle(
`border-radius: ${String(BORDERS.borderRadius2)}`
)
expect(checkBoxIcon).toHaveStyle(
`justify-content: ${String(JUSTIFY_CENTER)}`
)
Expand All @@ -97,7 +101,9 @@ describe('CheckboxField', () => {
expect(checkBoxIcon).toHaveStyle(`min-width: 1.25rem`)
expect(checkBoxIcon).toHaveStyle(`color: ${String(COLORS.grey60)}`)
expect(checkBoxIcon).toHaveStyle(`display: flex`)
expect(checkBoxIcon).toHaveStyle(`border-radius: 1px`)
expect(checkBoxIcon).toHaveStyle(
`border-radius: ${String(BORDERS.borderRadius2)}`
)
expect(checkBoxIcon).toHaveStyle(
`justify-content: ${String(JUSTIFY_CENTER)}`
)
Expand Down
4 changes: 2 additions & 2 deletions components/src/atoms/CheckboxField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const INNER_STYLE_VALUE = css`
min-width: ${SPACING.spacing20};
color: ${COLORS.blue50};
display: flex;
border-radius: 1px;
border-radius: ${BORDERS.borderRadius2};
justify-content: ${JUSTIFY_CENTER};
align-items: ${ALIGN_CENTER};
Expand All @@ -76,7 +76,7 @@ const INNER_STYLE_NO_VALUE = css`
min-width: ${SPACING.spacing20};
color: ${COLORS.grey50};
display: flex;
border-radius: 1px;
border-radius: ${BORDERS.borderRadius2};
justify-content: ${JUSTIFY_CENTER};
align-items: ${ALIGN_CENTER};
Expand Down

0 comments on commit f1de923

Please sign in to comment.