From 91c760a5bcdf75b2785b2a5333a767d9913ab837 Mon Sep 17 00:00:00 2001 From: naumov Date: Tue, 30 Apr 2024 14:15:52 +0200 Subject: [PATCH 1/2] CB-5085 make errors focusable --- webapp/packages/core-blocks/src/DisplayError.tsx | 2 +- webapp/packages/core-blocks/src/ErrorMessage.tsx | 12 +++++++----- .../src/TableViewer/TableError.tsx | 16 +++++++++++++--- .../plugin-user-profile/src/UserInfo.tsx | 9 +++++++-- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/webapp/packages/core-blocks/src/DisplayError.tsx b/webapp/packages/core-blocks/src/DisplayError.tsx index 3cac7b7421..8d9407c781 100644 --- a/webapp/packages/core-blocks/src/DisplayError.tsx +++ b/webapp/packages/core-blocks/src/DisplayError.tsx @@ -29,7 +29,7 @@ export const DisplayError = observer(function DisplayError({ root, childr const stack = errorInfo?.componentStack || error?.stack; return ( -
+

Something went wrong.

diff --git a/webapp/packages/core-blocks/src/ErrorMessage.tsx b/webapp/packages/core-blocks/src/ErrorMessage.tsx index 94c9f4a1ad..71a222ea0f 100644 --- a/webapp/packages/core-blocks/src/ErrorMessage.tsx +++ b/webapp/packages/core-blocks/src/ErrorMessage.tsx @@ -6,13 +6,13 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; + import { Button } from './Button'; +import styles from './ErrorMessage.m.css'; import { IconOrImage } from './IconOrImage'; import { useTranslate } from './localization/useTranslate'; -import { useS } from './useS'; - -import styles from './ErrorMessage.m.css'; import { s } from './s'; +import { useS } from './useS'; interface Props { hasDetails?: boolean; @@ -26,9 +26,11 @@ export const ErrorMessage = observer(function ErrorMessage({ text, classN const style = useS(styles); return ( -
+
-
{text}
+
+ {text} +
{hasDetails && (