Closed
Bug 1200103
Opened 10 years ago
Closed 10 years ago
Bluetooth address not shown in Settings App
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pauljt, Assigned: martianwars, Mentored)
Details
(Whiteboard: [good first bug][mentor-lang=zh][lang=js])
Attachments
(2 files, 1 obsolete file)
The bluetooth mac address is supposed to be shown in the settings app under Settings-> Device Information -> More Information.
Brsun informed me that its not shown when bluetooth is disabled. Enabling bluetooth fixed this, and it shows the address.
Maybe when bluetooth is disabled we should add a string, "Bluetooth disabled" so its clear that the address doesn't show when bluetooth is turned off.
Comment 1•10 years ago
|
||
looks like a good idea because we cant get address when BT is disabled.
Will set as good first bug if UX has no objection to it.
Flags: needinfo?(hhsu)
Comment 2•10 years ago
|
||
Yes, I agree with Paul here. Thanks Paul for pointing this out :)
Flags: needinfo?(hhsu)
Updated•10 years ago
|
Mentor: gasolin
Whiteboard: [good first bug][mentor-lang=zh]
Updated•10 years ago
|
Whiteboard: [good first bug][mentor-lang=zh] → [good first bug][mentor-lang=zh][lang=js]
| Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Fred Lin [:gasolin] from comment #1)
> looks like a good idea because we cant get address when BT is disabled.
>
> Will set as good first bug if UX has no objection to it.
Hi Fred, I was interested in solving this bug. I tried looking for the relevant code but couldn't do so. Which files should I look at?
Comment 4•10 years ago
|
||
hint:
pages are organized in settings/elements, and `Device Information > More Information` would be as `about_more_info.html`
js code are organized in `settings/js/panels/about_more_info/`, you can check if bluetooth address is exist , or show a string instead.
You can use element.setAttribute('data-l10n-id', string_id to set a text string to certain html tag
Comment 5•10 years ago
|
||
| Assignee | ||
Comment 6•10 years ago
|
||
Not so sure about the workflow of the code. I guessed that address takes up a null value / empty string in the case of a disabled bluetooth.
Attachment #8656178 -
Flags: review?(gasolin)
Updated•10 years ago
|
Assignee: nobody → kalpeshk2011
Comment 7•10 years ago
|
||
Comment on attachment 8656178 [details] [review]
Adding Bluetooth disable message.
Thanks for providing the patch!
Please address comments in github and set review again when you are ready.
Attachment #8656178 -
Flags: review?(gasolin)
| Assignee | ||
Comment 8•10 years ago
|
||
Not so sure about the if condition. Did the rest as you mentioned.
Attachment #8656178 -
Attachment is obsolete: true
Attachment #8656379 -
Flags: review?(gasolin)
Comment 9•10 years ago
|
||
Comment on attachment 8656379 [details] [review]
Bluetooth disable string patch
Kalpesh, thanks for update the patch, it works on device well now.
But we have to correct the unit tests to land code into gaia.
Please address comments in github and set review again.
(little bugzilla tip) you can use same attachment to set review by click the `detail` hyperlink at right of the attachment.
Attachment #8656379 -
Flags: review?(gasolin)
| Assignee | ||
Updated•10 years ago
|
Attachment #8656379 -
Flags: review?(gasolin)
| Assignee | ||
Comment 10•10 years ago
|
||
@gasolin - I received an error on the following tests :- https://pastebin.mozilla.org/8845117
I see errors on the following tests here.
1. should show bluetooth address
2. should use correct bluetooth module bluetooth version 1
3. should use correct bluetooth module bluetooth version 2
What could I do?
Comment 11•10 years ago
|
||
please open unit/panels/about_more_info/hardware_info_test.js , find related tests and fix them
Updated•10 years ago
|
Attachment #8656379 -
Flags: review?(gasolin)
| Assignee | ||
Comment 12•10 years ago
|
||
Comment on attachment 8656379 [details] [review]
Bluetooth disable string patch
It passed all tests. Do let me know the next steps
Attachment #8656379 -
Flags: review?(gasolin)
Comment 13•10 years ago
|
||
Sorry the fix for unit test is not a proper fix,
if test runs into `assert.isTrue(false);` statement, it means _loadBluetoothAddress is rejected (with promise).
You could check the code and find out why _loadBluetoothAddress is rejected.
Comment 14•10 years ago
|
||
(_loadBluetoothAddress supposed to return resolve as result)
I'll check and give more concrete advice later.
Updated•10 years ago
|
Attachment #8656379 -
Flags: review?(gasolin)
| Assignee | ||
Comment 15•10 years ago
|
||
@gasolin :-
I successfully set up the enviroment locally and noticed the following :-
The variable name in must be "fields" and nothing else. I managed to pass the tests locally. Will submit a review request once the tests pass treeherder
| Assignee | ||
Comment 16•10 years ago
|
||
Comment on attachment 8656379 [details] [review]
Bluetooth disable string patch
Passed the original unit tests successfully. :)
Attachment #8656379 -
Flags: review?(gasolin)
Comment 17•10 years ago
|
||
Comment on attachment 8656379 [details] [review]
Bluetooth disable string patch
Thanks for keeping update the patch!
The patch fixed tests and works well, but for maintainability I think we should rename `fields` to something more meaningful as you did in previous change.
Please address the last comment in github and we could land this change soon.
Attachment #8656379 -
Flags: review?(gasolin)
| Assignee | ||
Comment 18•10 years ago
|
||
Comment on attachment 8656379 [details] [review]
Bluetooth disable string patch
Did the mentioned changed.
Attachment #8656379 -
Flags: review?(gasolin)
Comment 19•10 years ago
|
||
Comment on attachment 8656379 [details] [review]
Bluetooth disable string patch
Looks good to me, thanks and congrats for the first gaia merge!
Attachment #8656379 -
Flags: review?(gasolin) → review+
Comment 20•10 years ago
|
||
The last thing is squash your commits into single commit, please check
http://eragonj.me/blog/fxos-why-we-need-to-squash-commits.html
to squash commits
| Assignee | ||
Comment 21•10 years ago
|
||
Comment on attachment 8656379 [details] [review]
Bluetooth disable string patch
Done with the squashing. Could I add the checkin needed?
Comment 22•10 years ago
|
||
Thanks! I'll help you merge the commit once gaia repo is open :)
Comment 23•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•