Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@deboer-tim
Copy link
Collaborator

Initial implementation of the file reference tag support as per the draft spec: file references can have one or more string tags, and clients can use this to filter to known tags.

Notes:

  • The spec may still separate tags in the filename by '_' or '.', we can easily fix that later.
  • I simplified ContestSource.getFile() here because of code overlap although it's not directly related - source just needs to know the type and id, not the entire object.
  • I got rid of ContestObject.ReferenceMatcher/ImageSizeFit and made getBestFileReference() private. My original thought years ago was that we could expose multiple ways of picking the 'best' file, but we never used/needed it.
  • I updated ContestObject.getFile() to match getRefImage(), and added an optional tag.
  • Team, person photo just pass null for the tag - I don't think we'll ever need light/dark for photos.
  • I updated group logo and the one use in TeamAwardPresentation to show the API and client change for tags. I expect to do the same thing for logos and banner in info (contest) and organization, but this PR is already big enough so that will come next.

First part of #1228.

Initial implementation of the file reference tag support as per the draft spec:
file references can have one or more string tags, and clients can use this to
filter to known tags.

Notes:
- The spec may still separate tags in the filename by '_' or '.', we can fix that
  later.
- I simplified ContestSource.getFile() here because of code overlap although it's
  not directly related - source just needs to know the type and id, not the
  entire object.
- I got rid of ContestObject.ReferenceMatcher/ImageSizeFit and made
  getBestFileReference() private. My original thought years ago was that we could
  expose multiple ways of picking the 'best' file, but we never used/needed it.
- I updated ContestObject.getFile() to match getRefImage(), and added an optional
  tag.
- Team, person photo just pass null for the tag - I don't think we'll ever need
  light/dark for photos.
- I updated group logo and the one use in TeamAwardPresentation to show the API
  and client change for tags. I expect to do the same thing for logos and banner
  in info (contest) and organization, but this PR is already big enough so that
  will come next.

First part of icpctools#1228.
@deboer-tim deboer-tim merged commit 66857b6 into icpctools:main Sep 17, 2025
4 checks passed
@deboer-tim deboer-tim deleted the file-ref-tags branch September 17, 2025 12:21
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