Closed
Bug 1060451
Opened 10 years ago
Closed 10 years ago
Refactor copied-and-pasted displayMessage() code in emergency-call/dialer.js taken from dialer/telephony_helper.js
Categories
(Firefox OS Graveyard :: Gaia::Dialer, defect)
Firefox OS Graveyard
Gaia::Dialer
Tracking
(b2g-v2.2 fixed)
RESOLVED
FIXED
2.1 S6 (10oct)
Tracking | Status | |
---|---|---|
b2g-v2.2 | --- | fixed |
People
(Reporter: drs, Assigned: drs)
References
Details
(Whiteboard: [planned-sprint c=6][in-sprint=v2.1-S5])
Attachments
(1 file, 1 obsolete file)
69.60 KB,
patch
|
rik
:
review+
arcturus
:
review+
|
Details | Diff | Splinter Review |
In bug 1038701, we copied-and-pasted some code from dialer/telephony_helper.js into emergency-call/dialer.js. We should investigate sharing this properly. See the discussion at https://github.com/mozilla-b2g/gaia/pull/23322#discussion_r16732484
Updated•10 years ago
|
Blocks: dialer-most-wanted
Whiteboard: [dialer-most-wanted]
Assignee | ||
Updated•10 years ago
|
Whiteboard: [planned-sprint c=]
Target Milestone: --- → 2.1 S4 (12sep)
Assignee | ||
Updated•10 years ago
|
Whiteboard: [planned-sprint c=] → [planned-sprint c=3]
Target Milestone: 2.1 S4 (12sep) → 2.1 S5 (26sep)
Comment 1•10 years ago
|
||
When thinking about that, we should consider bug 1032273 to make it easy to share the error handling with SMS too.
See Also: → 1032273
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → anthony
Whiteboard: [planned-sprint c=3] → [planned-sprint c=6]
Assignee | ||
Updated•10 years ago
|
Assignee: anthony → drs+bugzilla
Assignee | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Whiteboard: [planned-sprint c=6] → [planned-sprint c=6][in-sprint=v2.1-S5]
Target Milestone: 2.1 S5 (26sep) → 2.1 S6 (10oct)
Assignee | ||
Comment 2•10 years ago
|
||
PR: https://github.com/mozilla-b2g/gaia/pull/24592
The basic structure here is to take the displayMessage(), handleError(), and notifyBusyLine() functions out of TelephonyHelper and stick them in a shared TelephonyMessages class.
I didn't put serious thought into how to structure this so that we have optimal results in bug 1032273 and bug 1062122. I believe that this will give us gains in bug 1032273 for free, and I'm not sure about bug 1062122, though that will need more work anyways.
Francisco, could you review just the contacts portions?
Attachment #8497944 -
Flags: review?(francisco)
Attachment #8497944 -
Flags: review?(anthony)
Comment 3•10 years ago
|
||
Comment on attachment 8497944 [details] [diff] [review]
Refactor TelephonyHelper code to be shared with dialer and emergency-call.
Review of attachment 8497944 [details] [diff] [review]:
-----------------------------------------------------------------
I like the split!
We're losing one error message though so r-.
::: apps/communications/contacts/js/contacts.js
@@ +615,5 @@
> var simPickerNode = document.getElementById('sim-picker');
> LazyLoader.load(
> [SHARED_UTILS_PATH + '/misc.js',
> '/dialer/js/telephony_helper.js',
> + '/shared/js/dialer/telephony_messages.js',
Instead of making apps load this, I feel like telephony_helper should do it.
::: apps/emergency-call/js/dialer.js
@@ -20,5 @@
> - _throwEmergencyError: function(sanitizedNumber) {
> - LazyLoader.load(['/shared/style/confirm.css'], function() {
> - navigator.mozL10n.once(function() {
> - this._emergencyMsg.textContent =
> - this.l10n.get('emergency-call-error',
We are losing this specific error message.
Attachment #8497944 -
Flags: review?(anthony) → review-
Assignee | ||
Comment 4•10 years ago
|
||
PR: https://github.com/mozilla-b2g/gaia/pull/24644
New PR since I don't want for Gaia to reopen before I can reopen the old PR.
Each of the code review comments got their own commit on the PR. They're folded into one patch here.
Attachment #8497944 -
Attachment is obsolete: true
Attachment #8497944 -
Flags: review?(francisco)
Attachment #8498626 -
Flags: review?(francisco)
Attachment #8498626 -
Flags: review?(anthony)
Assignee | ||
Comment 5•10 years ago
|
||
Commit https://github.com/DouglasSherk/gaia/commit/fa0a5a180f54f8b21fdc09a2f2480c2ca8e69ba0 has a couple of additional fixes for other problems that I noticed and improvements that I thought could be made.
Updated•10 years ago
|
Attachment #8498626 -
Flags: review?(anthony) → review+
Comment 6•10 years ago
|
||
Forgot to mention there is a console.log that needs to disappear.
Comment 7•10 years ago
|
||
Comment on attachment 8498626 [details] [diff] [review]
Refactor TelephonyHelper code to be shared with dialer and emergency-call.
r+ to the changes in contacts. Didn't put much attention to the refactor itself, left Antony that.
Attachment #8498626 -
Flags: review?(francisco) → review+
Assignee | ||
Comment 8•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•