ENGAGE-244: Implement multiple views and a toggle for catalogue browse

Metadata

Source
ENGAGE-244
Type
Sub-task
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
y z
Reporter
y z
Created
2010-01-15T13:30:10.000-0500
Updated
2014-03-03T14:15:45.459-0500
Versions
  1. 0.3b
Fixed Versions
N/A
Component
  1. Catalogue

Description

Implement multiple views and a toggle for catalogue browse currently it only supports the list view with no preview

Comments

  • y z commented 2010-01-22T17:04:27.000-0500

    This patch enables toggling on browse pages. However in order to do that browse has to go through the whole tree in order to find decorators (need to put check for navlist in place).

    other solution could be to pass a function as fluid decorator that will initialize nav list and attach click handler to the toggler.

  • Antranig Basman commented 2010-01-23T21:01:09.000-0500

    This patch is promising, but needs more work before it can be committed. The structural dependence of the three nested search loops on the arrangement of the component tree is "undesirable"

    General notes: Please avoid use of "fluid.merge" which has too heavyweight a workflow for these cases. Unless you need the extra power that it offers (property references, reverse merge, safety for fluid.VALUE, etc.) it is simplier and faster to use jQuery.extend(true, ...)

    Also, please ensure that your editor is set up to use spaces rather than tabs.

    I believe the main problem with this approach stems from the use of utils.decoratedUIBound - this unnecessarily also copies the structures involved during attachment, thus "killing" them. Over the weekend I will be proposing a different approach for expressing trees that will hopefully lead to the disuse of these "tiny renderer forest functions" but in the meantime please build the "listContents" component as a data structure and then the references to the original navListDecorators elements will be preserved.

    Note that you don't need to run two fluid.transform loops to build the structure. Simply write var navListDecorators = [] at the outset of the loop, and then within the transform loop, write navListDecorators[index] = myDecorator;
    Javascript closure visibility rules are your friend 😛

  • y z commented 2010-01-27T17:32:02.000-0500

    This is an initial patch, however styling for grid view still needs to be tweaked as well as the toggle link should be updated to the actual thumbnail.