Skip to content

Commit

Permalink
button to show error panel
Browse files Browse the repository at this point in the history
  • Loading branch information
joswig committed Feb 5, 2025
1 parent 6fd8335 commit e2f946e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion src/components/sequencing/SequenceEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<script lang="ts">
import { json } from '@codemirror/lang-json';
import { indentService, syntaxTree } from '@codemirror/language';
import { lintGutter } from '@codemirror/lint';
import { lintGutter, openLintPanel } from '@codemirror/lint';
import { Compartment, EditorState } from '@codemirror/state';
import { type ViewUpdate } from '@codemirror/view';
import type { SyntaxNode, Tree } from '@lezer/common';
Expand Down Expand Up @@ -490,6 +490,10 @@
toggleSeqJsonPreview = !toggleSeqJsonPreview;
}
function showErrorPanel() {
openLintPanel(editorSequenceView);
}
function formatDocument() {
if (isInVmlMode) {
vmlFormat(editorSequenceView);
Expand Down Expand Up @@ -630,6 +634,14 @@
<SectionTitle>{title}</SectionTitle>

<div class="right">
<button
use:tooltip={{ content: 'Show Error Panel', placement: 'top' }}
class="st-button icon-button secondary ellipsis"
on:click={showErrorPanel}
>
Error Panel
</button>

<button
use:tooltip={{ content: 'Format sequence whitespace', placement: 'top' }}
class="st-button icon-button secondary ellipsis"
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/codemirror/vml/vml.grammar
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ Unop {
}

Built_in_function {
// Grammar shows 2 set paranthesis for zero arg, one here, and one next level down
// Grammar shows 2 set parenthesis for zero arg, one here, and one next level down
// (Zero_parm_built_in_function_name OPEN_PAREN CLOSE_PAREN)
Zero_parm_built_in_function_name
| (Unary_parm_built_in_function_name OPEN_PAREN Compound_expr CLOSE_PAREN)
Expand Down

0 comments on commit e2f946e

Please sign in to comment.