Closed
Bug 1059336
Opened 11 years ago
Closed 11 years ago
Add bindings for contact buttons in the call information page
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Firefox OS Graveyard
Gaia::Dialer
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S3 (29aug)
People
(Reporter: drs, Assigned: drs)
References
Details
(Whiteboard: [planned-sprint c=3])
Attachments
(2 files, 4 obsolete files)
|
2.54 KB,
patch
|
arcturus
:
review+
|
Details | Diff | Splinter Review |
|
22.40 KB,
patch
|
rik
:
review+
|
Details | Diff | Splinter Review |
In bug 877971, we're adding a call log information page. We need to add bindings here for the buttons that we're refactoring out of the contacts app in bug 1054995. I've attached an example of how to do this without the required work in bug 1047353.
| Assignee | ||
Updated•11 years ago
|
Attachment #8479925 -
Attachment is patch: true
| Assignee | ||
Comment 1•11 years ago
|
||
PR: https://github.com/mozilla-b2g/gaia/pull/23395
This has some problems and I haven't written any tests yet. To really iron this out, we'll have to get bug 1047353 landed first.
Attachment #8479925 -
Attachment is obsolete: true
| Assignee | ||
Comment 2•11 years ago
|
||
PR: https://github.com/mozilla-b2g/gaia/pull/23395
Francisco, you can check the PR, but it's pretty messy since it's stacked on top of 2 other WIP bugs. I'm not happy about the changes needed here, but there are slight differences in the DOMs of contacts and dialer which are affecting how these elements are displayed. I expect that some of these problems will go away once we have bug 1060076 fixed.
Attachment #8481204 -
Flags: review?(francisco)
| Assignee | ||
Comment 3•11 years ago
|
||
Updated PR.
The PR is a mess because of all of the WIP patches it's based on top of. I'll make sure to clean it up before we go into the final round of review. It will require a rebase on top of bug 1047353.
Attachment #8480323 -
Attachment is obsolete: true
Attachment #8481355 -
Flags: review?(anthony)
| Assignee | ||
Updated•11 years ago
|
Attachment #8481204 -
Attachment description: Minor tweaks to shared contacts buttons code. → Part 2: Minor tweaks to shared contacts buttons code.
| Assignee | ||
Updated•11 years ago
|
Attachment #8481355 -
Attachment description: Add bindings for contact buttons in the call information page. → Part 1: Add bindings for contact buttons in the call information page.
Comment 4•11 years ago
|
||
Comment on attachment 8481204 [details] [diff] [review]
Part 2: Minor tweaks to shared contacts buttons code.
You'll need to rebase the patch, just the xfail.list, so I applied the patch without this file and working good in contacts.
r+ for this one.
Thanks Doug!
Attachment #8481204 -
Flags: review?(francisco) → review+
Comment 5•11 years ago
|
||
Comment on attachment 8481355 [details] [diff] [review]
Part 1: Add bindings for contact buttons in the call information page.
Review of attachment 8481355 [details] [diff] [review]:
-----------------------------------------------------------------
Very good! I think we're just missing one test and some nitpicking on the HTML.
::: apps/communications/dialer/elements/call-info-view.html
@@ +17,5 @@
> </div>
> </div>
>
> + <div class="ci__details-wrapper">
> + <section id="contact-detail">
I'd rather move this inside .ci__contact-wrapper. And use a <div>
Like:
<div class="ci__contact-wrapper">
<div id="contact-detail">…</section>
<div id="contact-actions">…</div>
</div>
::: apps/communications/dialer/js/call_info.js
@@ +216,5 @@
> + '/dialer/js/telephony_helper.js',
> + '/shared/style/contacts/contacts_buttons.css',
> + '/shared/style/contacts.css',
> + '/dialer/style/buttons.css'], function() {
> + if (!self._initialised) {
With this, we can remove var _initialised = false; that was used for initListeners.
::: apps/communications/dialer/test/unit/call_info_test.js
@@ +76,5 @@
> +
> + initCallInfo();
> + });
> +
> + suiteSetup(function() {
Please move the suiteSetup and suiteTeardown before setup().
@@ +139,5 @@
> + assert.isNull(document.getElementById('email-details-stub'));
> + });
> + });
> +
> + suite('ContactsButton', function() {
I think if you remove listDetailsElt.innerHTML = ''; from call_info.js, those tests will still pass. We need one more test to check this. You could stub renderPhones and renderButtons to return something and verify that the number of elements matches what's expected.
Attachment #8481355 -
Flags: review?(anthony)
| Assignee | ||
Comment 6•11 years ago
|
||
Updated PR. I couldn't rebase since the underlying WIPs haven't seen enough progress yet.
(In reply to Anthony Ricaud (:rik) from comment #5)
> With this, we can remove var _initialised = false; that was used for
> initListeners.
This was already done, unless I missed something.
> I think if you remove listDetailsElt.innerHTML = ''; from call_info.js,
> those tests will still pass.
If I remove this line, each time the view is shown, it will include the buttons from the last displaying.
> We need one more test to check this. You could
> stub renderPhones and renderButtons to return something and verify that the
> number of elements matches what's expected.
This seems pointless to me. ContactsButtons already includes tests for this. All we'll be verifying is that given a mock contact, we pass in that mock contact in its entirety, which there's already a test for.
Attachment #8481355 -
Attachment is obsolete: true
Attachment #8481530 -
Flags: review?(anthony)
| Assignee | ||
Comment 7•11 years ago
|
||
Updated PR.
I misunderstood your point about listDetailsElt.innerHTML = ''. I added a test to make sure that we clear it on every ContactsButtons.show() call.
Attachment #8481530 -
Attachment is obsolete: true
Attachment #8481530 -
Flags: review?(anthony)
Attachment #8481546 -
Flags: review?(anthony)
Updated•11 years ago
|
Attachment #8481546 -
Flags: review?(anthony) → review+
| Assignee | ||
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•