Title: Setting Up an Image Style
Section: Setting Up Content Structure
File name: structure-image-style-create.txt
Covers: Set up an image style for the Vendor page, scaled/cropped to 300x200. Apply this to Manage Display for the Vendor content type's image field. Follow-on task: Do the same for Recipes

Attribution

<<structure-image-style-create>>::
  Adapted by https://www.drupal.org/u/batigolix[Boris Doesborg] from https://www.drupal.org/documentation/modules/image
  copyright 2000-2015 by the individual contributors to the
  https://www.drupal.org/documentation[Drupal Community Documentation]

Checklist for this phase

- Does it follow the template?
- Have the comments and placeholder text been removed from the template?
- Is everything the topic was supposed to cover included, and nothing extra?
- If there are @todo notes, are they clear?
- If there are images included, do they include instructions for how to redo them in a comment? (Note: Screenshots do not need to be perfect. Just make a rough cut.)
- Is attribution provided?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

batigolix’s picture

Assigned: Unassigned » batigolix
Issue summary: View changes

assigning

batigolix’s picture

Issue summary: View changes
batigolix’s picture

Status: Active » Needs review
FileSize
3.32 KB

here s a first stab at it ...

i think this would work better if the example steps only cover 1 content type, instead of showing how it is done for both Vendor and Recipe ... there is a lot of repetition now

eojthebrave’s picture

I think it would probably be okay here to just cover one content type, either Recipe or Vender. Because yeah, like you said, it's a bit repetitive. Maybe you could cover just one, and then have a follow on task for the reader to do the same for the 2nd content type as a sort of practice exercise.

jhodgdon’s picture

Status: Needs review » Needs work

Looks pretty good!

My suggestion would be to give a complete description of how to do this for one content type, and then under Follow-on tasks, suggest doing something similar for the other content type. That way we define the steps just once.

Actually the "Covers" for this in the spreadsheet suggests to do this:

Set up an image style for the Vendor page, scaled/cropped to 300x200.

Follow-on: Apply this to Manage Display for the Vendor content type's image field. Do the same for Recipes

Hm... That actually says not to cover Manage Display in this topic, because we have structure-content-display for that. I am not against having Manage Display covered here too; probably a good idea. But we shouldn't completely cover both content types. Once they've done one, they should be able (on their own) to do it for another content type.

So I'd put Recipes into Follow-on tasks, and also I think we want <<structure-content-display>> as prerequisite knowledge?

Looks good though!

Oh another random thought: index entries. Maybe one for "Images,resizing" would be good? People might not know what "image styles" are.

jhodgdon’s picture

Issue summary: View changes

Adding checklist to issue summary.

batigolix’s picture

Status: Needs work » Needs review
FileSize
2.72 KB

Here's a new attempt addressing the remarks from #4 and #5.

This topic should cover "Set up an image style for the Vendor page". So that kind of implies setting up the display for the Vendor content type, not?

I don't mind removing the Manage Display part, though. You have a better bird eye view of the project: so let me know what you prefer.

batigolix’s picture

Assigned: batigolix » Unassigned
jhodgdon’s picture

Issue summary: View changes
Status: Needs review » Needs work

Looking great! A few minor things to address:

a) In Site Prerequisites, I think you'd also need to have at least one Vendor content item created, right?

b) I think I would just make the main task to do this for Vendor and not mention Recipe until you get to the end under Follow-on tasks.

c) We can do this in a separate Guidelines edit, but as long as you are (hopefully) editing the page, the navigation information isn't quite as our standards suggest, in either place:
https://userguide-drupal.redesign.devdrupal.org/guidelines/text-conventi...

d) The topic has a @todo for screenshots. I agree, it needs screenshots. Maybe a couple of them?

e) I would suggest at the end going back to the Vendor page that already exists, and verifying that it now shows up with the scaled-down image, rather than just saying that it will be used for new content (which is kind of misleading anyway, since the style will also be used for existing older content, right?). You can reference the "content-edit" topic, which should be telling how to find content at admin/content, rather than describing it in full.

So... I agree that this topic should cover how to apply the image style on the Manage Display page, so I think the steps here are great except we should have one more at the end to find the vendor page and see that it looks better. I edited the Covers to reflect this.

Thanks!

batigolix’s picture

Assigned: Unassigned » batigolix

assigning again

batigolix’s picture

New version should covers the issues mentioned in #9

jhodgdon’s picture

Status: Needs review » Fixed

Looking good! One minor thing: The image field is supposed to be called "Main Image" on both vendor and recipe content types, according to our scenario specs in
http://cgit.drupalcode.org/user_guide/tree/assets/text.txt?h=8.0.x

The spreadsheet had this wrong. I will update in this topic and on the other issue that creates that field (that topic writing task is not finalized yet).

Also when I built this, the images were not showing up. It turns out the image macro is finicky and there cannot be a space before the [ ... and there was also a problem with -- being I converted into an em-dash in the image file name, oops. So those image file names had to be tweaked.

This image macro was a problem on several other pages too. I'll have to go through the guide and check on that, plus add some notes to the Guidelines.

Other than that, looks great! Added to the guide source (with those few fixes), and will get it up on the site shortly (as soon as I make those other fixes in the guidelines and other topics).

batigolix’s picture

thanks!

i also noted the image generation issue (without having a clue how to fix it, of course)

jhodgdon’s picture

Yeah. So when I went through the output looking for images that were not working, the other thing I found out is that both comments and images have to start at the left margin to be recognized. Or at least, there were some that didn't, and when I moved them left they started working -- could also have been related to them being inside numbered lists? Not sure. Anyway, I had to make that change in a couple of files to get all of the provided images in all of the topics to show up in the output.

And by the way the way I found them was doing a text search in the PDF version of the output for "images/". Fun! :)

Anyway I did update the Guidelines with a note about the finicky format for images.
https://userguide-drupal.redesign.devdrupal.org/guidelines/formatting.ht...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.