Skip to content

Commit 5c13d2c

Browse files
authored
FTUE modal UI adjustments (#1328)
* FTUE modal UI adjustments * More responsive CSS goodness
1 parent 398c86f commit 5c13d2c

File tree

8 files changed

+61
-87
lines changed

8 files changed

+61
-87
lines changed

frontend/src/components/FTUE/CalDavProvider.vue

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,31 +80,31 @@ const onSubmit = async () => {
8080
</script>
8181
<template>
8282
<div class="content">
83-
<form class="form" ref="formRef" @submit.prevent @keyup.enter="() => onSubmit()">
84-
<text-input :disabled="isLoading" name="user" v-model="principal.user" :help="t('calDAVForm.help.user')" :required="true">
85-
{{ t('label.username') }}
86-
</text-input>
87-
<text-input :disabled="isLoading" :placeholder="locationPreview" name="url" :help="t('calDAVForm.help.location')" v-model="principal.url">
88-
{{ t('label.location') }}
89-
</text-input>
90-
<text-input :disabled="isLoading" type="password" name="password" :help="t('calDAVForm.help.password')" v-model="principal.password">
91-
{{ t('label.password') }}
92-
</text-input>
93-
</form>
94-
<div class="buttons">
95-
<primary-button variant="outline" class="btn-switch" @click="emits('switch')" v-if="showSwitch">
96-
{{ t('calDAVForm.switchToGoogleCalendar') }}
97-
</primary-button>
98-
<primary-button variant="outline" @click="emits('previous')" v-if="showPrevious">
99-
{{ t('label.back') }}
100-
</primary-button>
101-
<primary-button
102-
:label="t('label.connect')"
103-
:disabled="isLoading"
104-
@click="onSubmit"
105-
>{{ t('label.connect') }}</primary-button>
106-
</div>
83+
<form class="form" ref="formRef" @submit.prevent @keyup.enter="() => onSubmit()">
84+
<text-input :disabled="isLoading" name="user" v-model="principal.user" :help="t('calDAVForm.help.user')" :required="true">
85+
{{ t('label.username') }}
86+
</text-input>
87+
<text-input :disabled="isLoading" :placeholder="locationPreview" name="url" :help="t('calDAVForm.help.location')" v-model="principal.url">
88+
{{ t('label.location') }}
89+
</text-input>
90+
<text-input :disabled="isLoading" type="password" name="password" :help="t('calDAVForm.help.password')" v-model="principal.password">
91+
{{ t('label.password') }}
92+
</text-input>
93+
</form>
94+
<div class="buttons">
95+
<primary-button variant="outline" class="btn-switch" @click="emits('switch')" v-if="showSwitch">
96+
{{ t('calDAVForm.switchToGoogleCalendar') }}
97+
</primary-button>
98+
<primary-button variant="outline" @click="emits('previous')" v-if="showPrevious">
99+
{{ t('label.back') }}
100+
</primary-button>
101+
<primary-button
102+
:label="t('label.connect')"
103+
:disabled="isLoading"
104+
@click="onSubmit"
105+
>{{ t('label.connect') }}</primary-button>
107106
</div>
107+
</div>
108108
</template>
109109
<style scoped>
110110
@import '@/assets/styles/custom-media.pcss';
@@ -123,25 +123,20 @@ const onSubmit = async () => {
123123
margin: auto;
124124
}
125125
.btn-switch {
126-
margin-left: 2rem;
127126
margin-right: auto;
128127
}
129128
.buttons {
130129
display: flex;
130+
flex-direction: column;
131131
width: 100%;
132132
gap: 1rem;
133133
justify-content: center;
134-
margin-top: 2rem;
135-
left: auto;
136-
right: auto;
134+
margin-block-end: 2rem;
137135
}
138136
@media (--md) {
139137
.buttons {
138+
flex-direction: row;
140139
justify-content: flex-end;
141-
position: absolute;
142-
right: 2rem;
143-
bottom: 5.75rem;
144-
margin: 0;
145140
}
146141
}
147142
</style>

frontend/src/components/FTUE/ConnectCalendars.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ const onSubmit = async () => {
114114
width: 100%;
115115
justify-content: center;
116116
align-items: center;
117-
118117
}
119118
120119
.sync-card {
@@ -133,7 +132,7 @@ const onSubmit = async () => {
133132
width: 100%;
134133
gap: 1rem;
135134
justify-content: center;
136-
margin-top: 2rem;
135+
margin-block: 2rem;
137136
}
138137
139138
@media (--md) {
@@ -143,9 +142,6 @@ const onSubmit = async () => {
143142
144143
.buttons {
145144
justify-content: flex-end;
146-
position: absolute;
147-
bottom: 5.75rem;
148-
margin: 0;
149145
}
150146
}
151147
</style>

frontend/src/components/FTUE/ConnectVideo.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ const connectZoom = async () => {
226226
width: 100%;
227227
gap: 1rem;
228228
justify-content: center;
229-
margin-top: 2rem;
229+
margin-block: 2rem;
230230
}
231231
232232
.skip-text {
@@ -243,9 +243,6 @@ const connectZoom = async () => {
243243
@media (--md) {
244244
.buttons {
245245
justify-content: flex-end;
246-
position: absolute;
247-
bottom: 5.75rem;
248-
margin: 0;
249246
}
250247
251248
.card {

frontend/src/components/FTUE/GoogleOauthProvider.vue

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ const onSubmit = async () => {
145145
</primary-button>
146146
<primary-button
147147
class="btn-continue"
148-
variant="outline"
149148
:title="t('label.connectGoogleCalendar')"
150149
v-if="hasNextStep"
151150
@click="onSubmit()"
@@ -178,7 +177,7 @@ const onSubmit = async () => {
178177
@mixin faded-background var(--colour-background);
179178
@mixin faded-border var(--colour-background);
180179
font-size: 0.8125rem;
181-
margin: auto;
180+
margin: 0 auto;
182181
}
183182
184183
.dark {
@@ -201,10 +200,11 @@ const onSubmit = async () => {
201200
202201
.buttons {
203202
display: flex;
203+
flex-direction: column;
204204
width: 100%;
205205
gap: 1rem;
206206
justify-content: center;
207-
margin-top: 2rem;
207+
margin-block: 2rem;
208208
right: auto;
209209
left: auto;
210210
}
@@ -215,10 +215,8 @@ const onSubmit = async () => {
215215
}
216216
217217
.buttons {
218+
flex-direction: row;
218219
justify-content: flex-end;
219-
position: absolute;
220-
bottom: 5.75rem;
221-
margin: 0;
222220
}
223221
}
224222
</style>

frontend/src/components/FTUE/SetupProfile.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,12 @@ form {
125125
width: 100%;
126126
gap: 1rem;
127127
justify-content: center;
128-
margin-top: 2rem;
128+
margin-block: 1rem;
129129
}
130130
131131
@media (--md) {
132132
.buttons {
133133
justify-content: flex-end;
134-
position: absolute;
135-
bottom: 5.75rem;
136-
margin: 0;
137134
}
138135
}
139136
</style>

frontend/src/components/FTUE/SetupSchedule.vue

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,18 @@ form {
213213
padding: 1rem;
214214
}
215215
216+
.column {
217+
display: flex;
218+
flex-direction: column;
219+
gap: 1rem;
220+
}
221+
222+
.pair {
223+
display: flex;
224+
flex-direction: column;
225+
gap: 1rem;
226+
}
227+
216228
.dark {
217229
.card {
218230
--colour-background: var(--colour-neutral-lower);
@@ -233,6 +245,7 @@ form {
233245
justify-content: center;
234246
align-items: center;
235247
font-family: 'Inter', 'sans-serif';
248+
margin-block-end: 2rem;
236249
}
237250
238251
.scheduleInfo {
@@ -257,7 +270,7 @@ form {
257270
width: 100%;
258271
gap: 1rem;
259272
justify-content: center;
260-
margin-top: 2rem;
273+
margin-block-end: 2rem;
261274
}
262275
263276
@media (--md) {
@@ -266,23 +279,18 @@ form {
266279
}
267280
.buttons {
268281
justify-content: flex-end;
269-
position: absolute;
270-
bottom: 5.75rem;
271-
margin: 0;
272282
}
273283
form {
274284
flex-direction: row;
275-
width: 40.0rem;
276-
height: 18rem
285+
width: 100%;
286+
height: 100%;
277287
}
278288
.column {
279-
display: flex;
280-
flex-direction: column;
281-
gap: 1rem;
282289
width: 50%;
283290
}
284291
.pair {
285292
display: flex;
293+
flex-direction: row;
286294
gap: 2rem;
287295
}
288296
}

frontend/src/components/FTUE/StepFinish.vue

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ const copyLink = async () => {
9696
width: 100%;
9797
justify-content: center;
9898
align-items: center;
99-
10099
}
101100
102101
.copy {
@@ -111,6 +110,10 @@ const copyLink = async () => {
111110
flex-direction: row-reverse;
112111
}
113112
113+
:deep(.base.link.filled > span) {
114+
line-height: 1.25rem;
115+
}
116+
114117
.link {
115118
text-decoration: underline;
116119
border: none;
@@ -126,12 +129,11 @@ const copyLink = async () => {
126129
width: 100%;
127130
gap: 1rem;
128131
justify-content: center;
129-
margin-top: 2rem;
132+
margin-block: 2rem;
130133
}
131134
132135
@media (--md) {
133136
.content {
134-
margin-top: -6rem;
135137
gap: 0;
136138
}
137139
.copy {
@@ -140,9 +142,6 @@ const copyLink = async () => {
140142
141143
.buttons {
142144
justify-content: flex-end;
143-
position: absolute;
144-
bottom: 5.75rem;
145-
margin: 0;
146145
}
147146
}
148147
</style>

frontend/src/views/FirstTimeUserExperienceView.vue

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ onMounted(async () => {
3333
<dashboard-view></dashboard-view>
3434
<div class="page-ftue overlay" role="dialog" tabindex="-1" aria-labelledby="ftue-title" aria-modal="true">
3535
<div class="modal">
36-
<div class="relative flex size-full w-full flex-col items-center gap-4">
36+
<div class="relative flex w-full flex-col items-center">
3737
<div class="modal-header">
3838
<word-mark v-if="currentStep === FtueStep.SetupProfile || currentStep === FtueStep.Finish"/>
3939
<h2 id="ftue-title">
@@ -57,7 +57,6 @@ onMounted(async () => {
5757
:scheme="AlertSchemes.Info"
5858
@close="infoMessage = null"
5959
/>
60-
<div class="pls-keep-height" v-else/>
6160
</div>
6261
<div class="modal-body flex w-full flex-col items-center justify-center">
6362
<setup-profile v-if="currentStep === FtueStep.SetupProfile"/>
@@ -110,14 +109,9 @@ body {
110109
flex-direction: column;
111110
justify-content: center;
112111
align-items: center;
113-
min-height: 8.0rem;
114112
width: 100%;
115113
gap: 1rem;
116-
}
117-
118-
/* Empty space if a notice bar isn't shown */
119-
.pls-keep-height {
120-
min-height: 2.0625rem; /* 33px */
114+
margin-block-end: 1rem;
121115
}
122116
123117
#ftue-title {
@@ -126,6 +120,7 @@ body {
126120
font-weight: 400;
127121
font-size: 1.375rem;
128122
line-height: 1.664rem;
123+
margin-block: 1rem;
129124
}
130125
131126
/* position-center apmt-background-color fixed z-[60] flex size-full gap-6 rounded-xl bg-white p-8 pb-0 drop-shadow-xl*/
@@ -184,7 +179,6 @@ body {
184179
}
185180
186181
.footer {
187-
bottom: 0;
188182
height: 4rem;
189183
width: 100%;
190184
display: flex;
@@ -226,30 +220,20 @@ body {
226220
}
227221
228222
@media (--md) {
229-
.modal-header {
230-
margin-bottom: 0;
231-
}
232-
233223
.modal {
224+
box-sizing: content-box;
234225
width: 50rem; /* 800px */
235-
height: 37.5rem; /* 600px */
226+
height: fit-content;
236227
padding: 2rem 2rem 0;
237228
overflow: visible;
238229
}
239230
240-
.modal-body {
241-
height: 15.0rem;
242-
}
243-
244231
.divider {
245-
position: absolute;
246-
bottom: 4rem;
247232
width: 50rem;
248233
height: 0.0625rem;
249234
}
250235
251236
.footer {
252-
position: absolute;
253237
padding-bottom: 0;
254238
}
255239
}

0 commit comments

Comments
 (0)