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

Create image fields in templates for press/latest updates items #549

Closed
Tracked by #60 ...
jenniferthibault opened this issue Oct 13, 2016 · 6 comments
Closed
Tracked by #60 ...

Comments

@jenniferthibault
Copy link
Contributor

Earlier mockups included opportunities to use images inside press/latest updates items in the embedded preview feeds. These make the feeds more visually interesting and provides different strategies to get users engaged ad clicking in. They don't appear to be present in the first release, but I'd want to check that with @noahmanger , and also get a sense of when we could think about taking this on.

screen shot 2016-10-13 at 10 13 58 am

@jenniferthibault
Copy link
Contributor Author

Quick update:

Aligning the images at the right of the text (instead of left) will keep the list easier to scan:

screen shot 2017-01-18 at 11 21 50 am

@noahmanger
Copy link

In order to get this layout to work like you've designed we'd need to transfer each of the posts images to a separate image field (Wagtail contains a built-in feed_image field for this). Right now, after scraping and importing, the images are just in the body text, which means that they're output in the same block as the snippet text.

This is a change we can make, but it will require two things:

  • Updating both the canonical page templates and the post.html feed template to include feed images if present (and updating styles accordingly)
  • Going through all posts with images and uploading them separately to the distinct field, which in turn requires being able to upload images to Wagtail via S3, which should be implemented soon.

I'll let @AmyKort make the call if this is something worth prioritizing now. It takes front-end work and then a manual process that Dorothy or somebody could likely do.

@AmyKort
Copy link

AmyKort commented Jan 24, 2017

We're thinking about this one. Thanks!

@dorothyyeager
Copy link
Contributor

I'm not able to make the call but I would personally love to keep being able to use images with Record articles. We primarily use them for examples, training announcements and staff announcements. I like Jen's suggestion of right-aligning. I am used to uploading images onto the Contribute server and playing with them (and also doing this in blogger for personal stuff), so am not anticipating that this would be too difficult for me to do. Right now it sounds like without the ability to just upload images, it's a more complicated process?

@jenniferthibault
Copy link
Contributor Author

Big thanks to @noahmanger for helping me figure out what was possible within the CMS template settings, fixing what we could with CSS, and then figuring out the logic for the rest. 🎉

There were a couple different scenarios for how images made it into the new CMS layouts from the old templates. Here's a spread of how they looked:

screen shot 2017-02-09 at 8 05 18 pm
screen shot 2017-02-09 at 8 05 32 pm
screen shot 2017-02-09 at 8 09 03 pm

@noahmanger made some tweaks to the CSS that made all existing latest updates images positioned first in the article, separate from the text. This gives us consistent layouts like the following for all the articles so far without manually updating any of the pages for now:

screen shot 2017-02-09 at 8 04 13 pm

To clean up the image thumbnails in the feed, we cordoned off 1/4 of the container space to be just for image thumbnails. The thumbnails will be automatically generated from what we have already, and won't need to be cropped. That will give us a layout like this:

image

This work will be implemented when https://github.com/18F/fec-cms/pull/808 is merged in.

I think these changes bring us to a pretty good spot for the existing images in article pages, but I have some guidance for how to make it even better in the future for new pages, which I'll continue over in 18F/fec-style#622 .

@noahmanger
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants