Skip to content

Commit

Permalink
Merge branch 'chore_release-pd-8.4.0' into mergeback_release-pd-840_i…
Browse files Browse the repository at this point in the history
…nto_edge
  • Loading branch information
ncdiehl11 committed Feb 6, 2025
2 parents 73b70f4 + 09e127d commit 058b72b
Show file tree
Hide file tree
Showing 61 changed files with 1,535 additions and 510 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('ListButton', () => {
it('should render correct style - noActive', () => {
render(props)
const listButton = screen.getByTestId('ListButton_noActive')
expect(listButton).toHaveStyle(`backgroundColor: ${COLORS.grey30}`)
expect(listButton).toHaveStyle(`backgroundColor: ${COLORS.grey20}`)
})
it('should render correct style - connected', () => {
props.type = 'connected'
Expand Down
10 changes: 8 additions & 2 deletions components/src/atoms/ListButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ const LISTBUTTON_PROPS_BY_TYPE: Record<
{ backgroundColor: string; hoverBackgroundColor: string }
> = {
noActive: {
backgroundColor: COLORS.grey30,
hoverBackgroundColor: COLORS.grey35,
backgroundColor: COLORS.grey20,
hoverBackgroundColor: COLORS.grey30,

Check warning on line 27 in components/src/atoms/ListButton/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/atoms/ListButton/index.tsx#L26-L27

Added lines #L26 - L27 were not covered by tests
},
connected: {
backgroundColor: COLORS.green30,
Expand Down Expand Up @@ -60,13 +60,19 @@ export function ListButton(props: ListButtonProps): JSX.Element {
? COLORS.grey20
: listButtonProps.hoverBackgroundColor};
}
&:focus-visible {
outline: 2px solid ${COLORS.blue50};

Check warning on line 65 in components/src/atoms/ListButton/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/atoms/ListButton/index.tsx#L65

Added line #L65 was not covered by tests
outline-offset: 0.25rem;
}
`

return (
<Flex
data-testid={`ListButton_${type}`}
onClick={onClick}
css={LIST_BUTTON_STYLE}
tabIndex={0}

Check warning on line 75 in components/src/atoms/ListButton/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/atoms/ListButton/index.tsx#L75

Added line #L75 was not covered by tests
{...styleProps}
>
{children}
Expand Down
5 changes: 2 additions & 3 deletions components/src/atoms/buttons/EmptySelectorButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
ALIGN_CENTER,
CURSOR_DEFAULT,
CURSOR_POINTER,
FLEX_MAX_CONTENT,
Icon,
JUSTIFY_CENTER,
JUSTIFY_START,
Expand Down Expand Up @@ -62,8 +61,8 @@ interface ButtonProps {

const StyledButton = styled.button<ButtonProps>`
border: none;
width: ${FLEX_MAX_CONTENT};
height: ${FLEX_MAX_CONTENT};
width: 100%;
height: 100%;
cursor: ${CURSOR_POINTER};
background-color: ${COLORS.blue30};
border-radius: ${BORDERS.borderRadius8};
Expand Down
4 changes: 3 additions & 1 deletion components/src/atoms/buttons/LargeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ export function LargeButton(props: LargeButtonProps): JSX.Element {
border: ${buttonType === 'stroke'
? `2px solid ${COLORS.blue55}`
: `${computedBorderStyle()}`};
: buttonType === 'primary'
? `4px solid ${COLORS.blue55}`
: computedBorderStyle()};

Check warning on line 211 in components/src/atoms/buttons/LargeButton.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/atoms/buttons/LargeButton.tsx#L209-L211

Added lines #L209 - L211 were not covered by tests
}
&:focus-visible {
Expand Down
21 changes: 15 additions & 6 deletions components/src/molecules/DropdownMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { LiquidIcon } from '../LiquidIcon'
import { DeckInfoLabel } from '../DeckInfoLabel'

import type { FocusEventHandler } from 'react'
import type { FlattenSimpleInterpolation } from 'styled-components'

export interface DropdownOption {
name: string
Expand Down Expand Up @@ -268,7 +269,7 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
>
<StyledText
desktopStyle="captionRegular"
css={LINE_CLAMP_TEXT_STYLE}
css={LINE_CLAMP_TEXT_STYLE(1)}

Check warning on line 272 in components/src/molecules/DropdownMenu/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/molecules/DropdownMenu/index.tsx#L272

Added line #L272 was not covered by tests
>
{currentOption.name}
</StyledText>
Expand Down Expand Up @@ -327,12 +328,15 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
flexDirection={DIRECTION_COLUMN}
gridGap={option.subtext != null ? SPACING.spacing4 : '0'}
>
<StyledText desktopStyle="captionRegular">
<StyledText
desktopStyle="captionRegular"
css={LINE_CLAMP_TEXT_STYLE(3)}

Check warning on line 333 in components/src/molecules/DropdownMenu/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/molecules/DropdownMenu/index.tsx#L331-L333

Added lines #L331 - L333 were not covered by tests
>
{option.name}
</StyledText>
<StyledText
desktopStyle="captionRegular"
color={COLORS.black70}
color={COLORS.grey60}

Check warning on line 339 in components/src/molecules/DropdownMenu/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/molecules/DropdownMenu/index.tsx#L339

Added line #L339 was not covered by tests
>
{option.subtext}
</StyledText>
Expand Down Expand Up @@ -363,12 +367,17 @@ export function DropdownMenu(props: DropdownMenuProps): JSX.Element {
)
}

const LINE_CLAMP_TEXT_STYLE = css`
export const LINE_CLAMP_TEXT_STYLE = (
lineClamp?: number,
title?: boolean
): FlattenSimpleInterpolation => css`

Check warning on line 373 in components/src/molecules/DropdownMenu/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/molecules/DropdownMenu/index.tsx#L370-L373

Added lines #L370 - L373 were not covered by tests
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: ${OVERFLOW_HIDDEN};
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp: 1;
word-break: break-all;
-webkit-line-clamp: ${lineClamp ?? 1};
word-break: ${title === true
? 'normal'
: 'break-all'}; // normal for tile and break-all for a non word case like aaaaaaaa

Check warning on line 382 in components/src/molecules/DropdownMenu/index.tsx

View check run for this annotation

Codecov / codecov/patch

components/src/molecules/DropdownMenu/index.tsx#L379-L382

Added lines #L379 - L382 were not covered by tests
`
146 changes: 146 additions & 0 deletions protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"form": [],
"timeline": []
},
"dismissedWarnings": {

Check failure on line 28 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

Duplicate object key

Check failure on line 28 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

Duplicate object key
"form": [],
"timeline": []
},
"ingredients": {
"0": {
"displayName": "Water",
Expand Down Expand Up @@ -116,6 +120,86 @@
"volume": 100
}
}
"A1": {

Check failure on line 123 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 123 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"0": {
"volume": 100
}
},
"B1": {
"0": {
"volume": 100
}
},
"C1": {
"0": {
"volume": 100
}
},
"D1": {
"0": {
"volume": 100
}
},
"E1": {
"0": {
"volume": 100
}
},
"F1": {
"0": {
"volume": 100
}
},
"G1": {
"0": {
"volume": 100
}
},
"H1": {
"0": {
"volume": 100
}
},
"A2": {
"0": {
"volume": 100
}
},
"B2": {
"0": {
"volume": 100
}
},
"C2": {
"0": {
"volume": 100
}
},
"D2": {
"0": {
"volume": 100
}
},
"E2": {
"0": {
"volume": 100
}
},
"F2": {
"0": {
"volume": 100
}
},
"G2": {
"0": {
"volume": 100
}
},
"H2": {
"0": {
"volume": 100
}
}
}
},
"savedStepForms": {
Expand Down Expand Up @@ -1336,6 +1420,11 @@
"y": 0,
"z": 0
}
"cornerOffsetFromSlot": {

Check failure on line 1423 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 1423 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"x": 0,
"y": 0,
"z": 0
}
},
"opentrons/nest_96_wellplate_100ul_pcr_full_skirt/1": {
"ordering": [
Expand Down Expand Up @@ -2236,6 +2325,9 @@
},
"groups": [
{
"metadata": {
"wellBottomShape": "v"
},
"metadata": {
"wellBottomShape": "v"
},
Expand Down Expand Up @@ -2354,6 +2446,11 @@
"y": 0,
"z": 0
}
"cornerOffsetFromSlot": {

Check failure on line 2449 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 2449 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"x": 0,
"y": 0,
"z": 0
}
},
"opentrons/opentrons_24_aluminumblock_generic_2ml_screwcap/1": {
"ordering": [
Expand Down Expand Up @@ -2647,13 +2744,23 @@
"brandId": [],
"links": []
}
"brand": {

Check failure on line 2747 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 2747 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"brand": "generic",
"brandId": [],
"links": []
}
}
],
"cornerOffsetFromSlot": {
"x": 0,
"y": 0,
"z": 0
}
"cornerOffsetFromSlot": {

Check failure on line 2759 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 2759 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"x": 0,
"y": 0,
"z": 0
}
}
},
"liquidSchemaId": "opentronsLiquidSchemaV1",
Expand Down Expand Up @@ -2683,6 +2790,9 @@
"location": {
"slotName": "1"
},
"location": {
"slotName": "1"
},
"moduleId": "0b419310-75c7-11ea-b42f-4b64e50f43e5:magneticModuleType"
}
},
Expand All @@ -2694,6 +2804,9 @@
"location": {
"slotName": "3"
},
"location": {
"slotName": "3"
},
"moduleId": "0b4319b0-75c7-11ea-b42f-4b64e50f43e5:temperatureModuleType"
}
},
Expand All @@ -2709,6 +2822,9 @@
"location": {
"slotName": "2"
}
"location": {

Check failure on line 2825 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 2825 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"slotName": "2"
}
}
},
{
Expand Down Expand Up @@ -2813,6 +2929,11 @@
"x": 0,
"y": 0
}
"offset": {

Check failure on line 2932 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 2932 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"z": 1,
"x": 0,
"y": 0
}
},
"flowRate": 46.43
}
Expand All @@ -2832,6 +2953,11 @@
"x": 0,
"y": 0
}
"offset": {

Check failure on line 2956 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 2956 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"z": 0.5,
"x": 0,
"y": 0
}
},
"flowRate": 46.43
}
Expand All @@ -2847,6 +2973,11 @@
"y": 0,
"z": 0
},
"offset": {
"x": 0,
"y": 0,
"z": 0
},
"alternateDropLocation": true
}
},
Expand Down Expand Up @@ -2881,6 +3012,11 @@
"x": 0,
"y": 0
}
"offset": {

Check failure on line 3015 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 3015 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"z": 1,
"x": 0,
"y": 0
}
},
"flowRate": 46.43
}
Expand All @@ -2900,6 +3036,11 @@
"x": 0,
"y": 0
}
"offset": {

Check failure on line 3039 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.

Check failure on line 3039 in protocol-designer/fixtures/protocol/8/doItAllV4MigratedToV8.json

View workflow job for this annotation

GitHub Actions / js checks

',' expected.
"z": 0.5,
"x": 0,
"y": 0
}
},
"flowRate": 46.43
}
Expand All @@ -2915,6 +3056,11 @@
"y": 0,
"z": 0
},
"offset": {
"x": 0,
"y": 0,
"z": 0
},
"alternateDropLocation": true
}
},
Expand Down
Loading

0 comments on commit 058b72b

Please sign in to comment.