Compare commits

...

6 Commits

View File

@ -110,6 +110,7 @@ export const FeatureTreePane = () => {
// devTools: true,
}
)
// If there are parse errors we show the last successful operations
// and overlay a message on top of the pane
const parseErrors = kclManager.errors.filter((e) => e.kind !== 'engine')
@ -163,12 +164,13 @@ export const FeatureTreePane = () => {
{!modelingState.matches('Sketch') && <DefaultPlanes />}
{parseErrors.length > 0 && (
<div
className={`absolute inset-0 rounded-lg p-2 ${
operationList.length &&
`bg-destroy-10/40 dark:bg-destroy-80/40`
className={`absolute inset-0 p-2 ${
operationList.length ||
(parseErrors.length > 0 &&
`bg-destroy-10/40 dark:bg-destroy-80/40`)
}`}
>
<div className="text-sm bg-destroy-80 text-chalkboard-10 py-1 px-2 rounded flex gap-2 items-center">
<div className="text-base font-sans font-normal text-destroy-80 dark:text-destroy-10 bg-destroy-10 dark:bg-destroy-80 py-1 px-2 rounded flex gap-2 items-center">
<p className="flex-1">
Errors found in KCL code.
<br />
@ -176,7 +178,7 @@ export const FeatureTreePane = () => {
</p>
<button
onClick={goToError}
className="bg-chalkboard-10 text-destroy-80 p-1 rounded-sm flex-none hover:bg-chalkboard-10 hover:border-destroy-70 hover:text-destroy-80 border-transparent"
className="border bg-chalkboard-10 text-destroy-80 p-1 rounded flex-none hover:bg-chalkboard-10 hover:border-destroy-70 hover:text-destroy-80 border-transparent"
>
View error
</button>