Skip to content

Conversation

@stadust
Copy link
Owner

@stadust stadust commented Mar 10, 2025

While reviewing #211 I noticed how absolutely horrendous the nation stats viewer code is, both backend and frontend. Luckily, I never committed to this API by documenting it, so we're free to whack it into shape without regard for backward compatibility.

License Acceptance

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

stadust added 6 commits March 10, 2025 21:30
Instead, use MiniDemonWithPlayers everywhere. It's true that a demon
will have at most one publisher or verifier, but having a whole new type
just to avoid allocating a Vec is a bit much.

Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
Instead of repeating all the fields of a MinimalDemon, just reuse that
struct. This brings the structure of MiniDemonWithPlayers closer to
MinimalRecordD, its equivalent from the GET /players/[id] endpoint.

Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
This also brings it closer to MinimalRecordD, its rough equivalent from
the FullPlayer object.

Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
Again, to make these structs be more similar to FullPlayer

Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
Literally every callsite was either explicitly passing in the permalink,
or passing it in if some other link was null (e.g. no verification
video). So just move this as a default into the function itself.

Signed-off-by: stadust <43299462+stadust@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 30.41%. Comparing base (349d8fe) to head (2556c86).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
pointercrate-demonlist/src/nationality/get.rs 0.00% 28 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #230      +/-   ##
==========================================
- Coverage   30.44%   30.41%   -0.04%     
==========================================
  Files         114      114              
  Lines        8011     8019       +8     
==========================================
  Hits         2439     2439              
- Misses       5572     5580       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@stadust stadust marked this pull request as ready for review March 14, 2025 21:05
@stadust stadust merged commit d1269c2 into master Mar 14, 2025
2 of 4 checks passed
@stadust stadust deleted the statsviewer-cleanup branch March 16, 2025 11:50
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