Skip to content

Commit

Permalink
Notification UX Enhancement (#108)
Browse files Browse the repository at this point in the history
* Updated asset notification verbage, fixes #106

* Added install progress notification (fixes #107

* Updated changelog and bumped version to v15.1.1
  • Loading branch information
Unthrottled authored Aug 21, 2021
1 parent 5ba0f9d commit 1784d74
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 67 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

# 15.1.1 [Asset Installation UX]

- Installation progress notification goes away after install. [#107](https://github.com/doki-theme/doki-theme-vscode/issues/107)
- Updated verbage on installation asset success notification. [#106](https://github.com/doki-theme/doki-theme-vscode/issues/106)

# 15.1.0 [Search & Selection Differentiation]

- Made it easier to differentiate the search & selection background colors for all **61** themes. <sup><sup>Some days I question my current life choices....</sup></sup>
Expand Down
76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "The Doki Theme",
"description": "A bunch of themes with cute anime girls. Code with your waifu!",
"publisher": "unthrottled",
"version": "15.1.0",
"version": "15.1.1",
"license": "MIT",
"icon": "Doki-Theme.png",
"galleryBanner": {
Expand Down Expand Up @@ -835,22 +835,16 @@
"path": "./generatedThemes/Maika.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "0527c6fc-316a-4f80-9459-d92ced0e6492",
"label": "Doki Theme: BunnySenpai: Mai",
"path": "./generatedThemes/Mai Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "98878c8e-9f91-4e25-930d-dd7d280d9e35",
"label": "Doki Theme: BunnySenpai: Mai",
"path": "./generatedThemes/Mai Light.theme.json",
"uiTheme": "vs"
},
{
"id": "dce48196-ff46-470c-b5f9-d1e23f4a79d3",
"label": "Doki Theme: DDLC: Monika",
"path": "./generatedThemes/Monika Dark.theme.json",
"id": "0527c6fc-316a-4f80-9459-d92ced0e6492",
"label": "Doki Theme: BunnySenpai: Mai",
"path": "./generatedThemes/Mai Dark.theme.json",
"uiTheme": "vs-dark"
},
{
Expand All @@ -860,9 +854,9 @@
"uiTheme": "vs"
},
{
"id": "a7e0aa28-739a-4671-80ae-3980997e6b71",
"label": "Doki Theme: DDLC: Natsuki",
"path": "./generatedThemes/Natsuki Dark.theme.json",
"id": "dce48196-ff46-470c-b5f9-d1e23f4a79d3",
"label": "Doki Theme: DDLC: Monika",
"path": "./generatedThemes/Monika Dark.theme.json",
"uiTheme": "vs-dark"
},
{
Expand All @@ -871,6 +865,12 @@
"path": "./generatedThemes/Natsuki Light.theme.json",
"uiTheme": "vs"
},
{
"id": "a7e0aa28-739a-4671-80ae-3980997e6b71",
"label": "Doki Theme: DDLC: Natsuki",
"path": "./generatedThemes/Natsuki Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "cb8ef4b7-0844-4a04-b08b-754086598de4",
"label": "Doki Theme: DDLC: Sayori",
Expand Down Expand Up @@ -949,18 +949,18 @@
"path": "./generatedThemes/Rei.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "8c99ec4b-fda0-4ab7-95ad-a6bf80c3924b",
"label": "Doki Theme: Franxx: Zero Two",
"path": "./generatedThemes/Zero Two Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "4fd5cb34-d36e-4a3c-8639-052b19b26ba1",
"label": "Doki Theme: Franxx: Zero Two",
"path": "./generatedThemes/Zero Two Light.theme.json",
"uiTheme": "vs"
},
{
"id": "8c99ec4b-fda0-4ab7-95ad-a6bf80c3924b",
"label": "Doki Theme: Franxx: Zero Two",
"path": "./generatedThemes/Zero Two Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "5ec63d95-1e7d-4649-b3d0-0078af8f8740",
"label": "Doki Theme: FutureDiary: Yuno",
Expand Down Expand Up @@ -997,18 +997,18 @@
"path": "./generatedThemes/Aqua.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "774ec7ad-d6a0-4d9c-b195-2f54d72ab664",
"label": "Doki Theme: KonoSuba: Darkness",
"path": "./generatedThemes/Darkness Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "8474d98d-7bb1-462c-82b1-dd7c512142a6",
"label": "Doki Theme: KonoSuba: Darkness",
"path": "./generatedThemes/Darkness Light.theme.json",
"uiTheme": "vs"
},
{
"id": "774ec7ad-d6a0-4d9c-b195-2f54d72ab664",
"label": "Doki Theme: KonoSuba: Darkness",
"path": "./generatedThemes/Darkness Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "63fe4617-4cac-47a5-9b93-6794514c35ad",
"label": "Doki Theme: KonoSuba: Megumin",
Expand Down Expand Up @@ -1063,18 +1063,18 @@
"path": "./generatedThemes/Coconut.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "13407818-da66-432b-94e3-fd2192e98118",
"label": "Doki Theme: NekoPara: Maple",
"path": "./generatedThemes/Maple Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "ea7a8b00-2d86-4e06-81a2-5c14a46264d5",
"label": "Doki Theme: NekoPara: Maple",
"path": "./generatedThemes/Maple Light.theme.json",
"uiTheme": "vs"
},
{
"id": "13407818-da66-432b-94e3-fd2192e98118",
"label": "Doki Theme: NekoPara: Maple",
"path": "./generatedThemes/Maple Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "31d5574d-f56b-408f-81dc-9d44feeb62c2",
"label": "Doki Theme: NekoPara: Vanilla",
Expand Down Expand Up @@ -1111,18 +1111,18 @@
"path": "./generatedThemes/Echidna.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "696de7c1-3a8e-4445-83ee-3eb7e9dca47f",
"label": "Doki Theme: Re:Zero: Emilia",
"path": "./generatedThemes/Emilia Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "e828aaae-aa8c-4084-8993-d64697146930",
"label": "Doki Theme: Re:Zero: Emilia",
"path": "./generatedThemes/Emilia Light.theme.json",
"uiTheme": "vs"
},
{
"id": "696de7c1-3a8e-4445-83ee-3eb7e9dca47f",
"label": "Doki Theme: Re:Zero: Emilia",
"path": "./generatedThemes/Emilia Dark.theme.json",
"uiTheme": "vs-dark"
},
{
"id": "ecb74f1c-8c84-40c4-916f-601039ba2af0",
"label": "Doki Theme: Re:Zero: Ram",
Expand Down Expand Up @@ -1225,4 +1225,4 @@
"resolutions": {
"minimist": "0.2.1"
}
}
}
2 changes: 1 addition & 1 deletion src/NotificationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { VSCodeGlobals } from "./VSCodeGlobals";
import { attemptToGreetUser } from "./WelcomeService";

const SAVED_VERSION = "doki.theme.version";
const DOKI_THEME_VERSION = "v15.1.0";
const DOKI_THEME_VERSION = "v15.1.1";

export function attemptToNotifyUpdates(context: vscode.ExtensionContext) {
const savedVersion = VSCodeGlobals.globalState.get(SAVED_VERSION);
Expand Down
61 changes: 33 additions & 28 deletions src/ThemeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,39 +154,44 @@ export function activateThemeWallpaper(
);
}

const quickReloadAction = "Quickly Reload Window";

export function activateThemeAsset(
dokiTheme: DokiTheme,
currentSticker: DokiSticker,
context: vscode.ExtensionContext,
assetType: string,
installer: (sticker: Sticker) => Promise<InstallStatus>
) {
vscode.window.showInformationMessage(
`Please wait, installing ${dokiTheme.name}'s ${assetType}.`
);
installer(currentSticker.sticker).then((didInstall) => {
if (didInstall === InstallStatus.INSTALLED) {
VSCodeGlobals.globalState.update(ACTIVE_THEME, dokiTheme.id);
VSCodeGlobals.globalState.update(ACTIVE_STICKER, currentSticker.type);
StatusBarComponent.setText(dokiTheme.displayName);
fixCheckSums();
vscode.window
.showInformationMessage(
`${dokiTheme.name}'s ${assetType} installed!\n Please restart your VSCode`,
{ title: "Restart VSCode" }
)
.then((item) => {
if (item) {
vscode.commands.executeCommand("workbench.action.reloadWindow");
}
});
} else if (didInstall === InstallStatus.FAILURE) {
handleInstallFailure(context, dokiTheme);
} else if (didInstall === InstallStatus.NETWORK_FAILURE) {
vscode.window.showErrorMessage(
`Unable to install ${dokiTheme.name}, please check your network connection.`
);
}
vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: `Please wait, installing ${dokiTheme.name}'s ${assetType}.`,
cancellable: false,
}, () => {
return installer(currentSticker.sticker).then((didInstall) => {
if (didInstall === InstallStatus.INSTALLED) {
VSCodeGlobals.globalState.update(ACTIVE_THEME, dokiTheme.id);
VSCodeGlobals.globalState.update(ACTIVE_STICKER, currentSticker.type);
StatusBarComponent.setText(dokiTheme.displayName);
fixCheckSums();
vscode.window
.showInformationMessage(
`${dokiTheme.name}'s ${assetType} installed! Quick reload to see changes, please restart VSCode to remove the Unsupported warning.`,
{ title: quickReloadAction }
)
.then((item) => {
if (item) {
vscode.commands.executeCommand("workbench.action.reloadWindow");
}
});
} else if (didInstall === InstallStatus.FAILURE) {
handleInstallFailure(context, dokiTheme);
} else if (didInstall === InstallStatus.NETWORK_FAILURE) {
vscode.window.showErrorMessage(
`Unable to install ${dokiTheme.name}, please check your network connection.`
);
}
});
});
}

Expand All @@ -207,8 +212,8 @@ export function uninstallImages(context: vscode.ExtensionContext) {
restoreChecksum();
vscode.window
.showInformationMessage(
`Removed Images. Please restart your restored VSCode`,
{ title: "Restart VSCode" }
`Removed All Images. Quick reload to see changes, please restart VSCode to remove the Unsupported warning.`,
{ title: quickReloadAction }
)
.then((item) => {
if (item) {
Expand Down

0 comments on commit 1784d74

Please sign in to comment.