Git Merge Request #146: Added project count and new design for neighborhood listing (merged)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Rohan Verma wants to merge 6 commits from /u/rhnvrm/allura/ to master, 2016-08-08

Preview:
Imgur

Commit Date  
[0eb95c] (rhnvrm/design/neighbor_list) by Rohan Verma Rohan Verma

Made projects count a lazy property and made no neighbors found a div

2016-08-08 14:21:19 Tree
[c22707] by Rohan Verma Rohan Verma

Improved design based on suggestions

2016-08-03 07:32:21 Tree
[17d858] by Rohan Verma Rohan Verma

Added threshold of 100 to projects_count method

2016-08-03 07:12:09 Tree
[e705e5] by Rohan Verma Rohan Verma

Update tests to match new neighborhood listing css classes

2016-07-26 08:25:20 Tree
[375839] by Rohan Verma Rohan Verma

Finish Design changes in neighborhood listing

2016-07-26 07:54:13 Tree
[dc3113] by Rohan Verma Rohan Verma

Added project count and new design for neighborhood listing

2016-07-26 07:25:12 Tree

Discussion

  • Dave Brondsema

    Dave Brondsema - 2016-08-01

    The project count logic is going to be really slow if a site has hundreds, thousands, or more projects. Unfortunately it is the correct logic so we can't really change it to make it faster. The options I can think of are:

    • don't do a project count at all
    • control it with a config setting, or better yet if the total M.Project.query.count() is bigger than some threshold, then skip the counts
    • cache the count values - but this doesn't really work with permissions since different people can see different projects

    Instead of having inline CSS the width & height for .placeholder could be in the CSS file.

    Should have </div> not </tbody>

    If a neighborhood name is long, you can't see the project count, and sometimes the name itself can be cut off. Maybe we don't want a fixed size for the boxes.

    Looks better than the previous :D

     
    • Rohan Verma - 2016-08-03

      control it with a config setting, or better yet if the total M.Project.query.count() is bigger than some threshold, then skip the counts

      I chose to add a threshold of 100 so it will appear as 100+ Projects. For testing I set it to 10.

      Imgur

      If a neighborhood name is long, you can't see the project count, and sometimes the name itself can be cut off. Maybe we don't want a fixed size for the boxes.

      Removed the grid-4 and instead added a min-width

      Imgur

      Imgur

      Instead of having inline CSS the width & height for .placeholder could be in the CSS file.

      Should have not

      Fixed :)

       

      Last edit: Rohan Verma 2016-08-03
  • Dave Brondsema

    Dave Brondsema - 2016-08-05

    projects_count() gets called twice. Can set it to a variable in the template. Or make it a @LazyProperty (that will have it cache its result)

    It'll probably never run for anyone, but the "else" part that has <tr><td class="no-nbhds"> should be a div or something, since the table is gone.

    Looks good otherwise.

     
    • Rohan Verma - 2016-08-08

      Updated! :)

       
  • Dave Brondsema

    Dave Brondsema - 2016-08-08
    • Status: open --> merged
     

Log in to post a comment.