Skip to content

Commit

Permalink
fix(lab): libro keybind not work when switching tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk committed Jan 9, 2024
1 parent fb57f09 commit 691aefc
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 8 deletions.
37 changes: 37 additions & 0 deletions .changeset/yellow-ways-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
'@difizen/libro-jupyter': patch
'@difizen/libro-core': patch
'@difizen/libro-lab': patch
'@difizen/libro-docs': patch
'@difizen/libro-code-cell': patch
'@difizen/libro-code-editor': patch
'@difizen/libro-codemirror': patch
'@difizen/libro-cofine-editor': patch
'@difizen/libro-cofine-editor-contribution': patch
'@difizen/libro-cofine-editor-core': patch
'@difizen/libro-cofine-textmate': patch
'@difizen/libro-common': patch
'@difizen/libro-kernel': patch
'@difizen/libro-l10n': patch
'@difizen/libro-lsp': patch
'@difizen/libro-markdown': patch
'@difizen/libro-markdown-cell': patch
'@difizen/libro-output': patch
'@difizen/libro-prompt-cell': patch
'@difizen/libro-raw-cell': patch
'@difizen/libro-rendermime': patch
'@difizen/libro-search': patch
'@difizen/libro-search-code-cell': patch
'@difizen/libro-shared-model': patch
'@difizen/libro-terminal': patch
'@difizen/libro-toc': patch
'@difizen/libro-virtualized': patch
'@difizen/libro-widget': patch
---

1.libro keybind not work when switching tabs
2.auto focus when input file name.
3.editor resize when CodeEditorViewer resize
4.add file size warning
5.add UI for file formats not supported for viewing
6.file name error when select other format
2 changes: 1 addition & 1 deletion packages/libro-lab/src/editor-viewer/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

.libro-lab-default-viewer-text {
font-size: 18px;
color: rgba(0, 0, 0, 85%);
color: #000000d8;
line-height: 26px;
text-align: center;
font-weight: 500;
Expand Down
12 changes: 6 additions & 6 deletions packages/libro-lab/src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
background-color: #f0f2f51f;
min-width: 40px;
box-shadow:
1px 0 0 0 rgba(0, 10, 26, 0.84%),
2px 0 0 0 rgba(255, 255, 255, 4.8%);
1px 0 0 0 #000a1a02,
2px 0 0 0 #ffffff0c;

.mana-tabs-ink-bar {
display: none;
Expand Down Expand Up @@ -40,7 +40,7 @@
background-color: #000a1a1f;

.mana-tab-icon {
color: rgba(0, 0, 0, 35%);
color: #00000059;
}
}

Expand All @@ -49,7 +49,7 @@
background-color: #000a1a1f;

.mana-tab-icon {
color: rgba(0, 10, 26, 50%);
color: #000a1a7f;
}
}
}
Expand Down Expand Up @@ -82,9 +82,9 @@

.default-folder-icon,
.default-file-icon {
color: rgba(0, 0, 0, 45%);
color: #00000072;
}

.mana-tree-node-segment-grow {
color: rgba(0, 0, 0, 65%);
color: #000000a5;
}
3 changes: 2 additions & 1 deletion packages/libro-lab/src/layout/layout-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ export class LayoutService {
);
observable(slotView);
if (slotView instanceof DefaultSlotView) {
slotView.onActiveChange(() => {
slotView.onActiveChange(async () => {
const active = slotView.active;
if (active instanceof LibroNavigatableView) {
await active.ready;
active.libroView?.focus();
this.libroService.active = active.libroView;
} else {
Expand Down

0 comments on commit 691aefc

Please sign in to comment.