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

Team logos #529

Merged
merged 14 commits into from
Feb 28, 2024
Merged

Team logos #529

merged 14 commits into from
Feb 28, 2024

Conversation

robigan
Copy link
Contributor

@robigan robigan commented Feb 24, 2024

Add team logos.
@evroon @Sevichecc can you check translations are correct in your languages? I noticed chinese translation is missing some entries btw.

closes #515

Copy link

vercel bot commented Feb 24, 2024

Someone is attempting to deploy a commit to a Personal Account owned by @evroon on Vercel.

@evroon first needs to authorize it.

Copy link

codecov bot commented Feb 25, 2024

Codecov Report

Attention: Patch coverage is 91.17647% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 90.45%. Comparing base (661d183) to head (59a6440).

Files Patch % Lines
backend/bracket/routes/teams.py 86.66% 4 Missing ⚠️
...c/versions/19ddf67a4eeb_adding_teams_logo_paths.py 80.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #529   +/-   ##
=======================================
  Coverage   90.45%   90.45%           
=======================================
  Files         121      123    +2     
  Lines        3875     3938   +63     
=======================================
+ Hits         3505     3562   +57     
- Misses        370      376    +6     

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

@robigan
Copy link
Contributor Author

robigan commented Feb 25, 2024

Yeah I don't understand the tests. Erik you'll have to help me on this.

Sevichecc added a commit to Sevichecc/bracket that referenced this pull request Feb 26, 2024
evroon pushed a commit that referenced this pull request Feb 26, 2024
Copy link

vercel bot commented Feb 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bracket ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2024 8:28pm

@evroon
Copy link
Owner

evroon commented Feb 27, 2024

@robigan The tests are already correct right?

Copy link
Owner

@evroon evroon left a comment

Choose a reason for hiding this comment

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

Thanks for this! LGTM overall, have a few minor suggestions.

Also I think this branch has to be rebased now on master before it can be merged.

assert extension in (".png", ".jpg", ".jpeg")

filename = f"{uuid4()}{extension}"
new_logo_path = f"static/{filename}" if file is not None else None
Copy link
Owner

Choose a reason for hiding this comment

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

I think it would be better to store it in a subdirectory team_logos actually, I should have done that too for the tournament logos

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want me to store the tournaments logos in a subdir too? I assume that's what you want so I'll commit that in if you don't reply to this before I make the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Btw, I won't use team_logosbut rather team-logos as REST generally tends to prefer - over _.

Copy link
Owner

Choose a reason for hiding this comment

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

Do you want me to store the tournaments logos in a subdir too?

I was hesitant because it's a breaking change but let's just do it

handleRequestError(response);
const response = await useUploadLogo(files[0]);
await swrResponse.mutate();
handleRequestError(response as unknown as AxiosError); // TODO: Check with Erik if this is correct
Copy link
Owner

Choose a reason for hiding this comment

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

Can't it be handleRequestError(response as AxiosError); instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, TypeScript complains about the insufficient overlap. I just added type defs to the axios library as it was annoying me that there weren't any. Also why is Axios required rather than imported?

Copy link
Owner

Choose a reason for hiding this comment

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

Also why is Axios required rather than imported?

Ah no particular reason, must be an oversight.

backend/bracket/routes/teams.py Outdated Show resolved Hide resolved
@evroon
Copy link
Owner

evroon commented Feb 28, 2024

Awesome work, thanks!

@evroon evroon merged commit e3fa10e into evroon:master Feb 28, 2024
5 of 6 checks passed
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.

Teams logos
2 participants