theCrag / website

theCrag.com: Add your voice and help guide the development of the world's largest collaborative rock climbing & bouldering platform
https://www.thecrag.com/
110 stars 8 forks source link

Annotations are being counted as routes in list view: #1261

Closed brendanheywood closed 10 years ago

brendanheywood commented 10 years ago

Annotations are being counted as routes in list view:

http://www.thecrag.com/climbing/australia/waterworks-quarry

25 != 30 routes

Looks like a new bug crept in TopoUtil::getRouteLabel (pretty sure this was good before?)

brendanheywood commented 10 years ago

eg 1 = annotation, 2&3 = route, 4 = annotation, 5 = route

image

Digging into this, on the area re-sequence page we show a number, and annotations are included, so here it kinda makes sense to include them. But on the list view page it doesn't. But it would be nice if these two number matched too, but not sure what to show on the reorder page that makes sense?

scd commented 10 years ago

Looking at the code, I am pretty sure that this problem has always been there. There is a natural place in the code where we can stop this happening if we want.

I have had a conceptual problem with this area for years.

Do we want a fixed number which is consistent throughout all contexts or a dynamic number which may vary between contexts? I am happy with the dynamic, so they could be different in different contexts.

Potentially topo's can link to anything. So are we number routes or topo linked objects? At the moment we are doing a mixture.

brendanheywood commented 10 years ago

I'm using this outside the context of topos, so maybe that's half the conceptual problem too.

It may make sense in future in some cases to link a topo shape to an annotation, but even if in this case I don't think it makes sense to give that linkage a number, the topo would display some text instead. The route count stat should defintely match the number of routes too. So yeah I think we go dynamic, so we need to pass in to the function which node types we want to count? By default count them all, and just list view filters out the annotations, or rather whitelists routes and areas.

Another long term idea could be that annotations get a number, but it isn't a decimal number, ie i ii iii iv like appendix or title page numbers in a book.

SyntaxPickax commented 10 years ago

I'm also noticing that annotations are preceding the "Add Route(s)" "Add Topo" etc button group. It looks a little funky. See "North Sea Stack" below: http://www.thecrag.com/climbing/united-states/patricks-point/area/329762922

screen shot 2013-10-22 at 10 44 12 am

brendanheywood commented 10 years ago

Yes I noticed that too and it's already fixed in dev for next release:

http://dev.thecrag.com/climbing/united-states/patricks-point/area/329762922

image

SyntaxPickax commented 10 years ago

Oh! Great, thanks.

brendanheywood commented 10 years ago

Fixed. We now have 'cumulative', 'nested' and 'listview' as numbering schemes for node lists