Closed Bug 1016334 Opened 6 years ago Closed 5 years ago

Homescreen should not be back to first page when it's having inline activity

Categories

(Firefox OS Graveyard :: Gaia::System::Window Mgmt, defect)

x86
macOS
defect
Not set

Tracking

(feature-b2g:2.0, tracking-b2g:backlog, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S3 (6june)
feature-b2g 2.0
tracking-b2g backlog
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: amirn, Assigned: alive)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file)

In the vertical homescreen opening a Collection launches a new activity.
When the Collection is open and the activity has focus, tapping the Homebutton still triggers the homescreen UI.

Expected - tapping homebutton while an activity is open should close the activity and not forward the tap to the homescreen.
blocking-b2g: --- → backlog
feature-b2g: --- → 2.0
Whiteboard: [systemsfe]
Hey Alive, Tim - I recall seeing a thread somewhere talking about dispatching hardware events to apps, but can't remember where. In this case we would like to intercept the home button inside of an activity.

Do you guys have any thoughts/considerations on this? Ideally both what we are looking to do in the longterm, and what short-term solutions we have for 2.0. Thanks!
Flags: needinfo?(timdream)
Flags: needinfo?(alive)
That's https://wiki.mozilla.org/WebAPI/BrowserAPI/KeyboardEvent on dev-webapi and bug 989198.

It's definitely not for 2.0.

What kind of short-term solution you are looking at for 2.0?
Flags: needinfo?(timdream) → needinfo?(kgrandon)
Flags: needinfo?(alive)
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #2)
> That's https://wiki.mozilla.org/WebAPI/BrowserAPI/KeyboardEvent on
> dev-webapi and bug 989198.
> 
> It's definitely not for 2.0.
> 
> What kind of short-term solution you are looking at for 2.0?

I suppose we are looking for a polyfill of this in 2.0 if we won't have bug 989198. Seems like we can workaround this issue with IAC or even special case this app in the system app.
Flags: needinfo?(kgrandon)
I don't understand the requirement. If homescreen->activity, doesn't 'activity closes' mean 'show homescreen' ?
(In reply to Alive Kuo [:alive][NEEDINFO!] from comment #4)
> I don't understand the requirement. If homescreen->activity, doesn't
> 'activity closes' mean 'show homescreen' ?

In this case we need the activity to stay open, and exit a state after pressing the home button. A second press of the home button will return the user to the homescreen.
(In reply to Alive Kuo [:alive][NEEDINFO!] from comment #4)
> I don't understand the requirement. If homescreen->activity, doesn't
> 'activity closes' mean 'show homescreen' ?

Currently what happens is that (1) the activity is closed and homescreen is shown (2) the homescreen also receives the tap event and scrolls up
Well, if you want to change this behavior (and UX sign off), just fix the system app in homescreenLauncher. It's not difficult.
Component: Gaia::System → Gaia::System::Window Mgmt
Please attach a patch or video/screenshot of the behavior UX needs to review and request ui-review? assigned to Francis Djabri. Thank you!
This can just block the collections app for now.
No longer blocks: vertical-homescreen
Alive, can you confirm that you will be able to get this landed by FL on 6/9?
Flags: needinfo?(alive)
Target Milestone: --- → 2.0 S3 (6june)
Assignee: nobody → alive
Alive - let me know if you have any questions about this one, or want to chat about it. The description of this bug is a bit confusing to read, so apologies if anything is not clear. For 2.0 I was going to try to use IAC to fake dispatching the homescreen to activities until we have bug 989198 fixed.
(In reply to Kevin Grandon :kgrandon from comment #11)
> Alive - let me know if you have any questions about this one, or want to
> chat about it. The description of this bug is a bit confusing to read, so
> apologies if anything is not clear. For 2.0 I was going to try to use IAC to
> fake dispatching the homescreen to activities until we have bug 989198 fixed.

Did I misunderstand something? I don't think this one needs IAC work.
Flags: needinfo?(alive)
Maybe not, I was only thinking of it as a workaround. There may very well be a better hack or workaround to use. Again, I think the real fix for this is having bug 989198 - in 2.0 I assumed we needed to do a workaround. Maybe that is not the case though.
v1: stop changing the homescreen url if there's front window.
Attachment #8433838 - Flags: review?(timdream)
Comment on attachment 8433838 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/19973

I am a bit confused. So according to comments in the tree, frontWindow refers to window.open() pop-ups. The description of this bug is talking about activities, so this can only be a valid fix if we have already transition inline activity to frontWindow too OR the description is indeed referring to pop-ups. Was that what's done in bug 916709?

Also, what does the (new Date()) in the URL do?

Other than these two questions I don't have problems with this patch.
Attachment #8433838 - Flags: review?(timdream) → review+
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #15)
> Comment on attachment 8433838 [details] [review]
> https://github.com/mozilla-b2g/gaia/pull/19973
> 
> I am a bit confused. So according to comments in the tree, frontWindow
> refers to window.open() pop-ups. The description of this bug is talking
> about activities, so this can only be a valid fix if we have already
> transition inline activity to frontWindow too OR the description is indeed
> referring to pop-ups. Was that what's done in bug 916709?

For now, frontWindow may be popup or activity.

> 
> Also, what does the (new Date()) in the URL do?

It triggers hashchange for homescreen to back to the first page. This was an old hack.

> 
> Other than these two questions I don't have problems with this patch.
(In reply to Alive Kuo [:alive][NEEDINFO!] from comment #16)
> (In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from
> comment #15)
> > Comment on attachment 8433838 [details] [review]
> > https://github.com/mozilla-b2g/gaia/pull/19973
> > 
> > I am a bit confused. So according to comments in the tree, frontWindow
> > refers to window.open() pop-ups. The description of this bug is talking
> > about activities, so this can only be a valid fix if we have already
> > transition inline activity to frontWindow too OR the description is indeed
> > referring to pop-ups. Was that what's done in bug 916709?
> 
> For now, frontWindow may be popup or activity.
> 
> > 
> > Also, what does the (new Date()) in the URL do?
> 
> It triggers hashchange for homescreen to back to the first page. This was an
> old hack.
> 
> > 
> > Other than these two questions I don't have problems with this patch.

Hi Alive,

Does this mean we can land this? If so, can you please assign this bug to yourself?
Flags: needinfo?(alive)
(In reply to Candice Serran (:cserran) from comment #17)
> (In reply to Alive Kuo [:alive][NEEDINFO!] from comment #16)
> > (In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from
> > comment #15)
> > > Comment on attachment 8433838 [details] [review]
> > > https://github.com/mozilla-b2g/gaia/pull/19973
> > > 
> > > I am a bit confused. So according to comments in the tree, frontWindow
> > > refers to window.open() pop-ups. The description of this bug is talking
> > > about activities, so this can only be a valid fix if we have already
> > > transition inline activity to frontWindow too OR the description is indeed
> > > referring to pop-ups. Was that what's done in bug 916709?
> > 
> > For now, frontWindow may be popup or activity.
> > 
> > > 
> > > Also, what does the (new Date()) in the URL do?
> > 
> > It triggers hashchange for homescreen to back to the first page. This was an
> > old hack.
> > 
> > > 
> > > Other than these two questions I don't have problems with this patch.
> 
> Hi Alive,
> 
> Does this mean we can land this? If so, can you please assign this bug to
> yourself?

Yes, waiting Travis green.
I think I am the assignee.
Flags: needinfo?(alive)
https://github.com/mozilla-b2g/gaia/commit/a1597d129676803fa7024180b072abb1089e4627
Pretty sure the travis red is irrelevant.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Summary: Open activity should be able to handle Homebutton taps → Homescreen should not be back to first page when it's having inline activity
See Also: → 1021599
filed bug 1021664.
Mass modify - set status-b2g-v2.0 fixed for fixed bugs under vertical homescreen dependency tree.
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.