Commit 2e0423a9 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '297211-styling-cleanup' into 'master'

Rotation controls styling cleanup

See merge request gitlab-org/gitlab!51353
parents 803166d3 587647bc
...@@ -32,13 +32,17 @@ ...@@ -32,13 +32,17 @@
.rotations-modal { .rotations-modal {
.gl-card { .gl-card {
min-width: 75%; min-width: 75%;
width: fit-content;
@include gl-bg-gray-10;
} }
&.gl-modal .modal-md { &.gl-modal .modal-md {
max-width: 640px; max-width: 640px;
} }
// TODO: move to gitlab/ui utilities
// https://gitlab.com/gitlab-org/gitlab/-/issues/297502
.gl-w-fit-content {
width: fit-content;
}
} }
//// Copied from roadmaps.scss - adapted for on-call schedules //// Copied from roadmaps.scss - adapted for on-call schedules
......
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
<gl-dropdown <gl-dropdown
data-testid="rotation-start-time" data-testid="rotation-start-time"
:text="format24HourTimeStringFromInt(form.startsAt.time)" :text="format24HourTimeStringFromInt(form.startsAt.time)"
class="gl-w-12 gl-pl-3" class="gl-px-3"
> >
<gl-dropdown-item <gl-dropdown-item
v-for="time in $options.HOURS_IN_DAY" v-for="time in $options.HOURS_IN_DAY"
...@@ -220,11 +220,11 @@ export default { ...@@ -220,11 +220,11 @@ export default {
<span class="gl-white-space-nowrap"> {{ format24HourTimeStringFromInt(time) }}</span> <span class="gl-white-space-nowrap"> {{ format24HourTimeStringFromInt(time) }}</span>
</gl-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
<span class="gl-pl-5"> {{ schedule.timezone }} </span> <span> {{ schedule.timezone }} </span>
</div> </div>
</gl-form-group> </gl-form-group>
</div> </div>
<div class="gl-w-fit-content">
<gl-toggle <gl-toggle
v-model="endDateEnabled" v-model="endDateEnabled"
:label="$options.i18n.fields.endsOn.enableToggle" :label="$options.i18n.fields.endsOn.enableToggle"
...@@ -232,11 +232,16 @@ export default { ...@@ -232,11 +232,16 @@ export default {
class="gl-mb-5" class="gl-mb-5"
/> />
<gl-card v-if="endDateEnabled" data-testid="rotation-ends-on"> <gl-card
v-if="endDateEnabled"
data-testid="rotation-ends-on"
class="gl-border-gray-400 gl-bg-gray-10 gl-w-fit-content"
>
<gl-form-group <gl-form-group
:label="$options.i18n.fields.endsOn.title" :label="$options.i18n.fields.endsOn.title"
label-size="sm" label-size="sm"
:invalid-feedback="$options.i18n.fields.endsOn.error" :invalid-feedback="$options.i18n.fields.endsOn.error"
class="gl-mb-0"
> >
<div class="gl-display-flex gl-align-items-center"> <div class="gl-display-flex gl-align-items-center">
<gl-datepicker <gl-datepicker
...@@ -247,7 +252,7 @@ export default { ...@@ -247,7 +252,7 @@ export default {
<gl-dropdown <gl-dropdown
data-testid="rotation-end-time" data-testid="rotation-end-time"
:text="format24HourTimeStringFromInt(form.endsOn.time)" :text="format24HourTimeStringFromInt(form.endsOn.time)"
class="gl-w-12 gl-pl-3" class="gl-px-3"
> >
<gl-dropdown-item <gl-dropdown-item
v-for="time in $options.HOURS_IN_DAY" v-for="time in $options.HOURS_IN_DAY"
...@@ -256,10 +261,12 @@ export default { ...@@ -256,10 +261,12 @@ export default {
is-check-item is-check-item
@click="$emit('update-rotation-form', { type: 'endsOn.time', value: time })" @click="$emit('update-rotation-form', { type: 'endsOn.time', value: time })"
> >
<span class="gl-white-space-nowrap"> {{ format24HourTimeStringFromInt(time) }}</span> <span class="gl-white-space-nowrap">
{{ format24HourTimeStringFromInt(time) }}</span
>
</gl-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
<div class="gl-mx-5">{{ schedule.timezone }}</div> <span>{{ schedule.timezone }}</span>
</div> </div>
</gl-form-group> </gl-form-group>
</gl-card> </gl-card>
...@@ -269,14 +276,19 @@ export default { ...@@ -269,14 +276,19 @@ export default {
data-testid="restricted-to-toggle" data-testid="restricted-to-toggle"
:label="$options.i18n.fields.restrictToTime.enableToggle" :label="$options.i18n.fields.restrictToTime.enableToggle"
label-position="left" label-position="left"
class="gl-my-5" class="gl-mt-5"
/> />
<gl-card v-if="restrictToTimeEnabled" data-testid="restricted-to-time"> <gl-card
v-if="restrictToTimeEnabled"
data-testid="restricted-to-time"
class="gl-mt-5 gl-border-gray-400 gl-bg-gray-10"
>
<gl-form-group <gl-form-group
:label="$options.i18n.fields.restrictToTime.title" :label="$options.i18n.fields.restrictToTime.title"
label-size="sm" label-size="sm"
:invalid-feedback="$options.i18n.fields.endsOn.error" :invalid-feedback="$options.i18n.fields.endsOn.error"
class="gl-mb-0"
> >
<div class="gl-display-flex gl-align-items-center"> <div class="gl-display-flex gl-align-items-center">
<span> {{ __('From') }} </span> <span> {{ __('From') }} </span>
...@@ -292,7 +304,9 @@ export default { ...@@ -292,7 +304,9 @@ export default {
is-check-item is-check-item
@click="$emit('update-rotation-form', { type: 'restrictedTo.from', value: time })" @click="$emit('update-rotation-form', { type: 'restrictedTo.from', value: time })"
> >
<span class="gl-white-space-nowrap"> {{ format24HourTimeStringFromInt(time) }}</span> <span class="gl-white-space-nowrap">
{{ format24HourTimeStringFromInt(time) }}</span
>
</gl-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
<span> {{ __('To') }} </span> <span> {{ __('To') }} </span>
...@@ -308,11 +322,15 @@ export default { ...@@ -308,11 +322,15 @@ export default {
is-check-item is-check-item
@click="$emit('update-rotation-form', { type: 'restrictedTo.to', value: time })" @click="$emit('update-rotation-form', { type: 'restrictedTo.to', value: time })"
> >
<span class="gl-white-space-nowrap"> {{ format24HourTimeStringFromInt(time) }}</span> <span class="gl-white-space-nowrap">
{{ format24HourTimeStringFromInt(time) }}</span
>
</gl-dropdown-item> </gl-dropdown-item>
</gl-dropdown> </gl-dropdown>
<span>{{ schedule.timezone }} </span>
</div> </div>
</gl-form-group> </gl-form-group>
</gl-card> </gl-card>
</div>
</gl-form> </gl-form>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment