diff --git a/.gitignore b/.gitignore index 2652502a0263..67bc771f84c1 100644 --- a/.gitignore +++ b/.gitignore @@ -124,3 +124,4 @@ docker/*local* # Jest test report test-report.html superset/static/stats/statistics.html +.aider* diff --git a/superset-frontend/src/components/ErrorBoundary/index.tsx b/superset-frontend/src/components/ErrorBoundary/index.tsx index 2fec6a6767d3..2cf95f176ebd 100644 --- a/superset-frontend/src/components/ErrorBoundary/index.tsx +++ b/superset-frontend/src/components/ErrorBoundary/index.tsx @@ -24,6 +24,7 @@ export interface ErrorBoundaryProps { children: ReactNode; onError?: (error: Error, info: ErrorInfo) => void; showMessage?: boolean; + style?: React.CSSProperties; } interface ErrorBoundaryState { @@ -59,6 +60,7 @@ export default class ErrorBoundary extends Component< errorType={t('Unexpected error')} message={firstLine} descriptionDetails={info?.componentStack} + style={this.props.style} /> ); } diff --git a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx index 50f21bf0fd41..0d02694b9be5 100644 --- a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx +++ b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx @@ -35,6 +35,7 @@ export interface ErrorAlertProps { children?: React.ReactNode; // Additional content to show in the modal closable?: boolean; // Show close button, default true showIcon?: boolean; // Show icon, default true + style?: React.CSSProperties; } const ErrorAlert: React.FC = ({ @@ -49,6 +50,7 @@ const ErrorAlert: React.FC = ({ children, closable = true, showIcon = true, + style, }) => { const [isDescriptionVisible, setIsDescriptionVisible] = useState( !descriptionDetailsCollapsed, @@ -107,6 +109,7 @@ const ErrorAlert: React.FC = ({ type={type} showIcon closable={closable} + style={style} > {errorType} {message && ( diff --git a/superset-frontend/src/views/App.tsx b/superset-frontend/src/views/App.tsx index 8b4c5e801350..2f84f4bc34c2 100644 --- a/superset-frontend/src/views/App.tsx +++ b/superset-frontend/src/views/App.tsx @@ -28,7 +28,6 @@ import { bindActionCreators } from 'redux'; import { GlobalStyles } from 'src/GlobalStyles'; import ErrorBoundary from 'src/components/ErrorBoundary'; import Loading from 'src/components/Loading'; -import { Layout } from 'src/components'; import Menu from 'src/features/home/Menu'; import getBootstrapData from 'src/utils/getBootstrapData'; import ToastContainer from 'src/components/MessageToasts/ToastContainer'; @@ -83,13 +82,9 @@ const App = () => ( {routes.map(({ path, Component, props = {}, Fallback = Loading }) => ( }> - -
- - - -
-
+ + +
))}