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

Allow specifying styles for images #589

Closed
12people opened this issue Dec 23, 2020 · 9 comments · Fixed by #822
Closed

Allow specifying styles for images #589

12people opened this issue Dec 23, 2020 · 9 comments · Fixed by #822
Assignees
Milestone

Comments

@12people
Copy link

I would love for Wger to become the central database that all FOSS projects pull workout information from. However, workout apps tend to use very different art styles — wger itself uses line art, openWorkout uses 3D animation, Feeel uses low-poly images.

It'd be great if volunteers could upload graphics in any of these styles and annotate their uploads so that developers could choose which style of illustration to display in their apps.

To achieve this, here's my rough idea of two attributes that could be added for the exerciseimage type:

Style — an enum that could have these values:

  • line art
  • 3D
  • low-poly
  • photo
  • other

Animated — a boolean specifying whether the image is static or animated (somewhat related to #289)

As for the style attribute, the idea is that more styles could be potentially added depending on the needs of the projects using wger. Aside from the styles used by the FOSS projects listed above, I also propose adding a "photo" style, as photos are arguably the easiest for volunteers to submit and can serve as a starting point for both line art and especially low-poly illustrations.

@rolandgeider
Copy link
Member

Hi! This is actually a nice idea that would not require many changes in the DB. I should have code somewhere to allow for users to submit images, must check on that.

@vinayassrao
Copy link

I would like to work on this issue.Can anyone guide me...

@rolandgeider
Copy link
Member

Sure! We need a new field "style" on ExerciseImage. Since we only allow only the values above, we need to pass them to the choices attribute (take a look e.g. at the gender field in the user profile). We also need to expose the value to the API, but that's just adding the new field to the list in ExerciseImageSerializer

@LucasSD
Copy link
Contributor

LucasSD commented Sep 16, 2021

Sure! We need a new field "style" on ExerciseImage. Since we only allow only the values above, we need to pass them to the choices attribute (take a look e.g. at the gender field in the user profile). We also need to expose the value to the API, but that's just adding the new field to the list in ExerciseImageSerializer

Hi @rolandgeider and @12people . I've configured my dev environment and it's all working and 1211 tests pass and one is skipped. I can get this issue solved and add tests. Please can you assign it to me? Thanks :)

@rolandgeider
Copy link
Member

All yours!

@LucasSD
Copy link
Contributor

LucasSD commented Sep 16, 2021

All yours!

Thank you!

@LucasSD
Copy link
Contributor

LucasSD commented Sep 17, 2021

Hi @rolandgeider. Please can you let me know your preferred blank, null and default field options for the new style field?

@rolandgeider
Copy link
Member

The current pictures are only line art, so that should be the default in the migrations. As for new submitted ones, I would say "photo"

@LucasSD
Copy link
Contributor

LucasSD commented Sep 17, 2021

Cool, I've opened a PR :)

@rolandgeider rolandgeider linked a pull request Sep 19, 2021 that will close this issue
2 tasks
@rolandgeider rolandgeider moved this from To do to Done in Exercise crowdsourcing Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants