diff --git a/packages/studio-base/src/i18n/en/panels.ts b/packages/studio-base/src/i18n/en/panels.ts index c9765b8d05..4c5ea31cbd 100644 --- a/packages/studio-base/src/i18n/en/panels.ts +++ b/packages/studio-base/src/i18n/en/panels.ts @@ -50,8 +50,8 @@ export const panels = { teleopDescription: "Teleoperate a robot over a live connection.", topicGraph: "Topic Graph", topicGraphDescription: "Display a graph of active nodes, topics, and services.", - triggerButton: "Custom: Trigger Button", - triggerButtonDescription: "Button to call std_srvs/Trigger.", + serviceButton: "Custom: Service Button", + serviceButtonDescription: "Button to call std_srvs/Trigger.", userScripts: "User Scripts", userScriptsDescription: "Write custom data transformations in TypeScript. Previously known as Node Playground.", diff --git a/packages/studio-base/src/panels/EStop/EStop.tsx b/packages/studio-base/src/panels/EStop/EStop.tsx index 46db6c8a8e..f214238e5c 100644 --- a/packages/studio-base/src/panels/EStop/EStop.tsx +++ b/packages/studio-base/src/panels/EStop/EStop.tsx @@ -365,7 +365,7 @@ function EStopContent( borderRadius: "0.3rem", }} > - {eStopAction?.toUpperCase() ?? "Wait for feedback"} + {eStopAction?.toUpperCase() ?? "Waiting..."} diff --git a/packages/studio-base/src/panels/TriggerButton/TriggerButton.tsx b/packages/studio-base/src/panels/ServiceButton/ServiceButton.tsx similarity index 94% rename from packages/studio-base/src/panels/TriggerButton/TriggerButton.tsx rename to packages/studio-base/src/panels/ServiceButton/ServiceButton.tsx index 9343580bda..23146c12e9 100644 --- a/packages/studio-base/src/panels/TriggerButton/TriggerButton.tsx +++ b/packages/studio-base/src/panels/ServiceButton/ServiceButton.tsx @@ -9,7 +9,7 @@ import { makeStyles } from "tss-react/mui"; import Log from "@foxglove/log"; import { PanelExtensionContext, SettingsTreeAction } from "@foxglove/studio"; import Stack from "@foxglove/studio-base/components/Stack"; -import { Config } from "@foxglove/studio-base/panels/TriggerButton/types"; +import { Config } from "@foxglove/studio-base/panels/ServiceButton/types"; import ThemeProvider from "@foxglove/studio-base/theme/ThemeProvider"; import { defaultConfig, settingsActionReducer, useSettingsTree } from "./settings"; @@ -88,17 +88,17 @@ function parseInput(value: string): { error?: string; parsedObject?: unknown } { } // Wrapper component with ThemeProvider so useStyles in the panel receives the right theme. -export function TriggerButton({ context }: Props): JSX.Element { +export function ServiceButton({ context }: Props): JSX.Element { const [colorScheme, setColorScheme] = useState("light"); return ( - + ); } -function TriggerButtonContent( +function ServiceButtonContent( props: Props & { setColorScheme: Dispatch> }, ): JSX.Element { const { context, setColorScheme } = props; @@ -163,7 +163,7 @@ function TriggerButtonContent( return undefined; }, [context, config.serviceName]); - const canTriggerButton = Boolean( + const canServiceButton = Boolean( context.callService != undefined && config.requestPayload && config.serviceName && @@ -171,7 +171,7 @@ function TriggerButtonContent( state?.status !== "requesting", ); - const triggerButtonClicked = useCallback(async () => { + const serviceButtonClicked = useCallback(async () => { if (!context.callService) { setState({ status: "error", value: "The data source does not allow calling services" }); return; @@ -263,13 +263,13 @@ function TriggerButtonContent( {statusMessage} )} - +