Skip to content

Commit

Permalink
Improve UX/UI for creating project from examples (#1278)
Browse files Browse the repository at this point in the history
* First implementation

- Change name of button
- Make use of VS Code API to use window title and window button custom names

* Update ui unit test
  • Loading branch information
radurentea authored Sep 10, 2024
1 parent 3a50d32 commit 8209065
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/examples/ExamplesPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export class ExamplesPlanel {
canSelectFolders: true,
canSelectFiles: false,
canSelectMany: false,
openLabel: "Select Folder for New Project",
title: `Choose Project Location for ${message.name} example`,
});
}
if (!selectedFolder) {
Expand Down Expand Up @@ -144,7 +146,9 @@ export class ExamplesPlanel {
example_detail: contentStr,
});
} catch (err) {
const notAvailable = vscode.l10n.t("No README.md available for this project.");
const notAvailable = vscode.l10n.t(
"No README.md available for this project."
);
Logger.info(notAvailable);
Logger.info(err);
this.panel.webview.postMessage({
Expand Down
2 changes: 1 addition & 1 deletion src/ui-test/project-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Example Create testing", async () => {
By.id("create-button")
);
expect(await createProjectButton.getText()).has.string(
"Create project using example"
"Select location for creating"
);

const containerPath = resolve(__dirname, "..", "..", "testFiles");
Expand Down
2 changes: 1 addition & 1 deletion src/views/examples/Examples.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ onMounted(() => {
class="button"
id="create-button"
>
Create project using example {{ selectedExample.name }}
Select location for creating {{ selectedExample.name }} project
</button>
</div>
<div
Expand Down

0 comments on commit 8209065

Please sign in to comment.