Closed Bug 910185 Opened 11 years ago Closed 11 years ago

[CONTACTS] In export contacts, the 'Search box' can't be selected.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:koi+, b2g18 wontfix, b2g-v1.1hd wontfix, b2g-v1.2 fixed)

VERIFIED FIXED
blocking-b2g koi+
Tracking Status
b2g18 --- wontfix
b2g-v1.1hd --- wontfix
b2g-v1.2 --- fixed

People

(Reporter: b.paloma, Assigned: rexboy)

References

Details

(Whiteboard: [u=commsapps-user c=contacts p=0])

Attachments

(1 file)

Repro:

1. Go to Contacts -> Settings -> Export contacts
2. Tap on 'to SIM'
3. The list of contacts is shown, there is also a Search box
4. Type some chars in the Search box (ER1)


Expected:

ER1. It is possible to type characteres in the Search box and the list of contacts shown is filered whiley typing.

Actual: 

ER1. It isn't possible to type characteres in the Search box

Notes:
This bug has been checked on:
branch: master
Gaia:43cf923
Gecko:7dc9265
blocking-b2g: --- → koi?
Whiteboard: [u=commsapps-user c=contacts p=0]
This should be a regression, since we had that working before :(
blocking-b2g: koi? → koi+
We have the same problem in the "export to vCard". We maintain this bug for two screens, but if necessary we can open a new bug.
Assignee: nobody → rexboy
Seems like a z-index issue.

The z-index of search view is constantly 1 whereas z-index of export-view set in navigationStack is
higher than that.

Wondering if I should use navigationStack to manage search view..
The WIP.
https://github.com/rexboy7/gaia/commit/27e3de656f45ad7b933fa1588d2088b7bd56bfdd

In detail, what this WIP do is mainly:
* Let navigationStack manage search view.
* When navigating panels, only z-index=0 and z-index=1 are used rather than setting z-index to stack length.
  By doing this, we can prevent confused values when duplicated panels are moved to top of the stack.

Not sure if we have better solutions.. I'll try cleanup the code before sending review.
Attached file patch
Francisco, would you mind reviewing this patch?
It works for me but I still can't make the solution very clean..

Details below:
This patch tried to fix z-index using problems with navigating stack.
Several points are considered IMO:
1. The search-view is added into navigating stack since we need to change
   its z-index to a higher value when using search-view in import panel.
2. z-index of each panel is logged in stack for calculating z-index of
   next pushed panel. Since re-used panel may be removed from middle of
   the stack, I think stack.length is not precise on that and sometimes
   causes problem.
Attachment #800113 - Flags: review?(francisco.jordano)
Hi @rexboy

I think the best solution is what you comment on 2.

Right now it's creating several problems since we added another dimension for navigation. Your patch almost works ok but found a case which is failing.

Settings > Export > Select an export option (it will display the list in select mode) > close the list in select mode > got to import

The import window appear in white, with a z-index that makes it doesn't appear. I guess that could be caused cause in the import option we create a new navigation object.

Great job! The navigation thing in contacts going back and forward several times is a pain in the ass, but you almost have it fixed!!
Blocks: 887776
Hi @rexboy

sorry, just requesting the needinfo to be sure you saw my comment about your PR.

Thanks!
Flags: needinfo?(rexboy)
Yes I did, sorry for the late reply. Thanks for your review Francisco!
I'm just working on another bug and I'll try this bug later.. Sorry for that.

The problem you mentioned also occurs on current master I think. I guess someone
just inserted a listener of going previous panel too much time without removing it.
I haven't traced it in detail but I guess it's another issue that causes navigation
works incorrectly. I'll trace it later.
Flags: needinfo?(rexboy)
(In reply to KM Lee [:rexboy] from comment #8)
> Yes I did, sorry for the late reply. Thanks for your review Francisco!
> I'm just working on another bug and I'll try this bug later.. Sorry for that.
> 
> The problem you mentioned also occurs on current master I think. I guess
> someone
> just inserted a listener of going previous panel too much time without
> removing it.
> I haven't traced it in detail but I guess it's another issue that causes
> navigation
> works incorrectly. I'll trace it later.

Thanks!!
Blocks: 915641
Blocks: 915649
Sorry for the late reply. It was mid-autumn festival in Chinese last week so I was away for several days..

I was debugging and trying to solve the problem mentioned in comment #6, but after rebasing I found the problem mentioned in comment #6 has already been fixed in bug 910188. The problem seems to be unrelated to the z-index problem. The root cause is that event listener in list item is not removed correctly such that |navigation.back()| being called too many times. Seems German already fixed it perfectly so I don't have to add things on this patch. We can just fix the z-index problem here then.

So all I did is add some unit tests on the second commit.. ni? Francisco. May you take a look again?
Flags: needinfo?(francisco.jordano)
Comment on attachment 800113 [details]
patch

Updated.
Thanks :rexboy!

Will give it a try!
Flags: needinfo?(francisco.jordano)
Thanks :rexboy!

Will give it a try!
Hi again,

I tried to test the patch but it doesn't apply to current master, could you rebase?
Flags: needinfo?(rexboy)
OK I've rebased it. (See comment on Github)
I'll squash these commits once it's completed. Set ni? as a reminder again.
Flags: needinfo?(rexboy) → needinfo?(francisco.jordano)
Comment on attachment 800113 [details]
patch

Hi,

r+plusing, just 2 comments:

- I had to rebase cause we had a commit from Kevin that entered 11 hours ago, but it's quite simple, so it didn't cost me much.
- We have an error in a unit tests:

Error: TypeError: Contacts.navigation.go is not a function (http://communications.gaiamobile.org:8080/contacts/js/views/search.js?time=1380109885039:230)
      at onerror (http://test-agent.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4959)

Could you solve the error in the tests, squash and merge this?

Thanks a lot for your help!
Flags: needinfo?(francisco.jordano)
Hi :rexboy,

just left some info in comment 16

Thanks a lot!
Flags: needinfo?(rexboy)
OK, Thanks for reviewing! I've rebased and fixed the unit test error.
(I thought that error was unrelated, sorry for that.  Would you set plus on review?)

Travis down again unfortunately... I'll merge it as soon as it passes travis test.
Flags: needinfo?(rexboy)
Comment on attachment 800113 [details]
patch

Perfect then!

Thanks a lot for the work!
Attachment #800113 - Flags: review?(francisco.jordano) → review+
master:
https://github.com/mozilla-b2g/gaia/commit/342b260c7a716735d2dcafa6130890bca0402e67
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Verified on 9/29 v1.2 build:
Gecko-e73e078
Gaia-1992915
It is possible to tap on the Search box and write characters
Status: RESOLVED → VERIFIED
Uplifted 342b260c7a716735d2dcafa6130890bca0402e67 to:
v1.2: 0eb0d8cc62eec8349393eb7bd57e81910e3ec3f7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: