-
Notifications
You must be signed in to change notification settings - Fork 17
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
Added thumbnail to wagtail CMS #625
Conversation
71a5035
to
b229a80
Compare
b229a80
to
68fb28e
Compare
@@ -87,6 +95,7 @@ class ProgramPage(Page): | |||
FieldPanel('title_over_image'), | |||
InlinePanel('courses', label='Program Courses'), | |||
InlinePanel('faqs', label='Frequently Asked Questions'), | |||
FieldPanel('thumbnail_image'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should go before the courses and faqs, because these lists can be really long.
Maybe put at the beginning right before the link to the external page?
2 minor comments, but overall good. |
Yeah, see if you can fix the sizing of that image. I think the image should just be 100% the width of the box, with no height specified. It is being clipped apparently |
68fb28e
to
11001de
Compare
Comments are addressed |
in other words: can we leave the users the possibility to mess up with our home page? |
I was under the impression that the EDx course thumbnails were all the same size... No? |
The CMS users aren't ordinary users, they should be trusted to upload the right thumbnails |
@roberthouse54 No idea @noisecapella Fine with me @pdpinch ?? |
|
@Ferdi Yes it should be. If we aren't using edX thumbnails, how big should we expect our thumbnails to be? |
No idea, @roberthouse54 ? |
Sorry I was thinking of the EDx course thumbnails. OK, so the program thumbnails should be the same aspect ration as the EDx course thumbnails. So the program thumbnail can be the same size 378x225. If the image cropping is working, can we set it to crop at that aspect ratio, and then save the image at that size? |
Just made the change. To clarify, here's what's happening:
|
Yes, it should have the same aspect ratio as 378x225, cropped to that size, and scaled up to whatever width the box has in the browser |
I am still unclear what is happening. We need the images to all have the same aspect ratio. These two images in the mock above do not seem to have the same aspect ratio. |
The image on the right is the default image if no image was picked. I'll crop that image to have the same resolution as the other ones |
1faf42b
to
625d08a
Compare
tests are failing |
Truncate to some reasonable character limit with a "... (View More)" link to the program page. |
that text comes from the django model and not the CMS: I wonder if the should move it to the CMS... |
625d08a
to
de4d093
Compare
@giocalitri Filed #656 |
@roberthouse54 I'm going to file an issue for the View More link, in the interest of getting this PR merged first |
please rebase and squash. Then 👍 |
75edede
to
9f58ffa
Compare
What are the relevant tickets?
Fixes #518
What's this PR do?
Adds a field to the program page which represents the thumbnail shown on the home page for that program.
How should this be manually tested?
Before you upload any images, first make sure the default image looks appropriate. It will be the same filler image as before but with the correct aspect ratio. If you resize the browser window you should see this image get smaller or bigger to fill the box space which is roughly half the main container.
Run database migrations. Then in
/cms/
upload an image using the Images link on the left sidebar. Then go into a program page and set the thumbnail image to the image you uploaded. Go to the home page and see the program page with the new thumbnail. Resize the browser to make sure the image stretches and shrinks appropriately. Note that the image must always keep the correct aspect ratio and the height should not change. Anything toward the bottom of the image should be cut off.Any background context you want to provide?
edx course images are 378x225 so the homepage will probably be redesigned around these smaller boxes at some point soon.
Screenshots (if appropriate)
Full window:
Resized smaller: