Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Resize contextual help popup for widget error messages #995

Merged
merged 2 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions plugins/ui/src/js/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,11 @@
overflow: hidden;
width: 100%;
}

.ui-widget-error-contextual-help {
section[class*='spectrum-ContextualHelp-dialog'] {
// Our error messages can be quite large. The default size of the contextual help is only 250px and is too small.
// Just set a size automatically based on the content.
width: auto;
mofojed marked this conversation as resolved.
Show resolved Hide resolved
}
}
5 changes: 4 additions & 1 deletion plugins/ui/src/js/src/widget/WidgetErrorView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ export function WidgetErrorView({
<Flex direction="column" gap="size-150">
<Text UNSAFE_className="ui-text-wrap-balance">
{shortMessage}
<ContextualHelp variant="info">
<ContextualHelp
variant="info"
UNSAFE_className="ui-widget-error-contextual-help"
>
<Heading>
{name}{' '}
<CopyButton
Expand Down
Loading