Skip to content
  • Phil Hughes's avatar
    Refactored multi-file data structure · d9aeaa5d6ecb
    Phil Hughes authored
    This moves away from storing in a single array just to render the table.
    It now stores in a multi-dimensional array/object type where each entry
    in the array can have its own tree. This makes storing the data for
    future feature a little easier as there is only one way to store the
    data.
    
    Previously to insert a directory the code had to insert the directory
    & then the file at the right point in the array. Now the directory
    can be inserted anywhere & then a file can be quickly added into this
    directory.
    
    The rendering is still done with a single array, but this is handled
    through underscore. Underscore takes the array & then goes through
    each item to flatten it into one. It is done this way to save changing
    the markup away from table, keeping it as a table keeps it semantically
    correct.
    d9aeaa5d6ecb