Skip to content

Commit d99a727

Browse files
Create <h3> headings for profile page. Replace <label> which have no conncted <input> with <h3> heading
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
1 parent 83aef8e commit d99a727

10 files changed

Lines changed: 24 additions & 15 deletions

File tree

apps/settings/css/settings.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/settings/css/settings.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ input {
5656
.personal-settings-setting-box {
5757
.section {
5858
padding: 10px 30px;
59-
60-
h3 {
59+
.headerbar-label {
6160
margin-bottom: 0;
6261
}
6362

apps/settings/js/federationsettingsview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
];
8383

8484
_.each(this._inputFields, function(field) {
85-
var $icon = self.$('#' + field + 'form h3 > .federation-menu');
85+
var $icon = self.$('#' + field + 'form .headerbar-label > .federation-menu');
8686
var excludedScopes = []
8787

8888
if (fieldsWithV2Private.indexOf(field) === -1) {
@@ -245,7 +245,7 @@
245245
},
246246

247247
_setFieldScopeIcon: function(field, scope) {
248-
var $icon = this.$('#' + field + 'form > h3 .icon-federation-menu');
248+
var $icon = this.$('#' + field + 'form > .headerbar-label .icon-federation-menu');
249249

250250
$icon.removeClass('icon-phone');
251251
$icon.removeClass('icon-password');

apps/settings/src/components/PersonalInfo/AvatarSection.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
<template>
2424
<section>
25+
<h3 class="hidden-visually"> {{ t('settings', 'Your profile information') }} </h3>
2526
<HeaderBar :input-id="avatarChangeSupported ? inputId : null"
2627
:readable="avatar.readable"
2728
:scope.sync="avatar.scope" />

apps/settings/src/components/PersonalInfo/DetailsSection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<template>
2424
<section>
25-
<HeaderBar :readable="t('settings', 'Details')" />
25+
<HeaderBar :is-heading="true" :readable="t('settings', 'Details')" />
2626

2727
<div class="details">
2828
<div class="details__groups">

apps/settings/src/components/PersonalInfo/ProfileVisibilitySection/ProfileVisibilitySection.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<!-- TODO remove this inline margin placeholder once the settings layout is updated -->
2525
<section id="profile-visibility"
2626
:style="{ marginLeft }">
27-
<HeaderBar :readable="heading" />
27+
<HeaderBar :is-heading="true" :readable="heading" />
2828

2929
<em :class="{ disabled }">
3030
{{ t('settings', 'The more restrictive setting of either visibility or scope is respected on your Profile. For example, if visibility is set to "Show to everyone" and scope is set to "Private", "Private" is respected.') }}

apps/settings/src/components/PersonalInfo/shared/HeaderBar.vue

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@
2121
-->
2222

2323
<template>
24-
<h3 :class="{ 'setting-property': isSettingProperty, 'profile-property': isProfileProperty }">
25-
<label :for="inputId">
24+
<component :is="isHeading ? `h3` : `div`" class="headerbar-label" :class="{ 'setting-property': isSettingProperty, 'profile-property': isProfileProperty }">
25+
<span v-if="isHeading">
26+
<!-- Already translated as required by prop validator -->
27+
{{ readable }}
28+
</span>
29+
<label v-else :for="inputId">
2630
<!-- Already translated as required by prop validator -->
2731
{{ readable }}
2832
</label>
@@ -45,7 +49,7 @@
4549
{{ t('settings', 'Add') }}
4650
</NcButton>
4751
</template>
48-
</h3>
52+
</component>
4953
</template>
5054

5155
<script>
@@ -93,6 +97,10 @@ export default {
9397
type: Boolean,
9498
default: true,
9599
},
100+
isHeading: {
101+
type: Boolean,
102+
default: false,
103+
}
96104
},
97105
98106
data() {
@@ -124,7 +132,8 @@ export default {
124132
</script>
125133

126134
<style lang="scss" scoped>
127-
h3 {
135+
.headerbar-label {
136+
font-weight: normal;
128137
display: inline-flex;
129138
width: 100%;
130139
margin: 12px 0 0 0;

dist/settings-vue-settings-personal-info.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-personal-info.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)