lemeryfertitta / Climbdex

Search engine for training board climbs
https://climbdex.com
MIT License
42 stars 10 forks source link

Mirror ticks #30

Closed lemeryfertitta closed 6 months ago

lemeryfertitta commented 6 months ago

Similar to the official apps, ticks which have is_mirror=true should be indicated differently than ticks with is_mirror=false.

The is_mirror field is return in the by the Boardlib get_logbook call. In the apps, a backwards checkmark is used to indicate mirror ascent, and the checkmark and backwards checkmark overlapped indicates an ascent of both the mirror and non-mirror of a climb. Something similar could be done for Climbdex, but an SVG will be needed instead of the unicode symbol.

Maybe using https://icons.getbootstrap.com/icons/check/ and then manipulating the SVG as needed for the mirrored/doubled versions.

Example of doubled checkmark: Screenshot_20240203-110507

abant07 commented 6 months ago

Hey could I get started on this one?

abant07 commented 6 months ago

Hey so I am reproducing the environment, and I just had a question about where I should place the double checkmark, once I figure it out with the SVG manipulation. I checked out the climbdex website that was in the ReadME, and I was wondering if the double checkmark would go next matching climb descriptions after the user filters the climb? I have shown a picture to see if that is the page I should put it on.

Screenshot 2024-02-04 at 8 39 11 AM

Thanks

lemeryfertitta commented 6 months ago
image

In this image you can see the checkmark in both the climb list on the left and the climb details on the right. The reverse and doubled checkmarks would go in the same place. So to break down the specific ask a little bit more:

Let me know if you have any other questions!

abant07 commented 6 months ago

I see, ok thanks for clarifying.

I had one more questions. I seems I am having having some problem with accessing the sqlite database. I downloaded a database using bin/sync_db.sh , however, I still get a sqlite3 error saying its unable to open the database.

abant07 commented 6 months ago

Actually, I got it, thanks!

abant07 commented 6 months ago

def get_ticked_climbs(board, login_cookie): login_info = flask.json.loads(login_cookie) logbook = boardlib.api.aurora.get_logbook( board, login_info["token"], login_info["user_id"] ) return [f'{log["climb_uuid"]}-{log["angle"]}' for log in logbook]

is this the method I should be looking at in the views.py file?

abant07 commented 6 months ago

Also, so you know what filters I can put to see a result with a checkmark, because it seems that I am missing them even though I think I am on the same page as the picture you have above.

Screenshot 2024-02-04 at 9 17 37 AM
lemeryfertitta commented 6 months ago

is this the method I should be looking at in the views.py file?

Yes, the logbook variable is a list of logbook entries. Each entry should have an is_mirror field.

it seems that I am missing them even though I think I am on the same page as the picture you have above.

You have to be logged in to the relevant board app and have ticked some climbs on that board. If you haven't climbed on a Kilter (or other) board before and used the official Kilter board app, this may be a bit confusing. If you're curious to learn more, you could download the app and play around with it (e.g. try creating an account and ticking some climbs). This is more of a "good first issue" for someone who has used these apps before. Contributing to this repository will be much more challenging without that background, but you are certainly welcome to if you are still interested.

abant07 commented 6 months ago

Yeah, Ill give a shot.

abant07 commented 6 months ago

Ok I was able to solve it, I submitted a PR

Thanks

lemeryfertitta commented 6 months ago

Deployed

gardaholm commented 6 months ago

very nice addon! I would only suggest a slightly different svg to make the ticks more obvious. Hard to see the difference for me.

old new