Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify onboarding (VSC-426) #159

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
ee5405c
initial auto window
brianignacio5 Aug 10, 2020
eacf16d
initial setup window
brianignacio5 Aug 14, 2020
2aaa643
add tools setup methods
brianignacio5 Aug 17, 2020
07c21d6
complete one click install
brianignacio5 Aug 18, 2020
9527603
open py esp-idf folders
brianignacio5 Aug 19, 2020
553ec0e
add prerequisites validation
brianignacio5 Aug 20, 2020
2cd8ffd
add codicons and custom page
brianignacio5 Aug 24, 2020
aa1c791
add initial custom setup page
brianignacio5 Aug 25, 2020
0403fb6
idf download setup
brianignacio5 Aug 27, 2020
65eab41
add esp-idf cancel logic
brianignacio5 Aug 28, 2020
3ab7eeb
improve custom ui alignment
brianignacio5 Aug 31, 2020
f8625fd
idfToolManager simplify check tools cancel dload
brianignacio5 Sep 1, 2020
d6087df
progress tools cancel py env install
brianignacio5 Sep 2, 2020
47eafd0
cancel pkg extract save custom settings
brianignacio5 Sep 3, 2020
e634b2a
fix manual path issues
brianignacio5 Sep 3, 2020
72832ef
test on win 1
brianignacio5 Sep 4, 2020
01564a8
rm duplicate python manual path
brianignacio5 Sep 8, 2020
9f606ce
1 click install status window
brianignacio5 Sep 9, 2020
9d4e9b9
update status page
brianignacio5 Sep 10, 2020
687cb59
check esp-idf container and path on install page
brianignacio5 Sep 11, 2020
ea1985e
finished status rm custom
brianignacio5 Sep 14, 2020
7c298a4
status ui update
brianignacio5 Sep 15, 2020
275de0c
fix esp-idf url links
brianignacio5 Sep 15, 2020
86995ba
check default values env vars
brianignacio5 Sep 16, 2020
6ba66d4
install py reqs command
brianignacio5 Sep 16, 2020
2eefff9
install py req cmd in schema
brianignacio5 Sep 16, 2020
9761065
fix error message on esp-idf python
brianignacio5 Sep 22, 2020
e533463
enhance download progress ui
brianignacio5 Sep 23, 2020
c991489
Add status step background
brianignacio5 Sep 23, 2020
e0ce0d0
improve start ui and errors
brianignacio5 Sep 24, 2020
85b992f
improve tools ui status page
brianignacio5 Sep 25, 2020
ff9fe68
add custom setup ui
brianignacio5 Sep 25, 2020
089010b
check settings on extension activate
brianignacio5 Oct 9, 2020
aa4b780
rm old onboarding
brianignacio5 Oct 9, 2020
b7a2cbe
show setup when missing pre requisites
brianignacio5 Oct 9, 2020
1258c0e
rm test lines
brianignacio5 Oct 14, 2020
5474a53
rm testing on checkExistingSetttings
brianignacio5 Oct 14, 2020
fd4da10
improve setup css align and colors
brianignacio5 Oct 15, 2020
08ca4db
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Oct 19, 2020
6928bfc
fix select erroMsg css rm home btn statusPage
brianignacio5 Oct 21, 2020
89ee873
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Oct 26, 2020
f8c3a64
reject execChildProcess only on Error
brianignacio5 Oct 26, 2020
5089f97
fix childProcess cancelToken
brianignacio5 Oct 27, 2020
44e77dc
fix icons on vsix
brianignacio5 Oct 27, 2020
76ca0e6
add resolve url loader fix font codicon
brianignacio5 Oct 28, 2020
5beadff
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Oct 29, 2020
88d8b1f
update yarn lock
brianignacio5 Oct 29, 2020
ec3153c
resolve url loader
brianignacio5 Oct 29, 2020
a8f8222
fix python list linux
brianignacio5 Oct 30, 2020
78b8be0
add font face to setup webview
brianignacio5 Nov 9, 2020
805daeb
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Nov 9, 2020
4051b53
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Nov 23, 2020
6315fcb
update codicon icons ensure idfContainer dir
brianignacio5 Nov 24, 2020
b6a3caa
fix path sep add def idfPath
brianignacio5 Nov 26, 2020
8dc2039
empty default manual idf path
brianignacio5 Nov 26, 2020
b9c6d5e
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Dec 1, 2020
5999f34
log download error
brianignacio5 Dec 1, 2020
b60bbeb
initialize versions currentSetupValid
brianignacio5 Dec 2, 2020
33150dd
set percentage on idf and tools installed status
brianignacio5 Dec 3, 2020
c6e5a98
update setup docs
brianignacio5 Dec 4, 2020
df84c02
refactor setup panel highlight tools folder
brianignacio5 Dec 4, 2020
c0004fd
update doc paths
brianignacio5 Dec 4, 2020
94efca9
rm timeout test setup spaces
brianignacio5 Dec 8, 2020
c2ea4c1
fix python path with spaces
brianignacio5 Dec 8, 2020
756fdda
Merge branch 'feature/simple-onboarding' of github.com:brianignacio5/…
brianignacio5 Dec 8, 2020
ee7739d
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Dec 8, 2020
eb579df
add fallback on env idf_path idf_tools_path
brianignacio5 Dec 11, 2020
ff7cb7b
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Dec 30, 2020
48e507e
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Jan 4, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add codicons and custom page
  • Loading branch information
brianignacio5 committed Oct 16, 2020
commit 2cd8ffdae4bf67ed2b640b4c87a785d18b8b7416
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@
"typescript": "^3.9.5",
"typescript-tslint-plugin": "^0.3.1",
"vsce": "^1.52.0",
"vscode-codicons": "^0.0.7",
"vscode-nls-dev": "^3.3.1",
"vscode-test": "^1.0.0",
"vue-class-component": "^7.1.0",
Expand Down
39 changes: 31 additions & 8 deletions src/setup/SetupPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ export class SetupPanel {
retainContextWhenHidden: true,
localResourceRoots: [
vscode.Uri.file(path.join(this.extensionPath, "dist", "views")),
vscode.Uri.file(
path.join(
this.extensionPath,
"node_modules",
"vscode-codicons",
"dist"
)
),
],
}
);
Expand All @@ -96,7 +104,18 @@ export class SetupPanel {
path.join(this.extensionPath, "dist", "views", "setup-bundle.js")
)
);
this.panel.webview.html = this.createSetupHtml(scriptPath);
const codiconsUri = this.panel.webview.asWebviewUri(
vscode.Uri.file(
path.join(
this.extensionPath,
"node_modules",
"vscode-codicons",
"dist",
"codicon.css"
)
)
);
this.panel.webview.html = this.createSetupHtml(scriptPath, codiconsUri);

const espIdfPath = idfConf.readParameter("idf.espIdfPath") as string;

Expand Down Expand Up @@ -296,18 +315,22 @@ export class SetupPanel {
vscode.window.showInformationMessage("ESP-IDF has been configured");
}

private createSetupHtml(scriptPath: vscode.Uri): string {
private createSetupHtml(
scriptPath: vscode.Uri,
codiconsUri: vscode.Uri
): string {
return `<!DOCTYPE html>
<html lang="en">
<head>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ESP-IDF Setup</title>
</head>
<body>
<div id="app"></div>
</body>
<script src="${scriptPath}"></script>
<link href="${codiconsUri}" rel="stylesheet" />
</head>
<body>
<div id="app"></div>
</body>
<script src="${scriptPath}"></script>
</html>`;
}

Expand Down
8 changes: 8 additions & 0 deletions src/views/commons/espCommons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,11 @@ button > span.icon > i:hover {
div.plotly-notifier {
visibility: hidden;
}

.control .icon {
padding: 20px;
}

.control .icon .codicon {
font-size: x-large;
}
10 changes: 0 additions & 10 deletions src/views/setup/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,4 @@ export default class App extends Vue {}
.fade-leave-to {
opacity: 0;
}

.open-icon {
color: var(--vscode-button-background);
margin: 0.5em 0 0 0.5em;
cursor: pointer;
font-size: larger;
}
.open-icon:hover {
color: var(--vscode-button-hoverBackground);
}
</style>
29 changes: 29 additions & 0 deletions src/views/setup/Custom.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<template>
<div id="custom-setup">
<div class="centerize" v-if="!isInstalled">
<selectEspIdf></selectEspIdf>

<selectPyVersion></selectPyVersion>
</div>
</div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";
import { Action, Mutation, State } from "vuex-class";

@Component
export default class CustomSetup extends Vue {
private useExistingPyEnv: boolean = false;
@Mutation setToolsFolder;
@State("toolsFolder") private storeToolsFolder: string;

get toolsFolder() {
return this.storeToolsFolder;
}

set toolsFolder(newValue: string) {
this.setToolsFolder(newValue);
}
}
</script>
32 changes: 32 additions & 0 deletions src/views/setup/components/common/folderOpen.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="field centerize text-size">
<label>{{ propLabel }}</label>
<div class="field expanded">
<div class="control expanded">
<input type="text" class="input" v-model="propModel" />
</div>
<div class="control">
<div class="icon">
<i
:class="folderIcon"
@mouseover="folderIcon = 'codicon codicon-folder-opened'"
@mouseout="folderIcon = 'codicon codicon-folder'"
v-on:click="openMethod"
></i>
</div>
</div>
</div>
</div>
</template>

<script lang="ts">
import { Component, Prop, Vue } from "vue-property-decorator";

@Component
export default class folderOpen extends Vue {
private folderIcon = "codicon codicon-folder";
@Prop() propLabel: string;
@Prop() propModel: string;
@Prop() openMethod: () => void;
}
</script>
26 changes: 15 additions & 11 deletions src/views/setup/components/home/selectEspIdf.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
<div class="control">
<div class="select">
<select v-model="selectedIdfVersion">
<option v-for="ver in idfVersionList" :key="ver.name" :value="ver">
{{ ver.name }}
</option>
<option
v-for="ver in idfVersionList"
:key="ver.name"
:value="ver"
>{{ ver.name }}</option
>
</select>
</div>
</div>
Expand All @@ -22,13 +25,14 @@
<input type="text" class="input" v-model="espIdf" />
</div>
<div class="control">
<font-awesome-icon
:icon="folderIcon"
class="open-icon"
@mouseover="folderIcon = 'folder-open'"
@mouseout="folderIcon = 'folder'"
v-on:click="openEspIdfFolder"
/>
<div class="icon">
<i
:class="folderIcon"
@mouseover="folderIcon = 'codicon codicon-folder-opened'"
@mouseout="folderIcon = 'codicon codicon-folder'"
v-on:click="openEspIdfFolder"
></i>
</div>
</div>
</div>
</div>
Expand All @@ -42,7 +46,7 @@ import { State, Action, Mutation } from "vuex-class";

@Component
export default class SelectEspIdf extends Vue {
private folderIcon = "folder";
private folderIcon = "codicon codicon-folder";
@Action private openEspIdfFolder;
@Mutation setEspIdfPath;
@Mutation setSelectedEspIdfVersion;
Expand Down
17 changes: 9 additions & 8 deletions src/views/setup/components/home/selectPyVersion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@
/>
</div>
<div class="control">
<font-awesome-icon
:icon="folderIcon"
class="open-icon"
@mouseover="folderIcon = 'folder-open'"
@mouseout="folderIcon = 'folder'"
v-on:click="openPythonPath"
/>
<div class="icon">
<i
:class="folderIcon"
@mouseover="folderIcon = 'codicon codicon-folder-opened'"
@mouseout="folderIcon = 'codicon codicon-folder'"
v-on:click="openPythonPath"
></i>
</div>
</div>
</div>
</div>
Expand All @@ -55,7 +56,7 @@ import { Action, Mutation, State } from "vuex-class";

@Component
export default class SelectPyVersion extends Vue {
private folderIcon = "folder";
private folderIcon = "codicon codicon-folder";
@Action private openPythonPath;
@Mutation setSelectedSysPython;
@Mutation setManualPyPath;
Expand Down
21 changes: 0 additions & 21 deletions src/views/setup/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,6 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { library } from "@fortawesome/fontawesome-svg-core";
import {
faArrowCircleDown,
faArrowLeft,
faCheck,
faFolder,
faFolderOpen,
faTimes,
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import Vue from "vue";
import VueRouter from "vue-router";
import { store } from "./store";
Expand All @@ -45,16 +34,6 @@ const router = new VueRouter({
base: __dirname,
});

library.add(
faArrowLeft,
faArrowCircleDown,
faCheck,
faFolder,
faFolderOpen,
faTimes
);
Vue.component("font-awesome-icon", FontAwesomeIcon);

const app = new Vue({
el: "#app",
components: { App },
Expand Down
7 changes: 7 additions & 0 deletions src/views/setup/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface IState {
pyVersionsList: string[];
selectedEspIdfVersion: IEspIdfLink;
selectedSysPython: string;
toolsFolder: string;
toolsResults: IToolInfo[];
virtualEnvPyPath: string;
}
Expand All @@ -59,6 +60,7 @@ export const setupState: IState = {
url: "",
},
selectedSysPython: "",
toolsFolder: "",
toolsResults: [],
virtualEnvPyPath: "",
};
Expand Down Expand Up @@ -171,6 +173,11 @@ export const mutations: MutationTree<IState> = {
newState.selectedSysPython = selectedSysPython;
Object.assign(state, newState);
},
setToolsFolder(state, toolsFolder: string) {
const newState = state;
newState.toolsFolder = toolsFolder;
Object.assign(state, newState);
},
setToolsResult(state, toolsResults: IToolInfo[]) {
const newState = state;
newState.toolsResults = toolsResults;
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6291,6 +6291,11 @@ vsce@^1.52.0:
yauzl "^2.3.1"
yazl "^2.2.2"

vscode-codicons@^0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/vscode-codicons/-/vscode-codicons-0.0.7.tgz#86113f001e8abf630759500ea65c9708739c76b2"
integrity sha512-xqYypi4Ihth3bZgoE6961FYJBrmFErC+YouSC5Tn0pHqv0QSrP0PK++EIVNBi0I9Ted1OetZ3aWlNUWq1QaMBA==

vscode-debugadapter-testsupport@^1.34.0:
version "1.41.0"
resolved "https://registry.yarnpkg.com/vscode-debugadapter-testsupport/-/vscode-debugadapter-testsupport-1.41.0.tgz#db2b6c743ef07b1f57828168bdc5f7a5e50ae21a"
Expand Down