From 4149efd0e4ddbb522913113c67420f68abe765f4 Mon Sep 17 00:00:00 2001 From: Daniel Echlin Date: Thu, 19 Dec 2024 15:17:07 -0500 Subject: [PATCH] fix error formatting --- .../browser-repl/src/components/shell-output-line.tsx | 4 ++-- .../src/components/types/error-output.tsx | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/browser-repl/src/components/shell-output-line.tsx b/packages/browser-repl/src/components/shell-output-line.tsx index 6234ec75c..7367c1d7c 100644 --- a/packages/browser-repl/src/components/shell-output-line.tsx +++ b/packages/browser-repl/src/components/shell-output-line.tsx @@ -19,8 +19,8 @@ const shellOutputLine = css({ }); const shellOutputLineError = css({ - backgroundColor: palette.red.light2, - color: palette.red.dark3, + backgroundColor: 'inherit', + color: palette.red.light1, }); const shellOutputLineIcon = css({ diff --git a/packages/browser-repl/src/components/types/error-output.tsx b/packages/browser-repl/src/components/types/error-output.tsx index 2d410a060..2e5562220 100644 --- a/packages/browser-repl/src/components/types/error-output.tsx +++ b/packages/browser-repl/src/components/types/error-output.tsx @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { isShouldReportAsBugError } from '@mongosh/errors'; +import { css, cx, palette } from '@mongodb-js/compass-components'; import { SimpleTypeOutput } from './simple-type-output'; import { Expandable } from '../utils/expandable'; @@ -10,6 +11,14 @@ interface ErrorOutputProps { value: any; } +const errInfo = css({ + pre: { + borderLeft: '3px solid', + paddingLeft: '0px', + borderColor: palette.red.light2, + }, +}); + export class ErrorOutput extends Component { static propTypes = { value: PropTypes.any, @@ -87,7 +96,7 @@ export class ErrorOutput extends Component { return (
{this.renderCollapsed(toggle)} -
+
{this.formatErrorBugReportInfo()} {this.formatErrorInfo()} {this.formatErrorResult()}