Skip to content

Commit

Permalink
fix(labware-library): fix ssr hydration bug, module product links, ne…
Browse files Browse the repository at this point in the history
…st lw links, armadillo clone (#13083)

Fix bug where in the rehydration step of conditionally rendered react children would replace server
rendered elements with the wrong client rendered elements. Fix product links to opentrons module
pages in nav. Replace all broken nest labware productlinks . duplicate armadillo pcr plate
definition in favor of opentrons branded and retire old def

Closes RLAB-334, RLAB-330, RLAB-277, RLAB-230
  • Loading branch information
b-cooper authored Jul 13, 2023
1 parent cb2a7be commit 3b743c0
Show file tree
Hide file tree
Showing 75 changed files with 2,248 additions and 209 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1564,9 +1564,7 @@
"brand": {
"brand": "NEST",
"brandId": ["402501"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
]
"links": ["https://www.nest-biotech.com/pcr-plates/58773587.html"]
},
"parameters": {
"format": "96Standard",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"brand": "NEST",
"brandId": ["360102"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=102"
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@
"360102"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=102"
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@
"360102"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=102"
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3310,7 +3310,7 @@
"601052"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=110"
"https://www.nest-biotech.com/centrifuge-tube/59282837.html"
]
},
"wells": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4531,7 +4531,7 @@
"503001"
],
"links": [
"http://www.cell-nest.com/page94?product_id=101&_l=en"
"https://www.nest-biotech.com/deep-well-plates/59253726.html"
]
},
"wells": [
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3866,7 +3866,7 @@
"360102"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=102"
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
Expand Down Expand Up @@ -4171,7 +4171,7 @@
"402501"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
"https://www.nest-biotech.com/pcr-plates/58773587.html"
]
},
"metadata": {
Expand Down Expand Up @@ -6192,7 +6192,7 @@
"402501"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
"https://www.nest-biotech.com/pcr-plates/58773587.html"
]
},
"wells": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3866,7 +3866,7 @@
"360102"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=102"
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
Expand Down Expand Up @@ -4171,7 +4171,7 @@
"402501"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
"https://www.nest-biotech.com/pcr-plates/58773587.html"
]
},
"metadata": {
Expand Down Expand Up @@ -6192,7 +6192,7 @@
"402501"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
"https://www.nest-biotech.com/pcr-plates/58773587.html"
]
},
"wells": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3224,7 +3224,7 @@
"360102"
],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=102"
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3399,7 +3399,7 @@
"503001"
],
"links": [
"http://www.cell-nest.com/page94?product_id=101&_l=en"
"https://www.nest-biotech.com/deep-well-plates/59253726.html"
]
},
"wells": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@
"brand": {
"brand": "NEST",
"brandId": ["360103"],
"links": ["http://www.cell-nest.com/page94?_l=en&product_id=102"]
"links": ["https://www.nest-biotech.com/reagent-reserviors/59178414.html"]
},
"metadata": {
"displayName": "NEST 1 Well Reservoir 195 mL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1503,9 +1503,7 @@
"brand": {
"brand": "NEST",
"brandId": ["402501"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
]
"links": ["https://www.nest-biotech.com/pcr-plates/58773587.html"]
},
"parameters": {
"format": "96Standard",
Expand Down Expand Up @@ -2544,9 +2542,7 @@
"brand": {
"brand": "NEST",
"brandId": ["402501"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
]
"links": ["https://www.nest-biotech.com/pcr-plates/58773587.html"]
},
"parameters": {
"format": "96Standard",
Expand Down Expand Up @@ -4594,7 +4590,7 @@
"brand": "NEST",
"brandId": ["402501"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
"https://www.nest-biotech.com/pcr-plates/58773587.html"
]
}
}
Expand Down Expand Up @@ -4634,7 +4630,9 @@
"brand": {
"brand": "NEST",
"brandId": ["360103"],
"links": ["http://www.cell-nest.com/page94?_l=en&product_id=102"]
"links": [
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"parameters": {
"format": "trough",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3477,7 +3477,9 @@ export const mockRecentAnalysis = {
brand: {
brand: 'NEST',
brandId: ['503501', '503001'],
links: ['http://www.cell-nest.com/page94?product_id=101&_l=en'],
links: [
'https://www.nest-biotech.com/deep-well-plates/59253726.html',
],
},
},
],
Expand Down Expand Up @@ -5418,7 +5420,9 @@ export const mockProtocolModuleInfo = [
brand: {
brand: 'NEST',
brandId: ['503501', '503001'],
links: ['http://www.cell-nest.com/page94?product_id=101&_l=en'],
links: [
'https://www.nest-biotech.com/deep-well-plates/59253726.html',
],
},
},
],
Expand Down
8 changes: 6 additions & 2 deletions app/src/organisms/ProtocolSetupLabware/__fixtures__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3477,7 +3477,9 @@ export const mockRecentAnalysis = {
brand: {
brand: 'NEST',
brandId: ['503501', '503001'],
links: ['http://www.cell-nest.com/page94?product_id=101&_l=en'],
links: [
'https://www.nest-biotech.com/deep-well-plates/59253726.html',
],
},
},
],
Expand Down Expand Up @@ -5418,7 +5420,9 @@ export const mockProtocolModuleInfo = [
brand: {
brand: 'NEST',
brandId: ['503501', '503001'],
links: ['http://www.cell-nest.com/page94?product_id=101&_l=en'],
links: [
'https://www.nest-biotech.com/deep-well-plates/59253726.html',
],
},
},
],
Expand Down
4 changes: 3 additions & 1 deletion app/src/organisms/RunDetails/__fixtures__/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -2707,7 +2707,9 @@
"brand": {
"brand": "NEST",
"brandId": ["360102"],
"links": ["http://www.cell-nest.com/page94?_l=en&product_id=102"]
"links": [
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"parameters": {
"format": "trough",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3456,9 +3456,7 @@
"brand": {
"brand": "NEST",
"brandId": ["402501"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
]
"links": ["https://www.nest-biotech.com/pcr-plates/58773587.html"]
},
"wells": [
"A1",
Expand Down Expand Up @@ -3589,7 +3587,9 @@
"brand": {
"brand": "NEST",
"brandId": ["360102"],
"links": ["http://www.cell-nest.com/page94?_l=en&product_id=102"]
"links": [
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
"displayName": "NEST 12 Well Reservoir 15 mL",
Expand Down Expand Up @@ -4658,9 +4658,7 @@
"brand": {
"brand": "NEST",
"brandId": ["402501"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
]
"links": ["https://www.nest-biotech.com/pcr-plates/58773587.html"]
},
"wells": [
"A1",
Expand Down Expand Up @@ -4792,9 +4790,7 @@
"brand": {
"brand": "NEST",
"brandId": ["402501"],
"links": [
"http://www.cell-nest.com/page94?_l=en&product_id=97&product_category=96"
]
"links": ["https://www.nest-biotech.com/pcr-plates/58773587.html"]
},
"metadata": {
"displayName": "NEST 96 Well Plate 100 µL PCR Full Skirt",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2921,7 +2921,9 @@
"brand": {
"brand": "NEST",
"brandId": ["360102"],
"links": ["http://www.cell-nest.com/page94?_l=en&product_id=102"]
"links": [
"https://www.nest-biotech.com/reagent-reserviors/59178414.html"
]
},
"metadata": {
"displayName": "NEST 12 Well Reservoir 15 mL",
Expand Down
8 changes: 4 additions & 4 deletions labware-library/src/components/App/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ import styles from './styles.css'

export interface PageProps {
scrollRef: React.RefObject<HTMLDivElement>
detailPage: boolean
isDetailPage: boolean
sidebar: React.ReactNode
content: React.ReactNode
}

export function Page(props: PageProps): JSX.Element {
const { scrollRef, detailPage, sidebar, content } = props
const { scrollRef, isDetailPage, sidebar, content } = props

return (
<div className={styles.page}>
<div className={styles.content_scroller} ref={scrollRef}>
<div className={styles.content_width_limiter}>
<div
className={cx(styles.sidebar_container, {
[styles.is_detail_page]: detailPage,
[styles.is_detail_page]: isDetailPage,
})}
>
{sidebar}
</div>
<section
className={cx(styles.content_container, {
[styles.is_detail_page]: detailPage,
[styles.is_detail_page]: isDetailPage,
})}
>
{content}
Expand Down
4 changes: 2 additions & 2 deletions labware-library/src/components/App/__tests__/Page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Page', () => {
scrollRef={{ current: null }}
sidebar="foo"
content="bar"
detailPage={false}
isDetailPage={false}
/>
)

Expand All @@ -26,7 +26,7 @@ describe('Page', () => {
scrollRef={{ current: null }}
sidebar="foo"
content="bar"
detailPage={true}
isDetailPage={true}
/>
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ exports[`App component renders with definition 1`] = `
className="app is_detail_page"
>
<Nav />
<Breadcrumbs />
<Breadcrumbs
show={true}
/>
<Page
content={
<LabwareDetails
Expand All @@ -21,7 +23,7 @@ exports[`App component renders with definition 1`] = `
}
/>
}
detailPage={true}
isDetailPage={true}
scrollRef={
Object {
"current": null,
Expand All @@ -46,6 +48,9 @@ exports[`App component renders without definition 1`] = `
className="app"
>
<Nav />
<Breadcrumbs
show={false}
/>
<Page
content={
<LabwareList
Expand All @@ -57,7 +62,7 @@ exports[`App component renders without definition 1`] = `
}
/>
}
detailPage={false}
isDetailPage={false}
scrollRef={
Object {
"current": null,
Expand Down
Loading

0 comments on commit 3b743c0

Please sign in to comment.