Closed Bug 1178891 Opened 9 years ago Closed 9 years ago

Eliminate FB buttons in Contact detail screen

Categories

(Firefox OS Graveyard :: Gaia::Contacts, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-master fixed)

RESOLVED FIXED
FxOS-S2 (10Jul)
Tracking Status
b2g-master --- fixed

People

(Reporter: oteo, Assigned: mancas)

References

Details

(Whiteboard: [NG Gaia Contacts][patch])

Attachments

(2 files)

As part of the Meta Bug 1173013 that removes current FB integration from Contacts, we need to eliminate "Link contact" button from Contacts Details.
Blocks: 1173013
Whiteboard: [NG Gaia Contacts]
Target Milestone: --- → FxOS-S2 (10Jul)
Note: Please remove the e2e test[1] in the patch and ask me for review. This will prevent another bug like bug 1178866 to be created and discussed. Thanks!

[1] https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/test_unlink_facebook.py
See Also: → 1178866
Are we planning to remove here other buttons, like the ones to post to profile, check profile or send message?

In that case we should rename the issue to: Eliminate fb buttons in contact detail.

Or the plan is open new issues for that?
There are two types of FB buttons:
1)The ones that are shown in contacts imported from FB, like the ones you comment as "wall post" "message", "view Facebook profile" and "unlink contact" (if the user has manually linked it). 
2)The "link contact" button, that is shown in non Facebook contacts.

If we remove completely the capability to sync a FB account from Contacts settings (Bug 1175455) and FTU (Bug 1175491), buttons listed in 1) will never be displayed.

Anyhow if you believe it's useful we can remove the code for these buttons in this or a different bug. Let's know if you have any preference.

The problem with the "link contact" button is that until 2.1 it should always be shown but disabled if the user has not synced any FB account. Right now (at least in master, 2.2 and 2.1 latest versions) the button is always shown and enabled. 

So, in this bug we will remove "link contact" button for any contact, pending on your feedback 

If the behaviour in 2.1 and 2.2 is wrong we should open a follow-up bug to disable the button if no fb account has been synced although I think it's a bit late.
Flags: needinfo?(francisco)
Assignee: nobody → b.mcb
Status: NEW → ASSIGNED
Attached file Social buttons removed
I've removed all buttons in order to clean the code because those buttons are only used when fb is loaded and the contact is a fb contacts, and this conditions cannot be met since |Facebook sync| has been deleted from the app.
Attachment #8629863 - Flags: review?(borja.bugzilla)
Summary: Eliminate "Link contact" button in Contact detail screen → Eliminate FB buttons in Contact detail screen
Would you mind also deleting the test described in comment 1, Manuel? Thanks!
Flags: needinfo?(b.mcb)
Whiteboard: [NG Gaia Contacts] → [NG Gaia Contacts][patch]
Comment on attachment 8629863 [details] [review]
Social buttons removed

Hey Johan! I've removed the test. Could you take a quick look to ensure that everything is ok?

Thanks!
Flags: needinfo?(b.mcb)
Attachment #8629863 - Flags: review?(jlorenzo)
Comment on attachment 8629863 [details] [review]
Social buttons removed

Looks good. Could you also remove the 3 lines in the manifest[1], so the test runner won't say that no file has been found? Thanks!

[1] https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/contacts/manifest.ini#L49
Attachment #8629863 - Flags: review?(jlorenzo)
Good catch! Done!

Thanks!
Blocks: 1178646
Comment on attachment 8629863 [details] [review]
Social buttons removed

Some pending work to remove all dependencies with FB. Some of the code related with FB out of the scope of this bug could be sorted in https://bugzilla.mozilla.org/show_bug.cgi?id=1181112, but the parts modified in this patch must be cleaned of FB vars.

Ask me to review this again when ready. Thanks!!
Attachment #8629863 - Flags: review?(borja.bugzilla)
Comment on attachment 8629863 [details] [review]
Social buttons removed

Good from the Python tests standpoint.
Attachment #8629863 - Flags: review+
Ideally I would prefer not to have dead code around. So if the buttons are not going to appear we shouldn't have code for them.

Regarding 2.1 and 2.2 unfortunately I think that, as you said, we are really late.
Flags: needinfo?(francisco)
Comment on attachment 8629863 [details] [review]
Social buttons removed

I've taken into account your comments in github. Could you check if everything is ok?

Thanks! :)
Attachment #8629863 - Flags: review?(borja.bugzilla)
Comment on attachment 8629863 [details] [review]
Social buttons removed

Just a comment in Github and we are ready!. Wait for treeherder and merge. Thanks!! Gracias! ;)
Attachment #8629863 - Flags: review?(borja.bugzilla) → review+
Landed in master: https://github.com/mozilla-b2g/gaia/commit/c194888d3fda8cac0c044f36b0fd5184aca58833
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Depends on: 1126235
I still some couple of methods/references of Facebook in our Gaia UI tests, that can be removed now. I filed bug 1204279 for that.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: