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

Homepage: size all block images #22806

Merged
merged 4 commits into from Jun 4, 2018
Merged

Conversation

breville
Copy link
Member

This is a followup to #22786 and modifies the image URL of each "quarterslot" on the homepage to be sized by the server.

@breville
Copy link
Member Author

Honestly I'm not sure whether this is an improvement, but found it interesting to implement. Curious if there's a better approach, including a way to de-dupe the code.

@@ -124,7 +124,7 @@ def self.get_actions

def self.get_blocks(request)
if request.language == "en"
[
@en_blocks_entries || @en_blocks_entries = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ruby-style:

@en_blocks_entries ||= [

else
[
@non_en_blocks_entries || @non_en_blocks_entries = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@breville breville merged commit fea1ed7 into staging Jun 4, 2018
@breville breville deleted the homepage-size-all-block-images branch June 4, 2018 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants