Skip to content

Commit 2d92ac9

Browse files
Update toasts and descs
1 parent 3f794cc commit 2d92ac9

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

fission/src/ui/modals/DevtoolZoneRemovalModal.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ const DevtoolZoneRemovalModal: React.FC<DevtoolZoneRemovalModalProps> = ({
3131
setIsRemoving(true)
3232
try {
3333
await onPermanentRemoval()
34-
globalAddToast?.("info", "Zone Removed", `${zoneName} has been permanently removed from dev tools.`)
34+
globalAddToast?.("info", "Zone Removed", `${zoneName} has been permanently removed from the field file.`)
3535
} catch (error) {
36-
globalAddToast?.("error", "Removal Failed", "Failed to permanently remove zone from dev tools cache.")
37-
console.error("Failed to remove zone from dev tools:", error)
36+
globalAddToast?.("error", "Removal Failed", "Failed to permanently remove zone from the field file cache.")
37+
console.error("Failed to remove zone from field file:", error)
3838
} finally {
3939
setIsRemoving(false)
4040
onClose()
@@ -47,7 +47,7 @@ const DevtoolZoneRemovalModal: React.FC<DevtoolZoneRemovalModalProps> = ({
4747
<DialogContent>
4848
<Stack spacing={2}>
4949
<Typography variant="body1">
50-
The {zoneType} zone "{zoneName}" was placed using dev tools and is cached.
50+
The {zoneType} zone "{zoneName}" was defined in the field file and is cached.
5151
</Typography>
5252
<Typography variant="body2" color="text.secondary">
5353
Choose how you'd like to remove it:
@@ -58,7 +58,7 @@ const DevtoolZoneRemovalModal: React.FC<DevtoolZoneRemovalModalProps> = ({
5858
reappear when you refresh or reload the field.
5959
</Typography>
6060
<Typography variant="body2">
61-
<strong>Permanent removal:</strong> Remove zone from dev tools cache. This will prevent it
61+
<strong>Permanent removal:</strong> Remove zone from the field file cache. This will prevent it
6262
from reappearing on future loads.
6363
</Typography>
6464
</Stack>

fission/src/util/DevtoolZoneUtils.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import World from "@/systems/World"
77
export type ZoneType = "scoring" | "protected"
88

99
/**
10-
* Checks if a zone was originally placed by dev tools by comparing it with the cached dev tool data.
10+
* Checks if a zone was originally defined in the field file by comparing it with the cached field data.
1111
*/
1212
export function isZoneFromDevtools(
1313
zone: ScoringZonePreferences | ProtectedZonePreferences,
@@ -33,14 +33,14 @@ export function isZoneFromDevtools(
3333
JSON.stringify(devZone.deltaTransformation) === JSON.stringify(zone.deltaTransformation)
3434
)
3535
} else {
36-
// For protected zones, we'd need to add dev tool support first
37-
// For now, return false as protected zones don't have dev tool support yet
36+
// For protected zones, we'd need to add field file support first
37+
// For now, return false as protected zones don't have field file support yet
3838
return false
3939
}
4040
}
4141

4242
/**
43-
* Removes a zone from dev tools cache permanently.
43+
* Removes a zone from the field file cache permanently.
4444
*/
4545
export async function removeZoneFromDevtools(
4646
zone: ScoringZonePreferences | ProtectedZonePreferences,
@@ -58,7 +58,7 @@ export async function removeZoneFromDevtools(
5858
const devtoolZones = editor.getUserData("devtool:scoring_zones") as ScoringZonePreferences[] | undefined
5959
if (!devtoolZones) return
6060

61-
// Remove the zone from dev tool data
61+
// Remove the zone from field file data
6262
const filteredZones = devtoolZones.filter(
6363
devZone =>
6464
!(
@@ -69,14 +69,14 @@ export async function removeZoneFromDevtools(
6969
)
7070
)
7171

72-
// Update the dev tool data
72+
// Update the field file data
7373
if (filteredZones.length === 0) {
7474
editor.removeUserData("devtool:scoring_zones")
7575
} else {
7676
editor.setUserData("devtool:scoring_zones", filteredZones)
7777
}
7878

79-
// Update field preferences to match the filtered dev tool data
79+
// Update field preferences to match the filtered field file data
8080
if (field.fieldPreferences) {
8181
field.fieldPreferences.scoringZones = filteredZones
8282
PreferencesSystem.savePreferences?.()
@@ -93,12 +93,12 @@ export async function removeZoneFromDevtools(
9393
}
9494
}
9595
} else {
96-
throw new Error("Protected zone dev tool removal not yet implemented")
96+
throw new Error("Protected zone field file removal not yet implemented")
9797
}
9898
}
9999

100100
/**
101-
* Gets all zones that exist in dev tools for a given type.
101+
* Gets all zones that exist in the field file for a given type.
102102
*/
103103
export function getDevtoolZones(zoneType: ZoneType): ScoringZonePreferences[] | ProtectedZonePreferences[] | undefined {
104104
const field = World.sceneRenderer.mirabufSceneObjects.getField()

0 commit comments

Comments
 (0)