Skip to content

Commit 5c66389

Browse files
authored
Merge pull request #21009 from guerler/fix_user_preferences_styles
Fix content wrapping in cards and preference title
2 parents f77f6e2 + 044c123 commit 5c66389

File tree

4 files changed

+18
-15
lines changed

4 files changed

+18
-15
lines changed

client/src/components/Common/Heading.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const element = computed(() => {
5353
</script>
5454

5555
<template>
56-
<div v-if="props.separator" class="separator heading">
56+
<div v-if="props.separator" class="separator heading word-wrap-break">
5757
<GButton v-if="collapsible" transparent size="small" icon-only inline @click="$emit('click')">
5858
<FontAwesomeIcon v-if="collapsed" fixed-width :icon="faAngleDoubleDown" />
5959
<FontAwesomeIcon v-else fixed-width :icon="faAngleDoubleUp" />
@@ -75,7 +75,7 @@ const element = computed(() => {
7575
<component
7676
:is="element"
7777
v-else
78-
class="heading"
78+
class="heading word-wrap-break"
7979
:class="[
8080
sizeClass,
8181
props.bold ? 'font-weight-bold' : '',
@@ -96,10 +96,6 @@ const element = computed(() => {
9696
<style lang="scss" scoped>
9797
@import "scss/theme/blue.scss";
9898
99-
.heading {
100-
word-break: break-all;
101-
}
102-
10399
// prettier-ignore
104100
h1, h2, h3, h4, h5, h6 {
105101
&:not(.truncate) {

client/src/components/User/UserDetailsElement.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@ const getStoragePercentageClass = (percentage: number) => {
3535
<div class="user-details d-flex flex-gapx-1 flex-gapy-1 w-100 justify-content-between">
3636
<div class="d-flex align-items-center flex-gapx-1">
3737
<div class="d-flex align-items-center flex-gapx-1 mr-5">
38-
<FontAwesomeIcon :icon="faUser" class="user-details-icon" />
38+
<FontAwesomeIcon :icon="faUser" class="user-details-icon p-2" />
3939
<span v-b-tooltip.hover.noninteractive title="Your username (public name)">
4040
{{ userUsername }}
4141
</span>
4242
</div>
4343

4444
<div class="d-flex align-items-center flex-gapx-1">
45-
<FontAwesomeIcon :icon="faAt" class="user-details-icon" />
45+
<FontAwesomeIcon :icon="faAt" class="user-details-icon p-2" />
4646
<span
4747
id="user-preferences-current-email"
4848
v-b-tooltip.hover.noninteractive
49+
class="word-wrap-break"
4950
title="Your email address">
5051
{{ userEmail }}
5152
</span>
@@ -95,10 +96,10 @@ const getStoragePercentageClass = (percentage: number) => {
9596
9697
.user-details-icon {
9798
color: $brand-primary;
98-
font-size: 1rem;
99-
border: 1px solid $brand-primary;
100-
border-radius: 0.75rem;
101-
padding: 0.5rem;
99+
font-size: $h5-font-size;
100+
border: $border-default;
101+
border-color: $brand-primary;
102+
border-radius: $border-radius-extralarge;
102103
}
103104
}
104105
}

client/src/components/User/UserPreferences.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,8 @@ onMounted(async () => {
154154
<div class="d-flex flex-column">
155155
<BreadcrumbHeading :items="breadcrumbItems" />
156156

157-
<Heading h2 size="md">
158-
This page allows you to manage your user preferences. You can change your email address, password, and other
159-
settings here.
157+
<Heading h2 size="sm">
158+
Manage your user preferences on this page, including email address, password, and other settings.
160159
</Heading>
161160

162161
<BAlert :variant="messageVariant" :show="!!message">

client/src/style/scss/ui.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@
4444
overflow-y: auto !important;
4545
}
4646

47+
// utility class to wrap words or break if necessary
48+
.word-wrap-break {
49+
overflow-wrap: break-word;
50+
white-space: normal;
51+
word-break: break-word;
52+
}
53+
4754
// utility class to set word wrap to normal
4855
.word-wrap-normal {
4956
word-wrap: normal;

0 commit comments

Comments
 (0)