Skip to content

feat: enhanced grade label#1139

Open
senn wants to merge 4 commits into
LocalCrag:nextfrom
senn:feat/enhanced-grade-label
Open

feat: enhanced grade label#1139
senn wants to merge 4 commits into
LocalCrag:nextfrom
senn:feat/enhanced-grade-label

Conversation

@senn

@senn senn commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Just a small idea I had after some users told me they would like to be able to compare the original grade to the user grade.

Depending on the shown-grade toggle, it shows the other grade between brackets (in some places) with a related icon. The logic of the toggle stays the same, it's purely visual so no migration necessary.

Toggle = author grade, so user grade between brackets
image

Toggle = user grade, so author grade between brackets
image

I have not created an issue for this, but if needed I can create one retroactively...

@dorthrithil

Copy link
Copy Markdown
Contributor

Hi, I think this could clutter the UI quite a bit. At least for outdoor scenarios the mean user grade differing from the author grade is really rare. This means, that we would basically see two times the same grade everywhere.

Wouldn't it be enough to see this info on the line detail page?

@senn

senn commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Yes, could also work.

Although I do actually see grade difference quite often for outdoor problems as well. Example from Fontainebleau:
image

But in the line detail page can also work.

I’ll update the PR next week.

@dorthrithil

Copy link
Copy Markdown
Contributor

Sure, up- and downgrades happen regularly. My point was only that the actual mean user grade being a different one than the topo author grade doesn't happen very often.
Was the line in your example published as smth else then 7A in bleau.info?

@senn

senn commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

no it was published as 7A but the consensus is 7A/6C+ there. So it's probably not the mean but the avg (which ends up around 6C/6C+).

Comment thread client/src/app/modules/line/line-info/line-info.component.ts
@senn

senn commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

looks like this now:
image
or flipped by toggle
image

this is a super basic way of showing it. Let me know if you want it differently.

Comment thread client/src/app/modules/line/line-info/line-info.component.html
Comment thread server/src/util/voting.py
if candidate1 <= mean_grade:
candidate2 = all_grades[
lower_grade_index + 1 if lower_grade_index + 1 < len(all_grades) else len(all_grades)
lower_grade_index + 1 if lower_grade_index + 1 < len(all_grades) else len(all_grades) - 1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally found a bug while testing user grades. When selecting the highest possible grade this gave an IndexError.

I do wonder if this needs a migration for existing deployments?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i also added a test for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants