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

Add a subline to each of the address books, explain what an address book is #3320

Closed
2 tasks
GretaD opened this issue Apr 18, 2023 · 7 comments · Fixed by #3382
Closed
2 tasks

Add a subline to each of the address books, explain what an address book is #3320

GretaD opened this issue Apr 18, 2023 · 7 comments · Fixed by #3382
Labels
3. to review Waiting for reviews enhancement New feature or request good first issue Good for newcomers

Comments

@GretaD
Copy link
Contributor

GretaD commented Apr 18, 2023

Is your feature request related to a problem? Please describe.

It would be helpful if:

  • Add a subline to each of the address books saying e.g. "250 contacts, 10 groups" to indicate what address books are
  • Optional: add text explaining what an address book is. Address books are collections of contacts. You can organize contacts into more than one address book and share individual address books with other accounts.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@GretaD GretaD added enhancement New feature or request 1. to develop Accepted and waiting to be taken care of good first issue Good for newcomers labels Apr 18, 2023
@GretaD GretaD mentioned this issue Apr 18, 2023
73 tasks
@Udassi-Pawan
Copy link

@GretaD can you be more elaborate with what needs to be done?

@GretaD
Copy link
Contributor Author

GretaD commented Apr 20, 2023

@GretaD can you be more elaborate with what needs to be done?

@nimishavijay can you please help with a screenshot

@nimishavijay
Copy link
Member

This is in the settings modal, a subline can be added like this:

image

There can also be a short explanation about what exactly an address book is below the heading. pinging @jancborchardt for help here because I am not sure I understand address books fully either 🙈 :D

@ChristophWurst
Copy link
Member

Bildschirmfoto vom 2023-05-09 14-26-08

contact counter and groups (categories) counter are doable. just checked

@ChristophWurst
Copy link
Member

The component <SettingsAddressbook> renders the list items. The component already has access to the addressbook via a prop. The addressbook object has a property contacts, which is an object mapping contact UUID to contact. We can use that as computed property:

		contacts() {
			return Object.values(this.addressbook.contacts)
		},

Groups (vcard CATEGORIES) are slightly more tricky. They are found on the vCard property of each contact. We can flatmap them into one combined list and then deduplicate the entries:

		groups() {
			const allGroups = this.contacts
				.flatMap(contact => contact.vCard.getAllProperties('categories').map(prop => prop.getFirstValue()))
			// Deduplicate
			return [...new Set(allGroups)]
		},

These two computed array properties can be used to render counters in the template.

@DorraJaouad
Copy link

@ChristophWurst could you please grant me permission to the repo so I can push my local branch?

@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 1. to develop Accepted and waiting to be taken care of labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants