π OpenHands: AI-Driven Development
fix(frontend): set max width for toast messages (#13623)
Hiep Le4b69370c73e3
diff --git a/frontend/__tests__/utils/custom-toast-handlers.test.ts b/frontend/__tests__/utils/custom-toast-handlers.test.tsindex f8deebd6f6..610b238907 100644--- a/frontend/__tests__/utils/custom-toast-handlers.test.ts+++ b/frontend/__tests__/utils/custom-toast-handlers.test.ts@@ -29,7 +29,7 @@ describe("custom-toast-handlers", () => {duration: 5000, // Should use minimum duration of 5000msposition: "top-right",style: expect.objectContaining({- width: "400px",+ maxWidth: "400px",wordBreak: "break-word",}),}),@@ -47,7 +47,7 @@ describe("custom-toast-handlers", () => {duration: expect.any(Number),position: "top-right",style: expect.objectContaining({- width: "400px",+ maxWidth: "400px",wordBreak: "break-word",}),}),@@ -77,7 +77,7 @@ describe("custom-toast-handlers", () => {duration: 4000, // Should use minimum duration of 4000ms for errorsposition: "top-right",style: expect.objectContaining({- width: "400px",+ maxWidth: "400px",wordBreak: "break-word",}),}),@@ -95,7 +95,7 @@ describe("custom-toast-handlers", () => {duration: expect.any(Number),position: "top-right",style: expect.objectContaining({- width: "400px",+ maxWidth: "400px",wordBreak: "break-word",}),}),diff --git a/frontend/src/utils/custom-toast-handlers.tsx b/frontend/src/utils/custom-toast-handlers.tsxindex 73a956f4ed..44c847c697 100644--- a/frontend/src/utils/custom-toast-handlers.tsx+++ b/frontend/src/utils/custom-toast-handlers.tsx@@ -8,7 +8,7 @@ const TOAST_STYLE: CSSProperties = {border: "1px solid #717888",color: "#fff",borderRadius: "4px",- width: "400px",+ maxWidth: "400px",wordBreak: "break-word",overflowWrap: "anywhere",whiteSpace: "pre-wrap",