Skip to content

Conversation

@emonadeo
Copy link
Contributor

@emonadeo emonadeo commented Sep 13, 2025

  • Record submitter has been moved to own page /demonlist/submit-record.
  • Remove all previous record submitter instances.
  • Remove submitter search parameter from /demonlist.
  • Prefills record holder field if the user is logged in and has claimed a player.
  • Prefills demon if submitter was opened from a demon's page (controlled by demon=<position> search parameter).

Fixes #293.

TODOs

  • Fix prefilled values not being visible (Despite being properly set as the value attribute??)
  • Remove any resulting obsolete JS logic, if there is any

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.

@codecov
Copy link

codecov bot commented Sep 13, 2025

Codecov Report

❌ Patch coverage is 0% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.04%. Comparing base (4f03220) to head (36b92a3).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
pointercrate-demonlist-pages/src/components/mod.rs 0.00% 7 Missing ⚠️
pointercrate-demonlist-pages/src/demon_page.rs 0.00% 6 Missing ⚠️
pointercrate-demonlist/src/player/get.rs 0.00% 6 Missing ⚠️
pointercrate-demonlist-pages/src/account/demons.rs 0.00% 5 Missing ⚠️
...rcrate-demonlist-pages/src/components/submitter.rs 0.00% 5 Missing ⚠️
...ointercrate-demonlist-pages/src/account/records.rs 0.00% 2 Missing ⚠️
pointercrate-demonlist-pages/src/overview.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #298      +/-   ##
==========================================
- Coverage   36.16%   36.04%   -0.13%     
==========================================
  Files         121      121              
  Lines        5837     5857      +20     
==========================================
  Hits         2111     2111              
- Misses       3726     3746      +20     

☔ 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
Copy link
Owner

stadust commented Sep 13, 2025

Thanks a lot for this! I really like having it pre-select the demon as well. But I really don't think the submitter needs to be (or should be) on its own page. Could you revert that part of this PR?

@emonadeo
Copy link
Contributor Author

emonadeo commented Sep 13, 2025

But I really don't think the submitter needs to be (or should be) on its own page.

Why do you think that?

This PR originally started as just adding prefilling, but while doing so it felt like I would have to “pollute” multiple routes with logic and data just for the record submitter.

I think having a single form instance on a dedicated page, rather than a collapsible widget that is inserted on multiple pages, would simplify code, especially for future modifications like in this case, form prefilling.

My motivation for this change is almost purely technical implementation. I did consider how a page instead of a widget would impact the user and figured it doesn't.

On the other hand the technical benefits I see are

  • Less JS logic (opening/closing the widget vs. a static page)
  • For pages the panel is on: Pulling in auth and querying the db where it otherwise is not necessary
  • Page layouts don't need to worry about the open/hidden widget anymore

I don't mind reverting this change (it would in fact make this PR much smaller), but I genuinely think this is an improvement.

@stadust
Copy link
Owner

stadust commented Sep 27, 2025

Sure, its simpler implementation wise, but i think for the user its a bit nicer to not have to navigate to a separate page, and also that a page with just the record submitter on it would simply look really empty

@emonadeo
Copy link
Contributor Author

emonadeo commented Oct 4, 2025

Here you go. Personally don't like it, but done as requested.

@emonadeo emonadeo marked this pull request as ready for review October 4, 2025 02:41
@emonadeo emonadeo changed the title Move submitter to its own page and prefill fields if possible Prefill fields in record submitter if possible Oct 4, 2025
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.

auto select record holder in record submission form if you're logged in with a verified player claim

2 participants