rm error pane show badge on code (#3233)
* rm error pane show badge on code Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix playwirght Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu) * empty --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@ -8117,7 +8117,7 @@ test('Typing KCL errors induces a badge on the error logs pane button', async ({
|
|||||||
await u.closeDebugPanel()
|
await u.closeDebugPanel()
|
||||||
|
|
||||||
// Ensure no badge is present
|
// Ensure no badge is present
|
||||||
const errorLogsButton = page.getByRole('button', { name: 'KCL Errors pane' })
|
const errorLogsButton = page.getByRole('button', { name: 'KCL Code pane' })
|
||||||
await expect(errorLogsButton).not.toContainText('notification')
|
await expect(errorLogsButton).not.toContainText('notification')
|
||||||
|
|
||||||
// Delete a character to break the KCL
|
// Delete a character to break the KCL
|
||||||
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
@ -27,27 +27,3 @@ export const LogsPane = () => {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const KclErrorsPane = () => {
|
|
||||||
const theme = useResolvedTheme()
|
|
||||||
const { errors } = useKclContext()
|
|
||||||
return (
|
|
||||||
<div className="overflow-hidden">
|
|
||||||
<div className="absolute inset-0 p-2 flex flex-col overflow-auto">
|
|
||||||
<ReactJsonTypeHack
|
|
||||||
src={errors}
|
|
||||||
collapsed={1}
|
|
||||||
collapseStringsAfterLength={60}
|
|
||||||
enableClipboard={false}
|
|
||||||
displayArrayKey={false}
|
|
||||||
displayDataTypes={false}
|
|
||||||
displayObjectSize={true}
|
|
||||||
indentWidth={2}
|
|
||||||
quotesOnKeys={false}
|
|
||||||
name={false}
|
|
||||||
theme={theme === 'light' ? 'rjv-default' : 'monokai'}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
@ -11,7 +11,7 @@ import { CustomIconName } from 'components/CustomIcon'
|
|||||||
import { KclEditorPane } from 'components/ModelingSidebar/ModelingPanes/KclEditorPane'
|
import { KclEditorPane } from 'components/ModelingSidebar/ModelingPanes/KclEditorPane'
|
||||||
import { ReactNode } from 'react'
|
import { ReactNode } from 'react'
|
||||||
import { MemoryPane, MemoryPaneMenu } from './MemoryPane'
|
import { MemoryPane, MemoryPaneMenu } from './MemoryPane'
|
||||||
import { KclErrorsPane, LogsPane } from './LoggingPanes'
|
import { LogsPane } from './LoggingPanes'
|
||||||
import { DebugPane } from './DebugPane'
|
import { DebugPane } from './DebugPane'
|
||||||
import { FileTreeInner, FileTreeMenu } from 'components/FileTree'
|
import { FileTreeInner, FileTreeMenu } from 'components/FileTree'
|
||||||
import { useKclContext } from 'lang/KclProvider'
|
import { useKclContext } from 'lang/KclProvider'
|
||||||
@ -21,7 +21,6 @@ export type SidebarType =
|
|||||||
| 'debug'
|
| 'debug'
|
||||||
| 'export'
|
| 'export'
|
||||||
| 'files'
|
| 'files'
|
||||||
| 'kclErrors'
|
|
||||||
| 'logs'
|
| 'logs'
|
||||||
| 'lspMessages'
|
| 'lspMessages'
|
||||||
| 'variables'
|
| 'variables'
|
||||||
@ -53,6 +52,7 @@ export const sidebarPanes: SidebarPane[] = [
|
|||||||
Content: KclEditorPane,
|
Content: KclEditorPane,
|
||||||
keybinding: 'Shift + C',
|
keybinding: 'Shift + C',
|
||||||
Menu: KclEditorMenu,
|
Menu: KclEditorMenu,
|
||||||
|
showBadge: ({ kclContext }) => kclContext.errors.length,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'files',
|
id: 'files',
|
||||||
@ -78,14 +78,6 @@ export const sidebarPanes: SidebarPane[] = [
|
|||||||
Content: LogsPane,
|
Content: LogsPane,
|
||||||
keybinding: 'Shift + L',
|
keybinding: 'Shift + L',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: 'kclErrors',
|
|
||||||
title: 'KCL Errors',
|
|
||||||
icon: faExclamationCircle,
|
|
||||||
Content: KclErrorsPane,
|
|
||||||
keybinding: 'Shift + E',
|
|
||||||
showBadge: ({ kclContext }) => kclContext.errors.length,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'debug',
|
id: 'debug',
|
||||||
title: 'Debug',
|
title: 'Debug',
|
||||||
|