Rohan Verma wants to merge 6 commits from /u/rhnvrm/allura/ to master, 2016-08-08
Preview:
Commit | Date | |
---|---|---|
[0eb95c]
(rhnvrm/design/neighbor_list)
by
Rohan Verma
Made projects count a lazy property and made no neighbors found a div |
2016-08-08 14:21:19 | Tree |
2016-08-03 07:32:21 | Tree | |
2016-08-03 07:12:09 | Tree | |
2016-07-26 08:25:20 | Tree | |
2016-07-26 07:54:13 | Tree | |
2016-07-26 07:25:12 | Tree |
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:
M.Project.query.count()
is bigger than some threshold, then skip the countsInstead 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
I chose to add a threshold of 100 so it will appear as 100+ Projects. For testing I set it to 10.
Removed the grid-4 and instead added a min-width
Fixed :)
Last edit: Rohan Verma 2016-08-03
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.
Updated! :)