Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify form #1446

Merged
merged 7 commits into from
Aug 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 20 additions & 9 deletions css/Properties/Properties.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ $property-ext-padding-right: 8px;
}
}

// Hide delete buttons initially
.action-item.icon-delete {
opacity: 0;
}

// Property value within row, after label
&__value {
flex: 1 1;
Expand All @@ -152,19 +157,25 @@ $property-ext-padding-right: 8px;
input&--with-ext {
// ext icon width + 8px padding
padding-right: 24px;
&:hover,
&:focus,
&:active {
~ .property__ext {
opacity: .5;
}
}

// Show ext and delete icon permanently on focus
&:hover,
&:focus,
&:active {
~ .property__ext,
~ .action-item.icon-delete {
opacity: .5;
}
}
}

// show ext button on full row hover
&:hover &__ext {
opacity: .5;
// Show ext and delete buttons on full row hover
&:hover {
.property__ext,
.action-item {
opacity: .5;
}
}

// External link (tel, mailto, http, ftp...)
Expand Down
4 changes: 0 additions & 4 deletions css/Properties/PropertyTitle.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
align-items: center;
margin: 0;
user-select: none;
opacity: .6;

.property__title--right {
display: flex;
Expand All @@ -34,7 +33,4 @@
.property__title--icon {
background-position: center right;
}
.property__title--icon-details {
margin-left: 7px;
}
}
3 changes: 1 addition & 2 deletions src/components/Properties/PropertyDateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
<!-- title if first element -->
<PropertyTitle v-if="isFirstProperty && propModel.icon"
:icon="propModel.icon"
:readable-name="propModel.readableName"
:info="propModel.info" />
:readable-name="propModel.readableName" />

<div class="property__row">
<!-- type selector -->
Expand Down
3 changes: 1 addition & 2 deletions src/components/Properties/PropertyMultipleText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
<!-- title if first element -->
<PropertyTitle v-if="isFirstProperty && propModel.icon"
:icon="propModel.icon"
:readable-name="propModel.readableName"
:info="propModel.info" />
:readable-name="propModel.readableName" />

<div class="property__row">
<!-- type selector -->
Expand Down
3 changes: 1 addition & 2 deletions src/components/Properties/PropertySelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
<!-- title if first element -->
<PropertyTitle v-if="isFirstProperty && propModel.icon"
:icon="propModel.icon"
:readable-name="propModel.readableName"
:info="propModel.info" />
:readable-name="propModel.readableName" />

<div class="property__row">
<!-- if we do not support any type on our model but one is set anyway -->
Expand Down
4 changes: 2 additions & 2 deletions src/components/Properties/PropertyText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
<!-- title if first element -->
<PropertyTitle v-if="isFirstProperty && propModel.icon"
:icon="propModel.icon"
:readable-name="propModel.readableName"
:info="propModel.info" />
:readable-name="propModel.readableName" />

<div class="property__row">
<!-- type selector -->
Expand Down Expand Up @@ -73,6 +72,7 @@
:class="{'property__value--with-ext': haveExtHandler}"
type="text"
class="property__value"
:placeholder="type"
@input="updateValue">

<!-- external link -->
Expand Down
13 changes: 3 additions & 10 deletions src/components/Properties/PropertyTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@
<template>
<h3 class="property__title property__row">
<div :class="icon" class="property__label property__title--icon" />
<span class="property__value property__title--right">
<div>{{ readableName }}</div>
<!-- display tooltip with hint if available -->
<div v-if="info" v-tooltip.auto="info" class="property__title--icon-details icon-details" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still disagree with this.
We had to add this because lots of users are confused and vCards is complicated.
I don't want to remove it and I think it doesn't create any issues to leave it there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you ever see something like this in another popular Contacts app?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ask the question differently, what would you say to a user that says they doesn't understand the difference between RELATED & RELATIONSHIP ? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To that I would say that I fixed the wording via 715df61
→ to 'Relationship to you' and 'Related contacts'

;)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it more clear? Doesn't really seems to me 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it’s quite clear. One thing is to put in the "Relationship to you" andthe other thing is to put in "Related contacts". Not sure how much clearer it can be.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, your call!

</span>
<div class="property__value property__title--right">
{{ readableName }}
</div>
</h3>
</template>

Expand All @@ -46,11 +44,6 @@ export default {
default: '',
required: true,
},
info: {
type: String,
default: '',
required: false,
},
},
}
</script>
45 changes: 16 additions & 29 deletions src/models/rfcProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ const properties = {
},
anniversary: {
readableName: t('contacts', 'Anniversary'),
info: t('contacts', 'The date of marriage, or equivalent, of this contact'),
icon: 'icon-calendar-dark',
force: 'date', // most ppl prefer date for birthdays, time is usually irrelevant
defaultValue: {
Expand Down Expand Up @@ -220,35 +219,27 @@ const properties = {
value: '',
type: ['facebook'],
},
info: t(
'contacts',
'The link of the profile. e.g. https://www.facebook.com/Nextclouders/ '
),
options: [
{ id: 'FACEBOOK', name: 'Facebook' },
{ id: 'GITHUB', name: 'GitHub' },
{ id: 'GOOGLEPLUS', name: 'Google+' },
{ id: 'INSTAGRAM', name: 'Instagram' },
{ id: 'LINKEDIN', name: 'LinkedIn' },
{ id: 'PINTEREST', name: 'Pinterest' },
{ id: 'QZONE', name: 'QZone' },
{ id: 'TUMBLR', name: 'Tumblr' },
{ id: 'TWITTER', name: 'Twitter' },
{ id: 'WECHAT', name: 'WeChat' },
{ id: 'YOUTUBE', name: 'YouTube' },
{ id: 'MASTODON', name: 'Mastodon' },
{ id: 'DIASPORA', name: 'Diaspora' },
{ id: 'OTHER', name: 'other Social Media' },
{ id: 'FACEBOOK', name: 'Facebook', placeholder: 'https://facebook.com/…' },
{ id: 'GITHUB', name: 'GitHub', placeholder: 'https://github.com/…' },
{ id: 'GOOGLEPLUS', name: 'Google+', placeholder: 'https://plus.google.com/…' },
{ id: 'INSTAGRAM', name: 'Instagram', placeholder: 'https://instagram.com/…' },
{ id: 'LINKEDIN', name: 'LinkedIn', placeholder: 'https://linkedin.com/…' },
{ id: 'PINTEREST', name: 'Pinterest', placeholder: 'https://pinterest.com/…' },
{ id: 'QZONE', name: 'QZone', placeholder: 'https://qzone.com/…' },
{ id: 'TUMBLR', name: 'Tumblr', placeholder: 'https://tumblr.com/…' },
{ id: 'TWITTER', name: 'Twitter', placeholder: 'https://twitter.com/…' },
{ id: 'WECHAT', name: 'WeChat', placeholder: 'https://wechat.com/…' },
{ id: 'YOUTUBE', name: 'YouTube', placeholder: 'https://youtube.com/…' },
{ id: 'MASTODON', name: 'Mastodon', placeholder: 'https://mastodon.social/…' },
{ id: 'DIASPORA', name: 'Diaspora', placeholder: 'https://joindiaspora.com/…' },
{ id: 'OTHER', name: 'Other social media', placeholder: 'https://example.com/…' },
Comment on lines +223 to +236
Copy link
Member

@call-me-matt call-me-matt Jul 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The placeholders did not show up when I tried it out? It's still work in progress, right?
placeholder

And because you asked: I find it easier to read when only the username is stored, not the URL. In my point of view that is redundant information to the type and just fills up the complete textfield.
image

],
},
relationship: {
readableName: t('contacts', 'Relationship'),
readableName: t('contacts', 'Relationship to you'),
force: 'select',
icon: 'icon-group',
info: t(
'contacts',
'Specify a relationship between you and the entity represented by this vCard.'
),
options: [
{ id: 'SPOUSE', name: t('contacts', 'Spouse') },
{ id: 'CHILD', name: t('contacts', 'Child') },
Expand All @@ -266,12 +257,8 @@ const properties = {
},
related: {
multiple: true,
readableName: t('contacts', 'Related'),
readableName: t('contacts', 'Related contacts'),
icon: 'icon-group',
info: t(
'contacts',
'Specify a relationship between another entity and the entity represented by this vCard.'
jancborchardt marked this conversation as resolved.
Show resolved Hide resolved
),
defaultValue: {
value: [''],
type: ['CONTACT'],
Expand Down