-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Themes: Fix theme url to include the correct image resized url #16914
Conversation
You can trigger an installable build for these changes by visiting CircleCI here. |
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
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.
Hey @enejb, great job discovering this issue and proposing a solution. I made a couple of NitPick suggestions and offered up some readability improvements in addition it looks like there is a force unwrap case from the original code that we can probably clean up while we're making this change.
Co-authored-by: Chip <[email protected]>
Co-authored-by: Chip <[email protected]>
Thanks for all your help @chipsnyder |
} | ||
|
||
var queryItems: [URLQueryItem] = components.queryItems ?? [] | ||
queryItems.append(URLQueryItem(name: "w", value: "\(presenter!.screenshotWidth)")) |
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 we should handle this presenter!
by conditionally unwrapping.
I can push a change here though since I know you're away this week.
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 pushed the change for the small refactor I wanted to see the rest looks good to me. Thanks for handling this Enej!
Generated by 🚫 dangerJS |
This PR fixes the URL that we genetate to display the theme screenshots.
Before: https://i2.wp.com/s2.wp.com/wp-content/themes/pub/blank-canvas/screenshot.png?ssl=1?w=409
After: https://i2.wp.com/s2.wp.com/wp-content/themes/pub/blank-canvas/screenshot.png?ssl=1&w=409
The fix should download smaller images for each of the themes saving bandwidth and mobile data.
This issue was discoverd while trying to clear the screenshot image cache for the blank-canvas theme.
To test:
Navigate to the theme selection screen for a .com site. Notice that the screenshots show up as expected.
.org sites do not have the theme selection as an option.
Navigate to an atomic and jetpack site notice that the themes show up as expected.
Regression Notes
Potential unintended areas of impact
None that I can think of
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
None
PR submission checklist:
RELEASE-NOTES.txt
if necessary.