Skip to content

Commit

Permalink
feat: achieve noRecursive fileWatcher (#3095)
Browse files Browse the repository at this point in the history
* fix: fix The debug console and the left outline style are not aligned

* fix: fix The debug console and the left outline style are not aligned

* fix: fix the debug console and the left outline style are not aligned

* feat: recursive and non-recursive implementation forms

* feat: improve non-recursive file listening

* feat: achieve noRecursive fileWatcher

* fix: delete console information and give switch to choose recursive

* fix: add switch to choose isRecursive

* fix: fix file deletion bug and remove unnecessary console

* fix: fix format and remove some comments

* fix: listen only to files, exclude folders

* fix: file format restoration

* fix: file format restoration

* fix: modify and simplify the listening logic

* fix: file format restoration

* fix: modify and simplify the listening logic

* fix: file format restoration

* fix: fixed listening file logic

* feat: add test file

* feat: add test file

* test: added tests for un-recursive listening systems

* fix: modify relative path

* fix: modify relative path

* fix: fix watcher init and test case

* fix: modify file problems in linux

* fix: modify file problems in linux

* fix: modify file problems in linux

* fix: modify file problems in linux

* test: add mac test

* fix: update file name

---------

Co-authored-by: Artin <[email protected]>
  • Loading branch information
wjywy and bytemain authored Oct 31, 2023
1 parent 277cca3 commit d7a79ba
Show file tree
Hide file tree
Showing 13 changed files with 647 additions and 20 deletions.
6 changes: 5 additions & 1 deletion packages/core-browser/src/markdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { createMarkedRenderer, toMarkdownHtml as toHtml, IMarkedOptions } from '

import { IOpenerService } from '../opener';

export const toMarkdown = (message: string | React.ReactNode, opener?: IOpenerService, options?: IMarkedOptions): React.ReactNode =>
export const toMarkdown = (
message: string | React.ReactNode,
opener?: IOpenerService,
options?: IMarkedOptions,
): React.ReactNode =>
typeof message === 'string' ? (
<RenderWrapper opener={opener} html={toMarkdownHtml(message, options)}></RenderWrapper>
) : (
Expand Down
31 changes: 31 additions & 0 deletions packages/debug/src/browser/view/console/debug-console.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
flex-shrink: 0;
justify-content: center;
font-weight: 600;

:global(.kaitian-icon) {
font-size: 14px;
line-height: @debug-console-default-height;
Expand Down Expand Up @@ -82,6 +83,7 @@
top: 0;
z-index: 1;
pointer-events: none;

& .block {
position: absolute;
background-color: rgba(225, 255, 255, 0.25);
Expand All @@ -91,12 +93,14 @@
a {
color: currentColor !important;
cursor: text;

&.link {
// 这里 a 标签的父元素的 dispaly 如果是 inline-block 的话,text-decoration 属性会失效,采用 border-bottom 代替
// text-decoration: underline;
border-bottom: 1px solid currentColor;
word-break: break-all;
}

&.pointer {
cursor: pointer;
}
Expand Down Expand Up @@ -132,6 +136,7 @@
&.mod_selected {
color: var(--kt-tree-inactiveSelectionForeground) !important;
background: var(--kt-tree-inactiveSelectionBackground);

.expansion_toggle {
color: var(--kt-tree-inactiveSelectionForeground) !important;
}
Expand All @@ -140,6 +145,7 @@
&.mod_focused {
outline: 1px solid var(--list-focusOutline);
outline-offset: -1px;

.expansion_toggle {
color: var(--kt-tree-activeSelectionForeground) !important;
}
Expand All @@ -148,6 +154,7 @@
&.mod_actived {
outline: 1px solid var(--list-focusOutline);
outline-offset: -1px;

.expansion_toggle {
color: var(--kt-tree-activeSelectionForeground) !important;
}
Expand All @@ -164,6 +171,7 @@
align-items: center;
width: 100%;
user-select: text;

match {
background-color: var(--editor-findMatchHighlightBackground);
}
Expand All @@ -185,6 +193,7 @@
.debug_console_node_displayname {
display: inline;
white-space: inherit;

&.info {
color: var(--debugConsole-infoForeground);
}
Expand Down Expand Up @@ -215,6 +224,7 @@
color: var(--foreground);
position: absolute;
left: -20px;

&.mod_collapsed {
&:before {
display: block;
Expand Down Expand Up @@ -244,6 +254,7 @@
overflow: hidden;
text-overflow: ellipsis;
overflow: visible;

&.name {
color: var(--debugTokenExpression-name);
}
Expand Down Expand Up @@ -288,82 +299,102 @@
.debug_console_output {
flex: 1;
background-color: var(--kt-panelTitle-background);

:global(.kt-recycle-tree) {
width: 100% !important;
}

.code-bold {
font-weight: bold;
}

.code-italic {
font-style: italic;
}

.code-underline {
text-decoration: underline;
text-decoration-style: solid;
}

.code-double-underline {
text-decoration: underline;
text-decoration-style: double;
}

.code-strike-through {
text-decoration: line-through;
text-decoration-style: solid;
}

.code-overline {
text-decoration: overline;
text-decoration-style: solid;
}

.code-overline.code-underline.code-strike-through {
text-decoration: overline underline line-through;
text-decoration-style: solid;
}

.code-overline.code-underline {
text-decoration: overline underline;
text-decoration-style: solid;
}

.code-overline.code-strike-through {
text-decoration: overline line-through;
text-decoration-style: solid;
}

.code-underline.code-strike-through {
text-decoration: underline line-through;
text-decoration-style: solid;
}

.code-overline.code-double-underline.code-strike-through {
text-decoration: overline underline line-through;
text-decoration-style: double;
}

.code-overline.code-double-underline {
text-decoration: overline underline;
text-decoration-style: double;
}

.code-double-underline.code-strike-through {
text-decoration: underline line-through;
text-decoration-style: double;
}

.code-dim {
opacity: 0.4;
}

.code-hidden {
opacity: 0;
}

.code-blink {
animation: code-blink-key 1s cubic-bezier(1, 0, 0, 1) infinite alternate;
}

.code-rapid-blink {
animation: code-blink-key 0.3s cubic-bezier(1, 0, 0, 1) infinite alternate;
}

@keyframes code-blink-key {
to {
opacity: 0.4;
}
}

.code-subscript {
vertical-align: sub;
font-size: smaller;
line-height: normal;
}

.code-superscript {
vertical-align: super;
font-size: smaller;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { FileUri, UTF8 } from '@opensumi/ide-core-common';
import { createBrowserInjector } from '@opensumi/ide-dev-tool/src/injector-helper';
import { FileService } from '@opensumi/ide-file-service/lib/node';
import { DiskFileSystemProvider } from '@opensumi/ide-file-service/lib/node/disk-file-system.provider';
import { FileSystemWatcherServer } from '@opensumi/ide-file-service/lib/node/file-service-watcher';

import { IFileServiceClient, FileServicePath, IDiskFileProvider } from '../../src';
import { FileServiceClientModule } from '../../src/browser';
import { FileSystemWatcherServer } from '../../src/node/recursive/file-service-watcher';

describe('FileServiceClient should be work', () => {
const injector = createBrowserInjector([FileServiceClientModule]);
Expand Down
Loading

0 comments on commit d7a79ba

Please sign in to comment.