Skip to content

Commit b02ea35

Browse files
Rename some.
1 parent a4431d4 commit b02ea35

File tree

1 file changed

+23
-19
lines changed
  • protocol-designer/src/components/organisms/BonusStepModal

1 file changed

+23
-19
lines changed

protocol-designer/src/components/organisms/BonusStepModal/index.tsx

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,27 @@ interface HandleAddPauseClickProps {
2929
type BonusStepModalProps =
3030
| ({
3131
modalType:
32-
| 'temperatureModule'
33-
| 'heaterShaker'
34-
| 'thermocyclerBlock'
35-
| 'thermocyclerLid'
32+
| 'explainWaitForTemperatureModuleTemp'
33+
| 'explainWaitForHeaterShakerTemp'
34+
| 'explainWaitForThermocyclerBlockTemp'
35+
| 'explainWaitForThermocyclerLidTemp'
3636
displayTemperature: string
3737
} & HandleAddPauseClickProps)
3838
| ({
39-
modalType: 'thermocyclerProfile'
39+
modalType: 'explainWaitForThermocyclerProfile'
4040
displayTemperature?: null
4141
} & HandleAddPauseClickProps)
4242
| ({
43-
// todo(mm, 2025-09-26): Delete legacy mode when enableConcurrentModuleActions FF is deleted.
44-
modalType: 'legacy'
43+
// todo(mm, 2025-09-26): Delete this modal type when enableConcurrentModuleActions FF is deleted
44+
// and this is no longer used.
45+
modalType: 'optionallyWaitForTemp'
4546
displayTemperature: string
4647
displayModule: string
4748
} & HandleAddPauseClickProps &
4849
HandleSkipPauseClickProps)
4950

51+
export type BonusStepModalType = BonusStepModalProps['modalType']
52+
5053
/**
5154
* Implements the several modals that are like "you just saved a set-temperature step,
5255
* would you like to also add a pause step."
@@ -58,8 +61,9 @@ export const BonusStepModal = (
5861
const { t } = useTranslation()
5962
const [rememberDismissal, setRememberDismissal] = useState(false)
6063

61-
// todo(mm, 2025-09-29): Delete legacy mode when enableConcurrentModuleActions FF is deleted.
62-
if (modalType === 'legacy') {
64+
// todo(mm, 2025-09-26): Delete this modal type when enableConcurrentModuleActions FF is deleted
65+
// and this is no longer used.
66+
if (modalType === 'optionallyWaitForTemp') {
6367
const {
6468
displayModule,
6569
displayTemperature,
@@ -113,15 +117,15 @@ export const BonusStepModal = (
113117

114118
const titleKey: string = (() => {
115119
switch (modalType) {
116-
case 'temperatureModule':
120+
case 'explainWaitForTemperatureModuleTemp':
117121
return 'modal:auto_add_pause_until_temp_step.temperature_module.title'
118-
case 'heaterShaker':
122+
case 'explainWaitForHeaterShakerTemp':
119123
return 'modal:auto_add_pause_until_temp_step.heater_shaker.title'
120-
case 'thermocyclerBlock':
124+
case 'explainWaitForThermocyclerBlockTemp':
121125
return 'modal:auto_add_pause_until_temp_step.thermocycler_block.title'
122-
case 'thermocyclerLid':
126+
case 'explainWaitForThermocyclerLidTemp':
123127
return 'modal:auto_add_pause_until_temp_step.thermocycler_lid.title'
124-
case 'thermocyclerProfile':
128+
case 'explainWaitForThermocyclerProfile':
125129
return 'modal:auto_add_pause_until_temp_step.thermocycler_profile.title'
126130
// default omitted, for exhaustiveness checking.
127131
}
@@ -130,15 +134,15 @@ export const BonusStepModal = (
130134

131135
const bodyParagraphsKey: string = (() => {
132136
switch (modalType) {
133-
case 'temperatureModule':
137+
case 'explainWaitForTemperatureModuleTemp':
134138
return 'modal:auto_add_pause_until_temp_step.temperature_module.body'
135-
case 'heaterShaker':
139+
case 'explainWaitForHeaterShakerTemp':
136140
return 'modal:auto_add_pause_until_temp_step.heater_shaker.body'
137-
case 'thermocyclerBlock':
141+
case 'explainWaitForThermocyclerBlockTemp':
138142
return 'modal:auto_add_pause_until_temp_step.thermocycler_block.body'
139-
case 'thermocyclerLid':
143+
case 'explainWaitForThermocyclerLidTemp':
140144
return 'modal:auto_add_pause_until_temp_step.thermocycler_lid.body'
141-
case 'thermocyclerProfile':
145+
case 'explainWaitForThermocyclerProfile':
142146
return 'modal:auto_add_pause_until_temp_step.thermocycler_profile.body'
143147
// default omitted, for exhaustiveness checking.
144148
}

0 commit comments

Comments
 (0)