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

Support a featured image/photo of the week/etc #251

Open
cellio opened this issue Nov 1, 2020 · 7 comments
Open

Support a featured image/photo of the week/etc #251

cellio opened this issue Nov 1, 2020 · 7 comments
Labels
area: backend Changes to server-side code area: frontend Changes to front-end code complexity: easy Issues that should take limited effort to resolve/fix/build. hacktoberfest This repo participates in Hacktoberfest. For suitable issues and Hacktoberfest-PRs meta: good first issue Good for newcomers priority: medium type: change request New feature or request

Comments

@cellio
Copy link
Member

cellio commented Nov 1, 2020

https://meta.codidact.com/questions/278915

Two of our communities (so far) have recurring photo contests. Showcasing winning photos on main category views would both get those photos seen more and promote the contests, possibly increasing participation.

This request is to add an optional widget to the right column, which would show an image, a link to the post (on the Codidact network) containing it, and attribution (from the post). Moderators will need to be able to configure the widget with:

  • heading text ("photo of the week", "image of the century", "October contest winner", etc)

  • post URL (from which we can get the author for attribution)

  • maybe? image URL override, in case the post contains more than one? Or maybe we just always take the first.

The image we show will need to fit in the bounds of the widget. At configuration time (i.e. when a mod says "feature this image"), we should copy and resize the image (set max width, preserve aspect ratio). This has a couple advantages:

  • The front-end code doesn't have to handle varied sizes and the user doesn't have to pay the cost of downloading a large image and then having the browser scale it.

  • Moderators know what they're featuring; if the source post is edited to change the image, it doesn't affect what's featured. A confusing featured image ("hey, that's not at that URL") is better than automatically featuring whatever gets edited into the post later.

If a community has both a disclaimer block and a featured block, the disclaimer goes first. (This doesn't apply to any of our communities currently, but just in case...)

I've set the complexity based on informal conversation with @luap42. Feel free to change.

@cellio cellio added area: backend Changes to server-side code area: frontend Changes to front-end code type: change request New feature or request priority: medium complexity: easy Issues that should take limited effort to resolve/fix/build. labels Nov 1, 2020
@luap42 luap42 added hacktoberfest This repo participates in Hacktoberfest. For suitable issues and Hacktoberfest-PRs meta: good first issue Good for newcomers labels Oct 4, 2021
@tomighita
Copy link

Hi. I want to work on this issue. Just as a disclaimer, I am not very familiar with Ruby or the platform, but I'll try to get on track as fast as possible.
I am currently just trying to get a clear idea on how the platform is structured. I will try to implement the first idea, although for now it's not quite clear how.

I will come back with more feedback once I'm more into it, and will update with the changes I will be making, and if I figure out how to implement that.

@tomighita
Copy link

By the way, for the development environment, is there some actual data we can use for this? Or should we create some posts and work with those?

@cellio
Copy link
Member Author

cellio commented Dec 11, 2022

Hello @tomighita and welcome! Just FYI, the photo contests that prompted this request have become less frequent, but maybe being able to feature photos will help get them going again. You're welcome to work on it, or if you prefer a different issue that's fine too.

@luap42 did some experimentation a while back -- pinging in case he wants to chime in with any suggestions.

We don't have any canned data for dev instances; so far, people have been just creating a few posts manually to work with.

If you have questions about the code, how the project is structured, etc, a good place to ask them is https://collab.codidact.org/categories/56 . This is our community for people working with the platform code. (Just a heads-up that there's going to be a maintenance window in the next few hours so we can move the server; if you get a "down" notice, that's why.)

@cellio cellio assigned tomighita and unassigned luap42 Dec 11, 2022
@tomighita
Copy link

Thanks for the welcome and the details. I will keep you posted with the progress:)

@tomighita
Copy link

Hi. I am returning with some updates: I finished a working prototype. It is on the forked repo, on my profile. Right now, the featured image is updated like a normal file, with an input of type file. I put a few comments about what I now as of now that needs to be done. I will also need to link a specific post. I was thinking the user will simply fill in a number input of the post that the picture is taken from. Would that be alright?

@cellio
Copy link
Member Author

cellio commented Jan 20, 2023

Having the person who's setting up the featured post enter the post ID for that post is fine. We do this for featured posts (the links that show up in "featured" now), so that's consistent.

@cellio
Copy link
Member Author

cellio commented Jul 24, 2023

Hi @tomighita . I noticed it's been a while since our last comments. Are you still working on this? Are you waiting for something from someone else? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend Changes to server-side code area: frontend Changes to front-end code complexity: easy Issues that should take limited effort to resolve/fix/build. hacktoberfest This repo participates in Hacktoberfest. For suitable issues and Hacktoberfest-PRs meta: good first issue Good for newcomers priority: medium type: change request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants