Bug 13247 - Add capability to pop to a certain page on the menu stack
: Add capability to pop to a certain page on the menu stack
Status: CLOSED FIXED
Product: SqueezePlay
Classification: Unclassified
Component: Browser
: unspecified
: All All
: P1 enhancement (vote)
: 7.4.0
Assigned To: Ben Klaas
: ipeng
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-05 08:07 UTC by Joerg Schwieder
Modified: 2009-10-05 14:29 UTC (History)
3 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Schwieder 2009-08-05 08:07:35 UTC
This bug is an enhancement request for the SlimBrowse protocol to enable moving backwards to an arbitrary page on the stack.

Process: Each page is assigned a name that can be used with the "nextWindow" directive to move backwards on the window stack until that page is reached.

Changes:
1. Each page can be assigned a "windowId" attribute that identifies it on the stack. The name will be attributed in the window field.

Example:
{
 actions => ...,
 text => "Demo Menu",
 window => { 
             titleStyle => ...,
             windowId => "demo",
           },
}

2. The "nextWindow" directive for a "do" action can take any name of a page on the stack as a target. The stack will be searched backwards from the current window until a window with a matching windowId is found. All windows above that window are then popped from the stack.

Example:

{
 actions => { "do" => {...} },
 nextWindow => "demo",
 text => "Return to Demo Menu",
}

3. The "windowId" tag may not take a value of one of the predefined targets for nextWindow, that is:
"parent", "grandparent", "nowPlaying", "playlist", "home", "refresh", "refreshOrigin"
Comment 1 Andy Grundman 2009-08-05 08:10:12 UTC
Also affects ip3k UI.
Comment 2 Ben Klaas 2009-08-10 09:41:33 UTC
Ben to cover SP-side, Andy to cover ip3K side.
Comment 3 SVN Bot 2009-08-19 09:38:22 UTC
 == Auto-comment from SVN commit #7152 to the jive repo by bklaas ==
 == https://svn.slimdevices.com/jive?view=revision&revision=7152 ==

Bug: 13247
Description: full Squeezeplay-side support for popping back to a specific windowId in the stack
follows the exact specification that Pippin posted on initial bug comment
Comment 4 Ben Klaas 2009-08-19 09:40:08 UTC
Andy, this one goes to you for the ip3k support

ratcheting down the time estimation to 2hrs. I'll leave it up to you to tweak further
Comment 5 Joerg Schwieder 2009-08-19 09:42:57 UTC
Ben,

are there already pages using this?
I do have an implementation in my iPeng beta but nothing to test it against :-)
Comment 6 Ben Klaas 2009-08-19 09:49:56 UTC
there aren't so I just hacked this into Jive.pm to test. Alarm Settings page gets and id of 'foo', remove alarm item gets a nextWindow param of 'foo'

sers/bklaas/svk/slim/7.4/trunk/server/Slim/Control: svk diff
=== Jive.pm
==================================================================
--- Jive.pm     (revision 35377)
+++ Jive.pm     (local)
@@ -991,7 +991,7 @@
                                        },
                                },
                        },
-                       nextWindow => 'grandparent',
+                       nextWindow => 'foo',
                },
        );
        my $removeAlarm = {
@@ -1529,7 +1529,7 @@
                                        player => 0,
                                },
                        },
-                       window         => { titleStyle => 'settings' },
+                       window         => { windowId => 'foo' },
                };
        }
Comment 7 Joerg Schwieder 2009-08-19 09:59:22 UTC
Cool. Thanks. Will give it a try.
I don't have a working svn copy right now, but I can just change a normal
"build" version, can't I?
Comment 8 Ben Klaas 2009-08-19 10:19:15 UTC
it's Perl, totally hackable in any form! :)
Comment 9 Joerg Schwieder 2009-08-19 10:21:43 UTC
You meant: It's Perl, a total hack in any form :))
Comment 10 Joerg Schwieder 2009-08-19 17:47:28 UTC
Updated spec on Wiki
http://wiki.slimdevices.com/index.php/SqueezeCenterSqueezePlayInterface
Comment 11 SVN Bot 2009-09-08 21:00:27 UTC
 == Auto-comment from SVN commit #28476 to the slim repo by andy ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28476 ==

Bug 13247, player UI support for windowId/nextWindow
Comment 12 SVN Bot 2009-09-08 21:02:22 UTC
 == Auto-comment from SVN commit #7262 to the network repo by andy ==
 == https://svn.slimdevices.com/network?view=revision&revision=7262 ==

Bug 13247, change 'Return to App Gallery' to use nextWindow
Comment 13 SVN Bot 2009-09-09 07:57:18 UTC
 == Auto-comment from SVN commit #28479 to the slim repo by andy ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28479 ==

Bug 13247, add windowId/nextWindow support for SP
Comment 14 Andy Grundman 2009-09-09 07:59:20 UTC
SC side should be done, not sure nextWindow/windowId is working correctly on SP though.
Comment 15 SVN Bot 2009-09-09 08:43:39 UTC
 == Auto-comment from SVN commit #28480 to the slim repo by bklaas ==
 == https://svn.slimdevices.com/slim?view=revision&revision=28480 ==

Bug: 13247
Description: nextWindow param needs to be part of 'go' action
Comment 16 SVN Bot 2009-09-09 08:46:53 UTC
 == Auto-comment from SVN commit #7474 to the jive repo by bklaas ==
 == https://svn.slimdevices.com/jive?view=revision&revision=7474 ==

Fixed Bug: 13247 +1
Description: add setWindowId() method to Window.lua
allow browseSink results to optionally set a windowId (previously only the menu item that created the window did)
Comment 17 Joerg Schwieder 2009-09-09 09:03:45 UTC
Ben,
"nextWindow param needs to be part of 'go' action"
That's not how it is specified here:
http://wiki.slimdevices.com/index.php/SqueezeCenterSqueezePlayInterface

There it says "nextWindow" is part of the <item_fields>

It's also not what I specified above so this is a change to
"follows the exact specification that Pippin posted on initial bug comment"
so probably a change as I posted it based on the spec in the wiki.

Could you update the spec if needed?
I'll check whether iPeng works this way, too (glance into the code says "probably yes") but let's try to get the doc somewhat consistent to the real world.
Comment 18 Ben Klaas 2009-09-09 11:35:26 UTC
sorry, for squeezeplay it is valid to have a nextWindow param, in declining level of precedence, at base, item, or json action level.

-- actions take precedence over items/base, item takes precendence over base
nextWindow = aNextWindow or iNextWindow or bNextWindow

wiki has been updated.

my checkin message should have read:
"nextWindow param needed, in this particular application, to be part of 'go' action"
Comment 19 Joerg Schwieder 2009-09-09 12:27:57 UTC
Thanks! Good to see the wiki updated!
Comment 20 James Richardson 2009-10-05 14:29:22 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.