Anyone else implemented rendering a *fragment* "in focus mode"? Or want to look at my implementation and show me how to make it less painful? :)

# Background:
Favorites introduces a concept of layout folders of @type="favorite_collection" rather than the @type="regular" that marks plain-old-normal-layout-tabs. Such layout folders are real DLM managed fragments, are "in the layout" of the users to whom they apply (for whom they are activated when the relevant DLM audience evaluator matches). But because their @type is goofy, they're not rendered as regular-old-tabs and normally users don't see them.

Users are intended to access them via the new Favorites portlet and to select new curated such collections for favoriting via the new Marketplace portlet in an experience that will probably be analogous to subscribable fragments (which subscribable fragments currently come in as regular old tabs).

When a user clicks on the name of a favorite collection in the Favorites portlet, the portal needs to render that fragment mostly as if it were @type="regular", and as if it were the only tab in the layout. We're focusing in on a fragment that the user normally doesn't see at all.

So, I've got an implementation of this that sort of works. Pull request here, with lovely screenshots:

https://github.com/Jasig/uPortal/pull/230

# How this solution needs to improve

As I continue to try out this solution, I'm learning that it would be a lot better to re-purpose the folder-name in the uPortal URL for this rather than introducing a new parameter. In the case where the folder name matches a regular-old-tab, then the current behavior of "activating" that tab and rendering the dashboard with that tab selected. In the case where it matches a non-regular fragment, render that fragment focused.

Anyone have hints on how I'd go after that approach rather than what I did? I looked into it but got tangled up where it seems to be translating the identifier into the index of the activated tab, which of course doesn't quite work when the targeted folder isn't a regular tab and so doesn't end up having an index, and that seemed to be just enough to prevent the just-use-the-folder-name approach from getting the id of the desired-for-focus fragment to show up as a parameter to the structure transform where it could do some good.


Andrew


--
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Reply via email to