qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Support a featured image/photo of the week/etc

Open cellio opened this issue 5 years ago • 7 comments

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 avatar Nov 01 '20 20:11 cellio

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 avatar Dec 10 '22 12:12 tomighita

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?

tomighita avatar Dec 10 '22 12:12 tomighita

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 avatar Dec 11 '22 22:12 cellio

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

tomighita avatar Dec 12 '22 10:12 tomighita

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?

tomighita avatar Jan 19 '23 19:01 tomighita

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 avatar Jan 20 '23 00:01 cellio

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!

cellio avatar Jul 24 '23 03:07 cellio