Skip to content

Commit ec61f47

Browse files
committed
left sidebar restyling in progress: removed upload mockup; removed icons from tabs; reordered create component fields; added accordion to create component; moved undo redo buttons;
Co-authored by Aram Paparian <[email protected]>
1 parent badf89a commit ec61f47

File tree

11 files changed

+217
-102
lines changed

11 files changed

+217
-102
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
},
2525
"dependencies": {
2626
"@quasar/extras": "^1.12.5",
27+
"@ssthouse/vue3-tree-chart": "^0.2.3",
2728
"core-js": "^3.21.1",
2829
"dotenv": "^16.0.0",
2930
"electron-deeplink": "^1.0.9",

src/components/ComponentDisplay.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ export default {
396396
};
397397
</script>
398398

399-
<style scoped>
399+
<style scoped lang="scss">
400400
.component-title {
401401
position: relative;
402402
font-size: 16px;
@@ -430,25 +430,25 @@ export default {
430430
background-color: rgba(223, 218, 218, 0.886);
431431
background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
432432
background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
433-
background-image: -webkit-linear-gradient(white 2px, transparent 2px),
434-
-webkit-linear-gradient(0, white 2px, transparent 2px),
433+
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
434+
-webkit-linear-gradient(0, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
435435
-webkit-linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
436436
-webkit-linear-gradient(0, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
437-
background-image: -moz-linear-gradient(white 2px, transparent 2px),
438-
-moz-linear-gradient(0, white 2px, transparent 2px),
437+
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
438+
-moz-linear-gradient(0, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
439439
-moz-linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
440440
-moz-linear-gradient(0, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
441-
background-image: linear-gradient(white 2px, transparent 2px),
442-
linear-gradient(90deg, white 2px, transparent 2px),
441+
background-image: linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
442+
linear-gradient(90deg, rgba(255, 255, 255, 0.8) 1px, transparent 1px),
443443
linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px),
444444
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px);
445-
-pie-background: linear-gradient(white 2px, transparent 2px) -2px -2px / 100px,
446-
linear-gradient(90deg, white 2px, transparent 2px) -2px -2px / 100px,
445+
-pie-background: linear-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px) -2px -2px / 100px,
446+
linear-gradient(90deg, rgba(255, 255, 255, 0.8) 1px, transparent 1px) -2px -2px / 100px,
447447
linear-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px) -1px -1px /
448448
20px,
449449
linear-gradient(90deg, rgba(255, 255, 255, 0.3) 1px, transparent 1px) -1px -1px /
450450
20px,
451-
#269;
451+
$secondary;
452452
behavior: url(/pie/PIE.htc);
453453
}
454454
.menu {
@@ -464,7 +464,7 @@ export default {
464464
position: absolute;
465465
}
466466
.active {
467-
background-color: rgba(105, 179, 190, 0.514);
467+
background-color: $accent;
468468
border: 1px dashed rgb(227, 203, 71);
469469
}
470470
.btn {

src/components/home_sidebar_items/ComponentTab/ComponentTab.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Functionality includes: if active component is selected, will switch view to editing mode. If not, it will be in create mode -->
33
<template>
44
<q-card id="store-cards">
5-
<UploadImage v-if="activeComponent === ''"/>
65
<CreateComponent v-if="activeComponent === ''"/>
76
<EditDeleteComponents v-if="activeComponent !== ''"/>
87
</q-card>
@@ -35,7 +34,7 @@ export default {
3534
<style lang="scss">
3635
// give html background color of grey
3736
.html-bg {
38-
background-color: #202122;
37+
background-color: $subprimary;
3938
}
4039
#store-cards {
4140
height: 100%;

src/components/home_sidebar_items/ComponentTab/CreateComponent.vue

Lines changed: 97 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -6,43 +6,51 @@ Description:
66
<!-- 4.0 adjustment: conditional render to switch between new comp name input and editing active comp name, moved from EditDeleteComponents -->
77

88
<template>
9-
<div class="inner-div drawer-menu">
10-
<br />
11-
<form v-on:submit.prevent="createComponent">
12-
<!-- will render if creating new component -->
13-
<q-input
14-
v-if="activeComponent === ''"
15-
standout="bg-secondary text-white"
16-
bottom-slots
17-
v-on:keyup.delete.stop
18-
v-model="componentNameInputValue"
19-
label="Component Name"
20-
dense
21-
class="input-add"
22-
></q-input>
23-
</form>
24-
<div class="icon-container">
25-
<Icons
26-
class="icons"
27-
@getClickedIcon="addToSelectedElementList"
28-
@activeElement="addToComponentElementList"
29-
@activeHTML="addNestedHTML"
30-
@activeLayer="addNestedNoActive"
31-
/>
32-
</div>
33-
<ParentMultiselect v-if="activeComponent === ''"></ParentMultiselect>
34-
<br />
9+
<div class="create-component-div inner-div drawer-menu">
10+
<q-expansion-item group="accordion" label="Import Component">
11+
<ImportComponent v-if="activeComponent === ''" @imported="createComponent" />
12+
</q-expansion-item>
13+
<q-expansion-item group="accordion" label="Create Component">
14+
<form class="create-component-form" v-on:submit.prevent="createComponent">
15+
<!-- will render if creating new component -->
16+
<q-input
17+
v-if="activeComponent === ''"
18+
v-on:keyup.delete.stop
19+
v-model="componentNameInputValue"
20+
label="Component Name"
21+
color="accent"
22+
dark
23+
dense
24+
outlined
25+
item-aligned
26+
padding="5px"
27+
class="input-add"
28+
></q-input>
29+
</form>
3530

36-
<q-btn
37-
v-if="activeComponent === ''"
38-
id="add-component-btn"
39-
color="secondary"
40-
label="Create Component"
41-
@click="createComponent"
42-
:disabled="!componentNameInputValue.trim()"
43-
/>
44-
<ImportComponent v-if="activeComponent === ''" @imported="createComponent"/>
31+
<ParentMultiselect v-if="activeComponent === ''"></ParentMultiselect>
32+
<div class="subsection">HTML Elements</div>
33+
<div class="icon-container">
34+
<Icons
35+
class="icons"
36+
@getClickedIcon="addToSelectedElementList"
37+
@activeElement="addToComponentElementList"
38+
@activeHTML="addNestedHTML"
39+
@activeLayer="addNestedNoActive"
40+
/>
41+
</div>
42+
<div class="componentHTML"></div>
43+
<br />
4544

45+
<q-btn
46+
id="create-component-btn"
47+
v-if="activeComponent === ''"
48+
color="secondary"
49+
label="Create Component"
50+
@click="createComponent"
51+
:disabled="!componentNameInputValue.trim()"
52+
/>
53+
</q-expansion-item>
4654
</div>
4755
</template>
4856

@@ -152,25 +160,58 @@ export default {
152160
</script>
153161

154162
<style lang="scss" scoped>
155-
.is-primary {
156-
height: 45px;
157-
}
158-
#add-component-btn {
159-
height: 15px;
160-
margin: 0.75rem;
161-
width: 90%;
162-
}
163-
#import-component-btn {
164-
height: 15px;
165-
margin: 0 0.75rem;
166-
width: 90%;
167-
}
168-
.inner-div {
169-
display: flex;
170-
flex-direction: column;
171-
justify-content: flex-start;
172-
padding-left: 15px;
173-
padding-right: 15px;
174-
height: 100%;
175-
}
163+
.create-component-div {
164+
display: flex;
165+
flex-direction: column;
166+
justify-content: flex-start;
167+
align-items: stretch;
168+
margin: 20px;
169+
}
170+
.create-component-form {
171+
display: flex;
172+
flex-direction: column;
173+
justify-content: flex-start;
174+
align-items: stretch;
175+
padding: -20px;
176+
}
177+
.subsection {
178+
border-top: 1px solid rgba(245, 245, 245, 0.3);
179+
padding: 10px 0 0;
180+
margin: 20px 0 0;
181+
}
182+
.componentHTML {
183+
height: 100px;
184+
margin-top: 20px;
185+
overflow-y: scroll;
186+
border: 1px solid rgba(245, 245, 245, 0.3);
187+
border-radius: 5px;
188+
display: flex;
189+
flex-direction: column;
190+
align-items: center;
191+
}
192+
193+
#create-component-btn {
194+
width: 100%;
195+
}
196+
// .is-primary {
197+
// height: 45px;
198+
// }
199+
// #add-component-btn {
200+
// height: 15px;
201+
// margin: 0.75rem;
202+
// width: 90%;
203+
// }
204+
// #import-component-btn {
205+
// height: 15px;
206+
// margin: 0 0.75rem;
207+
// width: 90%;
208+
// }
209+
// .inner-div {
210+
// display: flex;
211+
// flex-direction: column;
212+
// justify-content: flex-start;
213+
// padding-left: 15px;
214+
// padding-right: 15px;
215+
// height: 100%;
216+
// }
176217
</style>

src/components/home_sidebar_items/ComponentTab/EditDeleteComponents.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ p {
385385
}
386386
387387
#deleteButton {
388-
background-color: #289ead;
388+
background-color: $secondary;
389389
color: white;
390390
}
391391

src/components/home_sidebar_items/ComponentTab/Icons.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default {
8888
};
8989
</script>
9090

91-
<style scoped>
91+
<style scoped lang="scss">
9292
.icon-grid {
9393
display: grid;
9494
grid-template-columns: 33% 33% 33%;
@@ -111,11 +111,11 @@ button {
111111
}
112112
button:hover {
113113
cursor: pointer;
114-
color: #00ffff;
114+
color: $secondary;
115115
}
116116
button:focus {
117117
outline: none;
118-
color: #00ffff;
118+
color: $secondary;
119119
}
120120
button:active {
121121
box-shadow: 0 5px inherit;
@@ -129,7 +129,7 @@ button:active {
129129
font-weight: bold;
130130
float: right;
131131
border-radius: 50%;
132-
background-color: #228585;
132+
background-color: $secondary;
133133
color: white;
134134
}
135135
</style>

src/components/home_sidebar_items/ComponentTab/ImportComponent.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<q-btn
33
id="import-component-btn"
4+
size="md"
45
color="secondary"
56
label="Import Component"
67
@click="importComponent"
@@ -254,6 +255,14 @@ export default {
254255
255256
</script>
256257

258+
<style scoped>
259+
#import-component-btn {
260+
margin: 20px 0;
261+
width: 100%;
262+
align-items: center;
263+
}
264+
</style>
265+
257266

258267

259268

src/components/home_sidebar_items/ComponentTab/ParentMultiselect.vue

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Description:
66

77
<template>
88
<div id="parent-select">
9-
<br />
109
<VueMultiselect
1110
v-model="value"
1211
placeholder="Parent Component"
@@ -15,7 +14,7 @@ Description:
1514
:options="options"
1615
@select="selectParent"
1716
@open="resetActiveComponent"
18-
:max-height="90"
17+
:max-height="150"
1918
:option-height="20"
2019
:searchable="true"
2120
>
@@ -76,10 +75,31 @@ export default {
7675
</script>
7776

7877
<style src="vue-multiselect/dist/vue-multiselect.css"></style>
79-
<style scoped>
80-
#parent-select {
81-
height: 30px;
82-
margin: 0.75rem;
83-
width: 90%;
78+
<style scoped lang="scss">
79+
:global(.multiselect__tags) {
80+
background-color: $subprimary;
81+
border: 1px solid rgb(180, 180, 180);
82+
}
83+
:global(.multiselect__input) {
84+
background-color: $subprimary;
85+
color: white;
86+
}
87+
:global(.multiselect__content) {
88+
background-color: $subprimary;
89+
color: white;
90+
}
91+
:global(.multiselect__option) {
92+
color: white;
93+
}
94+
:global(.multiselect__single) {
95+
background-color: $subsecondary;
96+
color: white;
97+
}
98+
:global(.multiselect__single:focus) {
99+
background-color: $subsecondary;
100+
color: white;
101+
}
102+
:global(.multiselect__input::placeholder) {
103+
color: white;
84104
}
85105
</style>

0 commit comments

Comments
 (0)