Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing notice: "This competition's results are visible but haven't been posted yet." #9229

Closed
timreyn opened this issue Apr 16, 2024 · 6 comments
Labels
META: good second issue More involved than first issue, these help get a deeper understanding of the codebase TECH: ruby Requires knowledge of Ruby

Comments

@timreyn
Copy link
Contributor

timreyn commented Apr 16, 2024

image

I'm not sure what stage of the results posting process this competition is, but it's a little confusing -- what does it mean that results are visible? I can't see them.

This isn't just visible to staff / listed organizers -- it also shows when I'm logged-out.

@viroulep
Copy link
Member

You caught the roughly 5 minutes window where the results are here but not posted yet because CAD is running.

The results are visible to admins I think, I can't remember if they show up directly on the main competition's page, but we (WRT) definitely check how they look publicly by going to the individual event's results page.

The notice is confusing enough, I'm not too sure why it's visible to non-admin?

Related issue: #772.

@dunkOnIT dunkOnIT added META: good second issue More involved than first issue, these help get a deeper understanding of the codebase TECH: ruby Requires knowledge of Ruby labels Apr 17, 2024
@dunkOnIT
Copy link
Contributor

dunkOnIT commented Apr 17, 2024

There are two options here:

  1. Don't show the notice to non-admins
  2. Change the wording to something like "We are busy processing this competition's results - they should be available shortly."

Both are pretty straightforward, let us know if there is any preference. (I tend towards not showing it to non-admins - or perhaps, non-organizers/delegates as they will know that the results have been posted but aren't showing up yet?)

@gregorbg
Copy link
Member

Suggestion based on Duncan's reply: Keep the notice as-is for admins but display the updated wording (what is labeled (2) in his response) for non-admins

@darshanvss
Copy link
Contributor

I am new to Ruby, but I'd like to give it a try.

@dunkOnIT
Copy link
Contributor

dunkOnIT commented Jul 18, 2024

@darshanvss you're welcome to pick this issue up! Roughly speaking, you'll want to:

  1. Find where in the code the existing message is currently displayed
  2. In en.yml,Find the i18n key that is being called to display the existing text
  3. Create a new key in the same section which will be displayed to non-admin users
  4. Add an if branch in the section of code you found in (1) which displays the key you defined in (3) to non-admin users

There is a function that will check whether the user can admin the competition - if you look around in the code near (1) you should be able to find it pretty quickly

Don't forget to check our docs for how to get up and running, as well as a basic guide on Rails.

If any of the steps I listed don't make sense, ChatGPT should be able to point you in the right direction (eg, explaining what en.yml is and where to find it). We're happy to help with questions if you don't right with those resources, though!

@lnzainn
Copy link
Contributor

lnzainn commented Aug 7, 2024

@timreyn the pr has been approved and merged. You can close this now ;)

@dunkOnIT dunkOnIT closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
META: good second issue More involved than first issue, these help get a deeper understanding of the codebase TECH: ruby Requires knowledge of Ruby
Projects
None yet
Development

No branches or pull requests

6 participants