Skip to content

Commit 2b6c401

Browse files
FaizFaiz
authored andcommitted
Project grid, list view pixel perfection
1 parent 2b198c7 commit 2b6c401

9 files changed

Lines changed: 82 additions & 53 deletions

File tree

assets/img/grid.svg

Lines changed: 8 additions & 0 deletions
Loading

assets/img/list.svg

Lines changed: 10 additions & 0 deletions
Loading

assets/scss/main.scss

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,14 @@ label > .form-select:first-child {
141141
/* TDEI Utility Classes */
142142

143143
.page-header-title {
144-
font-family: var(--secondary-font-family);
145-
font-size: 1.5rem;
144+
font-family: var(--primary-font-family);
145+
font-size: 20px;
146146
font-weight: 700;
147147
margin-bottom: 0.3125rem;
148148
}
149149

150150
.page-header-subtitle {
151-
font-family: var(--secondary-font-family);
151+
font-family: var(--primary-font-family);
152152
font-size: 0.875rem;
153153
color: $tdei-secondary;
154154
}
@@ -182,31 +182,30 @@ label > .form-select:first-child {
182182

183183
.tdei-list-title {
184184
color: $text-navy;
185-
font-family: var(--secondary-font-family);
186-
font-size: 1rem;
187-
font-weight: 600;
185+
font-size: 16px;
186+
font-weight: 700;
188187
line-height: 1.45;
189-
letter-spacing: -0.01em;
190188
}
191189

192190
.tdei-list-meta-label {
193-
color: rgba($secondary, 0.92);
194-
font-size: 0.95rem;
191+
color: $text-secondary;
192+
font-size: 14px;
195193
font-weight: 400;
196194
line-height: 1.25;
197195
}
198196

199197
.tdei-list-meta-value {
200198
color: $text-navy;
201-
font-size: 1rem;
199+
font-size: 14px;
202200
font-weight: 600;
203201
line-height: 1.3;
204202
}
205203

206204
.tdei-list-progress-copy {
207-
color: rgba($secondary, 0.95);
208-
font-size: 1rem;
205+
color: $text-secondary;
206+
font-size: 14px;
209207
line-height: 1.25;
208+
font-weight: 600;
210209
}
211210

212211
.tdei-list-progress-copy strong {
@@ -229,7 +228,7 @@ label > .form-select:first-child {
229228
.tdei-inline-filter-label {
230229
color: $text-navy;
231230
font-size: 1rem;
232-
font-weight: 600;
231+
font-weight: 500;
233232
line-height: 1;
234233
}
235234

assets/scss/theme.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ $tdei-cyan: #59c3c8;
2222
$purple-background-light: #f4f0fb;
2323
$purple-background-dark: #ddd2ee;
2424
$purple-background-medium: #ebe4f6;
25-
$text-navy: #2f3661;
25+
$text-navy: #1A1E3D;
26+
$text-secondary: #5A607B;
2627
$dropdown-active-bg: #e2f0f8;
2728
$danger-red: #c7393a;
2829

components/workspace-projects/ProjectCard.vue

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ const projectRoute = computed(
130130
height: 100%;
131131
cursor: pointer;
132132
background-color: #ffffff;
133-
border: 1px solid rgba($text-navy, 0.1);
134-
border-radius: 0.8rem;
135-
box-shadow: 0 0.35rem 0.9rem rgba($text-navy, 0.08);
133+
box-shadow: 0px 3px 6px #0000000D;
134+
border: 1px solid #E5E7F0;
135+
border-radius: 10px;
136136
transition:
137137
transform 160ms ease,
138138
box-shadow 160ms ease,
@@ -190,16 +190,15 @@ const projectRoute = computed(
190190
display: flex;
191191
flex: 1;
192192
flex-direction: column;
193-
gap: 1rem;
193+
gap: 20px;
194194
padding: 0.9rem 1.2rem 1.3rem;
195195
}
196196
197197
.project-card-title {
198198
display: -webkit-box;
199199
margin: 0;
200200
color: $text-navy;
201-
font-family: var(--secondary-font-family);
202-
font-size: 1.05rem;
201+
font-size: 16px;
203202
font-weight: 700;
204203
line-height: 1.5;
205204
overflow: hidden;
@@ -226,18 +225,18 @@ const projectRoute = computed(
226225
align-items: center;
227226
justify-content: space-between;
228227
gap: 1rem;
229-
color: rgba($secondary, 0.95);
230-
font-size: 0.95rem;
228+
color: $text-secondary;
229+
font-size: 14px;
231230
}
232231
233232
.project-progress-copy strong {
234233
font-weight: 600;
235-
color: $text-navy;
236234
}
237235
238236
.project-progress-bar {
239237
height: 0.35rem;
240-
background-color: #e5e8f3;
238+
background-color: #EBEDF6;
239+
margin-top: -10px;
241240
}
242241
243242
.project-progress-bar .progress-bar {
@@ -266,16 +265,16 @@ const projectRoute = computed(
266265
display: block;
267266
min-width: 0;
268267
color: $text-navy;
269-
font-size: 0.95rem;
270-
font-weight: 400;
268+
font-size: 14px;
269+
font-weight: 500;
271270
overflow-wrap: anywhere;
272271
word-break: break-word;
273272
}
274273
275274
.project-card-label {
276275
display: block;
277276
margin-bottom: 0.1rem;
278-
color: rgba($secondary, 0.92);
279-
font-size: 0.85rem;
277+
color: $text-secondary;
278+
font-size: 14px;
280279
}
281280
</style>

components/workspace-projects/ProjectListRow.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ const projectRoute = computed(
101101
grid-template-columns: minmax(0, 2.9fr) minmax(8.5rem, 1.1fr) minmax(12rem, 1.35fr) minmax(11rem, 1.2fr) minmax(15rem, 1.6fr) 2.25rem;
102102
gap: 1.5rem;
103103
align-items: start;
104-
padding: 2.2rem 0;
104+
padding: 25px 10px;
105105
cursor: pointer;
106106
border-bottom: 1px solid rgba($text-navy, 0.08);
107107
transition: background-color 160ms ease;
@@ -146,7 +146,7 @@ const projectRoute = computed(
146146
.project-list-progress-cell {
147147
display: grid;
148148
align-content: start;
149-
gap: 0.7rem;
149+
gap: 15px;
150150
padding-top: 0.05rem;
151151
}
152152

components/workspace-projects/StatusBadge.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,12 @@ const badgeClasses = computed(() => ({
6767
gap: 0.35rem;
6868
border: 1px solid currentColor;
6969
border-radius: 999px;
70-
font-size: 0.875rem;
71-
font-weight: 400;
70+
font-size: 12px;
71+
font-weight: 600;
7272
line-height: 1;
73-
padding: 0.38rem 0.72rem;
73+
padding: 6px 10px;
7474
white-space: nowrap;
75+
width: fit-content;
7576
}
7677
7778
.project-status-badge-icon {
@@ -90,20 +91,20 @@ const badgeClasses = computed(() => ({
9091
}
9192
9293
.project-status-badge-completed {
93-
background-color: #f6fcfa;
94-
border-color: #d4e4dd;
95-
color: #5c9f83;
94+
background-color: #F6FCFA;
95+
border-color: #D4E4DD;
96+
color: #067A57;
9697
}
9798
9899
.project-status-badge-in-progress {
99-
background-color: #f4fbff;
100-
border-color: #c8e0ee;
101-
color: #5a97cc;
100+
background-color: #F4FBFF;
101+
border-color: #C8E0EE;
102+
color: #1A74A8;
102103
}
103104
104105
.project-status-badge-draft {
105-
background-color: #fffcf5;
106+
background-color: #FFFCF5;
106107
border-color: #e9e1d3;
107-
color: #b88d41;
108+
color: #8F6C1A;
108109
}
109110
</style>

composables/useProjectDisplay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function useProjectDisplay(project: Ref<WorkspaceProject> | WorkspaceProj
1313

1414
const taskSummary = computed(() =>
1515
progressPercent.value === 0
16-
? 'Not started'
16+
? 'Not Started'
1717
: `${completedTaskCount.value}/${projectRef.value.taskCount} Tasks Executed`,
1818
);
1919

pages/workspace/[id]/projects/index.vue

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,17 @@
7171
:aria-pressed="option.value === viewMode"
7272
@click="viewMode = option.value"
7373
>
74-
<app-icon
75-
:variant="option.icon"
76-
size="20"
77-
no-margin
74+
<img
75+
:src="option.icon"
76+
:alt="option.label"
77+
class="view-icon"
7878
/>
7979
<span class="visually-hidden">{{ option.label }}</span>
8080
</button>
8181
</div>
8282

8383
<span
84+
v-if="isWorkspaceLead"
8485
class="workspace-projects-toolbar-divider"
8586
aria-hidden="true"
8687
/>
@@ -208,6 +209,8 @@
208209
<script setup lang="ts">
209210
import { LoadingContext } from '~/services/loading';
210211
import { tdeiUserClient, workspaceProjectsClient, workspacesClient } from '~/services/index';
212+
import gridIcon from '~/assets/img/grid.svg';
213+
import listIcon from '~/assets/img/list.svg';
211214
212215
import type {
213216
WorkspaceProjectsQuery,
@@ -270,8 +273,8 @@ const sortOptions: SelectOption[] = [
270273
];
271274
272275
const viewOptions: Array<{ icon: string; label: string; value: WorkspaceProjectView }> = [
273-
{ icon: 'grid_view', label: 'Grid view', value: 'grid' },
274-
{ icon: 'view_list', label: 'List view', value: 'list' },
276+
{ icon: gridIcon, label: 'Grid view', value: 'grid' },
277+
{ icon: listIcon, label: 'List view', value: 'list' },
275278
];
276279
277280
const statusOptions: SelectOption[] = [
@@ -411,7 +414,7 @@ onBeforeUnmount(() => {
411414
.workspace-projects-filters {
412415
display: flex;
413416
align-items: center;
414-
gap: 1rem;
417+
gap: 20px;
415418
flex: 1;
416419
min-width: 0;
417420
}
@@ -473,15 +476,24 @@ onBeforeUnmount(() => {
473476
display: inline-flex;
474477
align-items: center;
475478
justify-content: center;
476-
width: 2.8rem;
479+
width: 2.4rem;
477480
height: 2.4rem;
478481
color: $secondary;
479482
background-color: #fff;
480483
border: 0;
481484
}
482485
486+
.workspace-projects-view-button i.material-icons{
487+
margin-top: 0px;
488+
}
489+
490+
.workspace-projects-view-button .view-icon {
491+
width: 16px;
492+
height: 16px;
493+
}
494+
483495
.workspace-projects-view-button-active {
484-
background-color: $gray-200;
496+
background-color: #EBEDF6;
485497
}
486498
487499
.workspace-projects-toolbar-divider {
@@ -505,13 +517,12 @@ onBeforeUnmount(() => {
505517
.workspace-projects-list {
506518
gap: 0;
507519
border-top: 1px solid rgba($text-navy, 0.08);
508-
border-bottom: 1px solid rgba($text-navy, 0.08);
509520
}
510521
511522
.workspace-projects-grid {
512523
display: grid;
513524
grid-template-columns: repeat(4, minmax(0, 1fr));
514-
gap: 1.6rem 1.2rem;
525+
gap: 25px 25px;
515526
}
516527
517528
.workspace-projects-empty-state {

0 commit comments

Comments
 (0)