Skip to content

Loading…

peek context #355

Closed
wslfung opened this Issue · 39 comments

3 participants

@wslfung

using data-bb-context="true" and works as expected, the peek menu shows up, but it doesn't go away unless I press/select a context menu item, pressing elsewhere has no effect, it also doesn't expand into the full context menu like in cascades which doesn't make the peek menu very useful.

@tneil
Open Source Projects member

I'm testing this with v0.9.4 (next branch) and the Dev Alpha 10.0.9 OS on a DevAlpha B and when I use the press and hold an image list with a context menu I get the following

  • Menu peeks
    • touch context menu and it stays open
    • click context menu button and it stays open this looks like a bug
    • touch screen behind menu and it closes
    • swipe from right-to-left on screen and it closes

Are these the same results that you are seeing?

@wslfung

I'm using v0.9.4 and 10.0.9 on Dev Alpha A.

when using data-bb-context="true" on an image list, I get a peek menu.

  • touch blank area on context, stays open, but does not change to full context - different from cascades
  • click context menu button, action fires and peek menu closes - works as expected (did not check the selected values yet)
  • touch screen behind menu, peek menu stays open
  • swipe screen does not have any effect.
@tneil
Open Source Projects member

I'll take a look. They keep tweaking the cascades context menu :o)

@wslfung

Also noticed one more issue, while scrolling the image list, if the finger stays on the screen too long, context menu will still be triggered. Probably not the right behavior.

@RonMen

Would it be possible to touch+hold a list item to open the peek menu and swipe the menu from right-to-left to open it like the real context menu? I can not add the context menu directly since the onclick handler of the items will push another screen, so the peek menu is the best choice but at this time I'm unable to read the entries when the peek menu is shown.

@tneil
Open Source Projects member

I'm trying to figure out why this isn't working for you... If you take the sample from the repo ("next" branch) and open the Context Menu sample page, the press and hold context menu is working exactly like this on my Dev Alpha B

@wslfung

I took the da8fddd build and deployed the sample to dev alpha a, and I get the same behaviour as I posted above except when I clicked the screen behind menu, the context menu goes away. The only difference between the sample and my app I can think of is that my image list contents are dynamically added rather than static. Could that have made any difference? In my app, the screen behind the peek menu is fully functional, whereas in the sample the screen behind isn't and when touched, the menu goes away.

@tneil
Open Source Projects member

Are you adding your image list items with the new JS interfaces, or doing it the old way shown in the samples?

@wslfung

using appendItem, I assume that's the new interface.

@tneil
Open Source Projects member

Yes, appendItem should be the new interface

@RonMen

The peek context menu is something really great if it would be working for me. Like when you open a website in the browser, touch+hold a link on the page it will show the peek menu and you are able to swipe it to open completely to show all entries in there. But this isn't working for bbUI.js peek context menu at this time and would be great if it will be available in the future like shown here: http://imageshack.us/a/img39/7892/img00000005changed.jpg

I "draw" an image-list on screenready event and it is styled+shown like expected. Also the touch+hold works to open the peek context menu, but I can not swipe the peek context menu to fully open up.

@tneil
Open Source Projects member
@RonMen

Hi @tneil, email is on its way to you.

@tneil
Open Source Projects member

Ok.. I've been able to reproduce it.. I'll start debugging

@RonMen

Good to know that it isn't just a problem of mine.

@tneil
Open Source Projects member

Looks like the issue has to do with screens that have both a context menu and action overflow items on the Action Bar

@RonMen

Sounds promissing to me! Hope you can get it fixed!! Thx very much for your hard work on bbUI.js!!!

@tneil
Open Source Projects member

I think I have it fixed.. just doing some final testing

@tneil tneil pushed a commit that referenced this issue
Tim Neil fixes for context menu issue #355 9f534f7
@tneil
Open Source Projects member

Ok, I've pushed up the changes into the "next" branch.. give them a try and see how they work

@RonMen

I tried, but with no luck. I can not swipe to open the peek menu. I downloaded the latest version 0.9.4 of both, .css and .js, but it seems to not work. Something I'm missing?

Also the buttons/entries in the context menu seem to not be clickable in any case. Sometimes it works, sometimes I need some more tries to get the onclick handler for the item.

@tneil
Open Source Projects member

Ok.. this is driving me bonkers... I'm running your code on a device in your app and it is working. Can you list the following:

  • WebWorks SDK version
  • Device Model
  • Device OS version
@RonMen

No problem, I give you all the things you need to know:

  • WebWorks SDK version: 1.0.2.9
  • Device: BB10 Dev Alpha (I think it is an "A" version from the BBJAM in Berlin earlier this year?)
  • Device OS version: 10.0.9.388

Hope this helps to figure out what is going on or send me a Dev Alpha B to get little bit deeper into it ;-)

@wslfung

The fix solved one issue, now when I click on the screen outside/behind the context menu, the menu goes away,

  • touching a blank area on the context does nothing yet. - (expectation is to expand into full context)
  • touching a button launches the action okay. (although it's always been hard to trigger any action on the dev alpha A, the button gets highlighted, but it doesn't always register as a click, probably sensitivity issues still with the firmware browser, the cascade widgets works much better)
  • swiping has no effects.
@wslfung

One more note: scrolling with the finger on the image list too long still triggers the peek menu

@RonMen

@wslfung is really right, now the context menu goes away when touching a blank area outside the peek context menu but nothing else is working well for me here, especially touching an item in the peek context menu will not in every case work, sometimes I need to touch/click some more times to get the action fired.

And, yes, in my use case I have only 2 items in a image-list and when touching the scroll is coming up and when going on with scrolling the peek context is shown.

I worked with the iScroll in some other projects and I added some variable to make sure nothing else happens when user is scrolling. I use the onScrollMove event to set a variable called isScrolling to be true and 120 milliseconds after the onScrollEnd this is set to false to make sure the scroll has ended to trigger other actions then.

@tneil
Open Source Projects member

@wslfung I haven't done anything around the touch of the context menu itself when it is peeking. Looking at the apps on the latest OS touching the context menu (not on a button) will show the menu. I'll have to add that as a feature

@wslfung and @RonMen The onclick sensitivity of the items is a browser/device combination issue. It is better on DevAlpha B and will see more OS tweaks leading to gold. The onclick of the item simply isn't firing.

@wslfung and @RonMen I haven't looked at the scrolling with the finger on the image causing the context menu to show.

@tneil
Open Source Projects member

On the swiping action.. are you starting the touch of your swiping action on the actual menu? Or on the screen area? The code currently is to capture the swipe on the screen area. Starting with a touch on the context menu itself will not currently swipe

@wslfung

by swiping, I mean the swiping from the menu out to the screen area which you've address and can be treated as a feature request.

AND thanks for your efforts, it's actually great to get replies in such short period which isn't always seen, and fixes are coming in by the day, which is awesome.

@RonMen

If I select an item on the image-list I use and swipe the scroller appears and after some seconds, like @wslfung mentioned, the peek context menu is shown.

It would really good to be able to show the complete context menu like in the picture I added before using the browser. The peek menu comes up and I can swipe right-to-left to open it completely.

Where to go to get the BB10 Dev Alpha B?? ;-)

@tneil
Open Source Projects member

Breakdown of Current Issues

ok.. At least I'm not going insane on the swiping then :o) The classic "working as designed" but not all the desired interactions.

So to re-cap:

  • Swipe from right-to-left on the screen after the context menu is peeked does show the full context menu
  • Swipe from right-to-left starting with your finger on the context menu does not show the full context menu [somewhat fixed]
  • Touch the context menu while it is peeking will not show the full context menu [fixed]
  • Context menu does not have the little "grip" image displayed while peeking to pull the context menu over. Context menu should pull over with grip/finger as you slide it feature request/bug
  • Context menu should not appear when scrolling a list of items bug
  • When peeking the top title is showing up on the context menu. This should fade in when the menu is shown [fixed]
@wslfung

yep, what you described is correct. just missed the bug where scrolling with the finger on the image-list too long triggers the peek menu. If I'm scrolling, it shouldn't trigger the menu.

@RonMen

@tneil + @wslfung: Combined both last posts and the list is complete!! ;-)

@tneil
Open Source Projects member

ok.. added

@tneil tneil pushed a commit that referenced this issue
Tim Neil updates for issue #355 7591a17
@tneil
Open Source Projects member

Just uploaded the fixes for:

  • When peeking the top title is showing up on the context menu. This should fade in when the menu is shown
  • Touch the context menu while it is peeking will not show the full context menu
@tneil tneil pushed a commit that referenced this issue
Tim Neil more fixes for issue #355 3ec30ab
@tneil
Open Source Projects member

Added as much of a fix I can get for now with

  • Swipe from right-to-left starting with your finger on the context menu does not show the full context menu

It looks like if you are swiping slowly it will work, but if you do a quick swipe, the ontouchstart isn't firing on the menu for whatever reason. So my gesture doesn't take hold.

@wslfung

Probably because of the hiding of the title when in peek mode, the buttons now shift down as the full context is shown.

@tneil tneil pushed a commit that referenced this issue
Tim Neil more updates for issue #355 27b9f1b
@tneil
Open Source Projects member

@wslfung the shifting buttons have been fixed in the latest commit

@tneil
Open Source Projects member

I'm going to open up two new issues for the following so that we can track them separately. I'll also likely assign them to the 0.9.5 milestone. I'm trying to get v0.9.4 merged down into master because of all the changes that support the new 10.0.9 release of the BB10 DevAlpha OS

  • Context menu should not appear when scrolling a list of items
  • Context menu does not have the little "grip" image displayed while peeking to pull the context menu over. Context menu should pull over with grip/finger as you slide it
@tneil tneil closed this
@tneil
Open Source Projects member

For reference the two new issues have been added:

#370

#371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.