diff --git a/intuita-webview/src/codemodList/CodemodArguments/index.tsx b/intuita-webview/src/codemodList/CodemodArguments/index.tsx index 01c85a90..ce863b06 100644 --- a/intuita-webview/src/codemodList/CodemodArguments/index.tsx +++ b/intuita-webview/src/codemodList/CodemodArguments/index.tsx @@ -54,7 +54,6 @@ const CodemodArguments = ({ ), ); - const targetPath = rootPath !== null ? buildTargetPath(path, rootPath) : '/'; diff --git a/intuita-webview/src/codemodList/components/DirectorySelector.tsx b/intuita-webview/src/codemodList/components/DirectorySelector.tsx index 161a6e1e..9a8722d1 100644 --- a/intuita-webview/src/codemodList/components/DirectorySelector.tsx +++ b/intuita-webview/src/codemodList/components/DirectorySelector.tsx @@ -36,7 +36,7 @@ export const DirectorySelector = ({ const [focusedOptionIdx, setFocusedOptionIdx] = useState(0); const [showOptions, setShowOptions] = useState(false); - console.log(defaultValue, '?') + console.log(defaultValue, '?'); useEffect(() => { setValue(defaultValue); }, [defaultValue]); @@ -123,7 +123,7 @@ export const DirectorySelector = ({ id={`option_${i}`} className={styles.option} onClick={() => { - console.log(item) + console.log(item); setShowOptions(false); setValue(item); updatePath(item, codemodHash); diff --git a/intuita-webview/src/codemodList/components/style.module.css b/intuita-webview/src/codemodList/components/style.module.css index b92a85b0..47f99e5e 100644 --- a/intuita-webview/src/codemodList/components/style.module.css +++ b/intuita-webview/src/codemodList/components/style.module.css @@ -2,7 +2,6 @@ flex-grow: 1; } - .textField::part(control) { font-size: 12px; opacity: 0.75; @@ -10,12 +9,12 @@ .option { min-height: 20px; - width: 100%; - display: inline-block; - line-height: 20px; + width: 100%; + display: inline-block; + line-height: 20px; } .autocompleteItems { background-color: var(--vscode-editor-background); padding: 4px; -} \ No newline at end of file +} diff --git a/src/components/webview/MainProvider.ts b/src/components/webview/MainProvider.ts index 816e6f7c..e5cdf9d4 100644 --- a/src/components/webview/MainProvider.ts +++ b/src/components/webview/MainProvider.ts @@ -145,10 +145,8 @@ export class MainViewProvider implements WebviewViewProvider { private readonly __rootUri: Uri | null, private readonly __store: Store, ) { - this.__webviewResolver = new WebviewResolver(context.extensionUri); - this.__messageBus.subscribe(MessageKind.showProgress, (message) => { if (message.codemodHash === null) { return; @@ -214,7 +212,6 @@ export class MainViewProvider implements WebviewViewProvider { }); }); - this.__getDirectoryPaths(); } @@ -251,12 +248,14 @@ export class MainViewProvider implements WebviewViewProvider { return; } - this.__directoryPaths = ((await glob(`${this.__rootUri?.fsPath}/**`, { - fs: workspace.fs, - nodir: false, - // ignore node_modules and files, match only directories - ignore: ['**/node_modules/**', '**/*.*'] - })) ?? []).map(p => relative(basePath, p)); + this.__directoryPaths = ( + (await glob(`${this.__rootUri?.fsPath}/**`, { + fs: workspace.fs, + nodir: false, + // ignore node_modules and files, match only directories + ignore: ['**/node_modules/**', '**/*.*'], + })) ?? [] + ).map((p) => relative(basePath, p)); } private __postMessage(message: WebviewMessage) { @@ -461,7 +460,7 @@ export class MainViewProvider implements WebviewViewProvider { if (message.kind === 'webview.codemodList.updatePathToExecute') { await this.updateExecutionPath(message.value); - + this.__postMessage({ kind: 'webview.main.setProps', props: this.__buildProps(), @@ -611,9 +610,12 @@ export class MainViewProvider implements WebviewViewProvider { try { await workspace.fs.stat(Uri.file(newPathAbsolute)); this.__store.dispatch( - actions.setExecutionPath({ codemodHash, path: newPathAbsolute }), + actions.setExecutionPath({ + codemodHash, + path: newPathAbsolute, + }), ); - + if (newPathAbsolute !== oldExecutionPath && !fromVSCodeCommand) { window.showInformationMessage( 'Successfully updated the execution path.', diff --git a/src/selectors/selectCodemodTree.ts b/src/selectors/selectCodemodTree.ts index 02f96f9b..9254747f 100644 --- a/src/selectors/selectCodemodTree.ts +++ b/src/selectors/selectCodemodTree.ts @@ -166,7 +166,7 @@ export const selectCodemodTree = ( codemods.sort((a, b) => a.name.localeCompare(b.name)); const { executionPaths, searchPhrase } = state.codemodDiscoveryView; - console.log(executionPaths, '?') + console.log(executionPaths, '?'); const nodes: Record = {}; const children: Record = {};