fix(editor): replace fold gutter icons with consistent SVG chevrons, fix queryStore tests
This commit is contained in:
1 parent
7511753f71
commit
dc10f5720e
2 files changed
+44
-11
No files matched your search
@@ -1705,7 +1705,16 @@ onMounted(async () => {
|
||||
highlightActiveLineGutter(),
|
||||
highlightSpecialChars(),
|
||||
history(),
|
||||
foldGutter(),
|
||||
foldGutter({
|
||||
markerDOM(open: boolean) {
|
||||
const span = document.createElement("span");
|
||||
span.className = "cm-foldMarker-svg";
|
||||
span.innerHTML = open
|
||||
? '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M4.5 6.5l3.5 3.5 3.5-3.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>'
|
||||
: '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M6.5 4.5l3.5 3.5-3.5 3.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
||||
return span;
|
||||
},
|
||||
}),
|
||||
drawSelection(),
|
||||
trimmedSelectionLayer(),
|
||||
selectionMatchOccurrences(),
|
||||
@@ -2249,4 +2258,26 @@ defineExpose({ openSearch, openReplace, scrollCursorIntoView });
|
||||
.query-editor--table-navigation-hover :deep(.cm-line) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:deep(.cm-foldMarker-svg) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
vertical-align: middle;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
color: var(--muted-foreground);
|
||||
opacity: 0.65;
|
||||
transition: opacity 0.15s;
|
||||
}
|
||||
|
||||
:deep(.cm-foldMarker-svg:hover) {
|
||||
opacity: 0.95;
|
||||
}
|
||||
|
||||
:deep(.cm-foldMarker-svg svg) {
|
||||
display: block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user