Ticket #7354 (new defect)

Opened 6 years ago

Last modified 6 years ago

Closing an activity reenters the activity launch splash for another running activity

Reported by: erikg Owned by: marco
Priority: high Milestone: 8.2.0 (was Update.2)
Component: sugar Version: Update.1
Keywords: 8.2.0:? r+ joyride-2171:+ Cc:
Action Needed: qa signoff Verified: no
Deployments affected: Blocked By:
Blocking:

Description

On olpc3-23:

  • Open an activity.
  • Open another activity.
  • Close the second activity.
  • Observe that we are dropped into the splash screen for the last activity in the activity stack. We do not return from this state without alt+tabbing.

Attachments

launcher.patch Download (5.9 KB) - added by marco 6 years ago.
HomeWindow listen to the model, launcher is a transient state which is cancelled by any zoom level change
launcher2.patch Download (5.7 KB) - added by marco 6 years ago.
Fix e2 (was a regression)
launcher3.patch Download (7.2 KB) - added by marco 6 years ago.
Also drop the launch limit while I'm at it

Change History

Changed 6 years ago by erikg

  • keywords 8.2.0:? added; 8.2.0:- removed

Changed 6 years ago by erikg

  • milestone changed from Never Assigned to 8.2.0 (was Update.2)

Changed 6 years ago by erikos

  • keywords r? added
  • next_action set to code

This does switch back to the home view once the activity launched successfully. The callback for launching failure has this switch already.

diff --git a/src/view/Shell.py b/src/view/Shell.py
index b77465d..dfaeda2 100644
--- a/src/view/Shell.py
+++ b/src/view/Shell.py
@@ -111,6 +111,7 @@ class Shell(gobject.GObject):
         self._hosts[activity_host.get_xid()] = activity_host
         if home_activity.get_type() in self._activities_starting:
             self._activities_starting.remove(home_activity.get_type())
+            self._home_window.set_zoom_level(shellmodel.ShellModel.ZOOM_HOME)

Changed 6 years ago by erikos

|TestCase|

  • Launch an activity.
  • Don't switch to another activity
  • Close the activity

Verify: The home view should be shown after the activity is closed

Changed 6 years ago by Eben

Actually, when one activity is closed, the next in the stack should be revealed. In the older versions of Sugar we switched back to Home since one could select another running activity from there. In the new design, however, Home is an activity launcher. We switch to another running activity both because the always-available Frame makes it trivial to switch to another activity of choice (or Home itself), and because we want to encourage continued work in running activities over starting new instances.

Obviously, despite this change in approach, we need to make sure that the Home model is aware of the status of various activities, and should never show a launcher for an activity which has finished launching, no less one which has since been stopped.

Changed 6 years ago by homunq

I think that the patch should be put in place (I give it r+), and this bug should be changed or a new one opened to reflect Eben's concerns.

Changed 6 years ago by Charlie

Pressing F1 or F2 to go to the Neighborhood or Group views before going to the Home or Activity views also has the same effect as alt-tabbing -- not sure if that's helpful to know or not, but it's been how I've been getting around the problem.

Changed 6 years ago by marco

  • keywords r- added; r? removed

Hmm the zoom level handling code is messy and I'm not convinced the patch would address all the issue. I'll give a try to clean it up and fix this issue tomorrow.

Changed 6 years ago by marco

HomeWindow listen to the model, launcher is a transient state which is cancelled by any zoom level change

Changed 6 years ago by marco

  • keywords r? added; r- removed

In addition to the code review, some good testing would be appreciated.

Changed 6 years ago by erikos

These are the results from testing:

a) open activity A and close it directly

  • the launcher is shown shortly and then we end in the home view

b) open activity A and then activity B, after B has started use the frame to resume activity A then resume activity B again. Close activity B

  • activity B is closed and we end in the next open activity - activity A

c) open activity A and then activity B, after B has started use the zoom_home key to go back to the Home view, then use the zoom_activity key to resume activity B, close B

  • activity B is closed and we end in the home view

d) open activity A and then activity B, after B has started use the zoom_home key to go back to the Home view, then use the zoom_activity key to resume activity A, close A

  • activity A is closed and we end in the home view

e) open activity A and then activity B, after B has started use the zoom_home key to go back to the Home view, then use the zoom_activity key to resume activity B, close B

  • activity B is closed and we end in the home view

Now open activity C and close it directly.

  • you will end up in the launcher

Changed 6 years ago by erikos

Btw: case b does as well happen when the journal is involved:

b) open activity A, after A has started use the frame to resume the journal then resume activity A again. Close activity A

  • activity A is closed and we end in the next open activity - the journal

We have ticket #7008 open for this case.

Changed 6 years ago by marco

Fix e2 (was a regression)

Changed 6 years ago by erikos

Verified that launcher2.patch fixes the e2 regression.

Changed 6 years ago by marco

Also drop the launch limit while I'm at it

Changed 6 years ago by erikos

  • keywords r+ added; r? removed
  • next_action changed from code to add to build

For readability I would probably write this in two lines: self.remove(self.get_child())

current box = self.get_child()
self.remove(current_box)

Please attach a testcase and file tickets for the cases we have not handled with this patch.

  • the flickering when closing activity (a)
  • the dbus timeout (set_active)
  • the problem with being in home after closing an activity in some cases

Changed 6 years ago by marco

|Testcase|

1 Open an activity, close it. Verify that you are back to the homepage and not in the launcher. 2 Open an activity, switch to home and back to activity by using the function keys. Close the activity and verify that you are back to the homepage and not in the launcher.

Changed 6 years ago by marco

All done.

Changed 6 years ago by erikos

  • keywords joyride-2171:+ added
  • next_action changed from add to build to qa signoff

Tested in joyride-2171 as working.

Changed 6 years ago by Eben

  • blocking 8090 added
Note: See TracTickets for help on using tickets.