Closed Bug 1038257 Opened 10 years ago Closed 10 years ago

Desktop client needs the ability to delete, block, and unblock a contact locally

Categories

(Hello (Loop) :: Client, defect, P2)

defect
Points:
2

Tracking

(firefox34 verified, firefox35 verified)

VERIFIED FIXED
mozilla35
Iteration:
35.3
Tracking Status
firefox34 --- verified
firefox35 --- verified

People

(Reporter: enndeakin, Assigned: Paolo)

References

Details

(Whiteboard: [contacts, first release needed][loop-uplift])

Attachments

(1 file, 1 obsolete file)

The UI is section 6 of https://people.mozilla.org/~dhenein/labs/loop-mvp-spec/#contacts

1. Add a context menu item for a contact 'Remove Contact'.
2. When selected, remove the contact from the store.
3. Remove the contact from the displayed list. It will also need to be removed from any other lists where the contacts appear.
4. Selecting the contact from the list and pressing delete should also delete the contact.

Since deleting a contact loses information, the user should be able to undo this operation, or be asked for confirmation beforehand.
Two points of clarification:

for 1 -- "Remove Contact" is in the dropdown menu next to the call button. Is this what you mean by context menu?

for 4 -- it looks like this was discussed in bug 1038272 and the conclusion was for the delete key _not_ to remove a selected contact.
Whiteboard: p=5
(In reply to Neil Deakin from comment #0)
> The UI is section 6 of
> https://people.mozilla.org/~dhenein/labs/loop-mvp-spec/#contacts
> 
> 1. Add a context menu item for a contact 'Remove Contact'.
Please note this only applies to contacts which were added locally (i.e not applicable to Google contacts)

> 2. When selected, remove the contact from the store.
> 3. Remove the contact from the displayed list. It will also need to be
> removed from any other lists where the contacts appear.
> 4. Selecting the contact from the list and pressing delete should also
> delete the contact.
The delete key won't be supported for MVP
> 
> Since deleting a contact loses information, the user should be able to undo
> this operation, or be asked for confirmation beforehand.
Yes, Darrin suggests a system confirm/cancel dialog as per https://bugzilla.mozilla.org/show_bug.cgi?id=1038272#c2
(In reply to Madhava Enros [:madhava] from comment #1)
> Two points of clarification:
> 
> for 1 -- "Remove Contact" is in the dropdown menu next to the call button.
> Is this what you mean by context menu?

Yes.
Flags: firefox-backlog+
Points: --- → 5
Whiteboard: p=5
Priority: -- → P2
Whiteboard: [contacts, first release needed]
Target Milestone: --- → mozilla34
Whiteboard: [contacts, first release needed] → [contacts, first release needed][loop-uplift]
Target Milestone: mozilla34 → mozilla35
Blocks: 972015
Summary: Implement UI for deleting a contact → Desktop client needs the ability to delete a contact locally
Updated points per conversation with Mike
Points: 5 → 2
Flags: qe-verify?
Tracking this for QE verification.
Flags: qe-verify? → qe-verify+
QA Contact: anthony.s.hughes
There was a string added for a "confirm delete" message after selecting "Remove Contact".  The localization info was: confirm_delete_contact_alert=Are you sure you want to delete this contact?
Attached patch The patch (obsolete) — Splinter Review
Attachment #8496904 - Flags: review?(mdeboer)
Depends on: 1038246
Blocks: 1021729
Blocks: 1017052
Note that blocking and unblocking are included in this patch.
Assignee: nobody → paolo.mozmail
Status: NEW → ASSIGNED
(In reply to :Paolo Amadini from comment #9)
> Note that blocking and unblocking are included in this patch.

Thanks for the update, Paolo.  So, would it make sense to close Bug 1017052 (blocking a contact) and Bug 1021729 (unblocking a contact) as duplicates of this bug?
Flags: needinfo?(paolo.mozmail)
No, they'll be resolved - fixed once this bug is fixed. They're already marked as blocking, so that's all we need right now :)
Flags: needinfo?(paolo.mozmail)
Comment on attachment 8496904 [details] [diff] [review]
The patch

Review of attachment 8496904 [details] [diff] [review]:
-----------------------------------------------------------------

Please see my comment below... the other change look good to me!

::: browser/components/loop/content/js/contacts.jsx
@@ +75,5 @@
>                onClick={this.onItemClick} data-action="edit">
>              <i className="icon icon-edit" />
>              {mozL10n.get("edit_contact_menu_button")}
>            </li>
> +          {this.props.blocked ?

This looks a bit bulky to me... what about the following:

``js
let blockAction = this.props.blocked ? "unblock" : "block";

return (
  <li className="dropdown-menu-item"
      onClick={this.onItemClick} data-action={blockAction}>
    <i className={"icon icon-" + blockAction"} />
    {mozL10n.get(blockAction + "_contact_menu_button")}
  </li>
)
```
Attachment #8496904 - Flags: review?(mdeboer) → review-
Attached patch Updated patchSplinter Review
Attachment #8496904 - Attachment is obsolete: true
Attachment #8497392 - Flags: review?(mdeboer)
Comment on attachment 8497392 [details] [diff] [review]
Updated patch

Review of attachment 8497392 [details] [diff] [review]:
-----------------------------------------------------------------

\o/ r=me
Attachment #8497392 - Flags: review?(mdeboer) → review+
This bug now tracks the verification work for the block/unblock functions as well.
Summary: Desktop client needs the ability to delete a contact locally → Desktop client needs the ability to delete, block, and unblock a contact locally
Iteration: --- → 35.3
https://hg.mozilla.org/mozilla-central/rev/6d875de038d4
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
(In reply to sescalante from comment #7)
> There was a string added for a "confirm delete" message after selecting
> "Remove Contact".  The localization info was:
> confirm_delete_contact_alert=Are you sure you want to delete this contact?
I don't see any confirmation message when removing contacts
Flags: needinfo?(paolo.mozmail)
(In reply to Paul Silaghi, QA [:pauly] from comment #20)
> (In reply to sescalante from comment #7)
> > There was a string added for a "confirm delete" message after selecting
> > "Remove Contact".  The localization info was:
> > confirm_delete_contact_alert=Are you sure you want to delete this contact?
> I don't see any confirmation message when removing contacts

No, we didn't implement a confirmation message. We don't have a way to select multiple contacts and delete them in the current user interface, this means that when users want to delete multiple contacts, they would have to confirm deleting each manually added contact individually.

I think the confirmation message for each contact assumed mass deletions were an alternative.

Darrin, given the low amount of data associated to each contact, do you think not showing a confirmation is the correct UI for the first version? Note that imported contacts can't be deleted locally anyways (the menu item is disabled).
Flags: needinfo?(paolo.mozmail) → needinfo?(dhenein)
(In reply to :Paolo Amadini from comment #21)
> Darrin, given the low amount of data associated to each contact, do you
> think not showing a confirmation is the correct UI for the first version?
> Note that imported contacts can't be deleted locally anyways (the menu item
> is disabled).

I still think a confirmation is correct, given that some data loss is happening.
Flags: needinfo?(dhenein)
Blocks: 1077412
(In reply to Darrin Henein [:darrin] from comment #22)
> I still think a confirmation is correct, given that some data loss is
> happening.

Filed bug 1077412.
Verified fixed FF 35.0a1 (2014-10-03) Win 7, OS X 10.9.5, Ubuntu 13.04
Status: RESOLVED → VERIFIED
Comment on attachment 8497392 [details] [diff] [review]
Updated patch

Approval Request Comment
Part of the staged Loop aurora second uplift set
Attachment #8497392 - Flags: approval-mozilla-aurora?
Flags: needinfo?(paul.silaghi)
Verified fixed FF 34b1 Win 7
Flags: needinfo?(paul.silaghi)
Comment on attachment 8497392 [details] [diff] [review]
Updated patch

Already landed in aurora, approving for posterity
Attachment #8497392 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Does this have developer automation coverage?
Flags: in-testsuite?
(In reply to Anthony Hughes, QA Mentor (:ashughes) from comment #29)
> Does this have developer automation coverage?

Not that I know of. Bug 1073468 is still open.
Flags: in-testsuite? → in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: