-
Notifications
You must be signed in to change notification settings - Fork 6
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
Smaller thumbnail trail images #755
Conversation
The most "compatible" way for this is to make sure trails are downloaded as full and then after a week we release a build that properly uses this. |
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.
That's a lot of changes, so not sure I understand everything. But that seems reasonable. Were you able to check that the old version of the app will still be compatible with new bundles?
projects/Mallard/src/components/front/items/trail-image-view.tsx
Outdated
Show resolved
Hide resolved
projects/common/src/index.ts
Outdated
@@ -396,26 +420,27 @@ export const frontPath = (issue: string, frontId: string) => | |||
|
|||
// These have issueids in the path, but you'll need to change the archiver if you want to use them. | |||
|
|||
//To remove. |
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.
when?
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.
never, :(
I was planning on moving media
to images/${size}/full-size
but instead I just moved all the others to thumbs/${size}/${use}
this means that the image paths don't change for full size images
...props | ||
}: ImageResourceProps) => { | ||
const [width, setWidth] = useState<number | null>(null) | ||
const imagePath = useImagePath(image) | ||
const imagePath = useImagePath(image, 'full-size') //TODO: This should be changed to use once we have a good amount of content published with trail thumbs |
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.
Can we determine what this is and add a timed trello card for it?
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 can make the comment clearer, but I meant the variable use
from line 55.
@@ -212,7 +212,7 @@ const OpinionSuper = ({ article, ...tappableProps }: PropTypes) => { | |||
) | |||
} | |||
|
|||
const SuperHeroImageItem = (props: PropTypes) => { | |||
export const SuperHeroImageItem = (props: PropTypes) => { |
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.
This change doesnt follow the patterns used in the rest of the code base.
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.
We had this conversation when I started on this PR where we agreed on export const
use: { mobile: 'full-size', tablet: 'thumb' }, | ||
} | ||
const article: CAPIArticle = { | ||
key: '🔑', |
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.
Emojis are nice to look at, but not inline with real data.
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.
This is consistent with the other tests in the file.
@@ -63,13 +65,3 @@ export const getImage = async ( | |||
|
|||
return [path, await maybeResponse.buffer()] | |||
} | |||
|
|||
export const getColours = async ( |
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.
Was this removed on purpose? Seems to not be removed anywhere else.
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.
It turned out not to be used anywhere, so I got rid of it as it was in the way when making the PR.
5e84b76
to
3776ace
Compare
@jimhunty changes made, can I get the +1 please? |
author Alex Ware <alex.ware@guardian.co.uk> 1571648155 +0100 committer Alex Ware <alex.ware@guardian.co.uk> 1572441783 +0000 Smaller thumbnail trail images don't break thumbs in existing installs or existing content downloaded archiver fixes oops fix lint and test pr changes pr comment fix build fix test?
Part 2 of #658
Replaces #673 which had a rebase accident.
thumb
andlarge-thumb
use
Performance:
This saves a small amount of RAM, but noticeably decreases image load time on android.