Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
DmytroHryshyn committed Jan 29, 2024
1 parent 3df5485 commit 1dfcd9b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
1 change: 0 additions & 1 deletion intuita-webview/src/codemodList/CodemodArguments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const CodemodArguments = ({
),
);


const targetPath =
rootPath !== null ? buildTargetPath(path, rootPath) : '/';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down Expand Up @@ -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);
Expand Down
9 changes: 4 additions & 5 deletions intuita-webview/src/codemodList/components/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
flex-grow: 1;
}


.textField::part(control) {
font-size: 12px;
opacity: 0.75;
}

.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;
}
}
26 changes: 14 additions & 12 deletions src/components/webview/MainProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -214,7 +212,6 @@ export class MainViewProvider implements WebviewViewProvider {
});
});


this.__getDirectoryPaths();
}

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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.',
Expand Down
2 changes: 1 addition & 1 deletion src/selectors/selectCodemodTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<CodemodNodeHashDigest, CodemodNode> = {};
const children: Record<CodemodNodeHashDigest, CodemodNodeHashDigest[]> = {};

Expand Down

0 comments on commit 1dfcd9b

Please sign in to comment.