Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Gifs Spice: small code cleanup, ready for launch #1751

Merged
merged 6 commits into from May 15, 2015
Merged

Conversation

moollaza
Copy link
Member

This one should be ready now for production. I'm wondering if we should rename the package DDG::Spice::Giphy or potentially, DDG::Spice::Gifphy::Search -- I'd like to make IA's for their other endpoints so the names would be similar, i.e. Gihpy::Trending, Giphy::Random, Giphy::Translate

I also noticed that our CSS isn't applying the margin: auto to the images in the detail pane so they're floating off to the left. Not sure if we want to fix that internally or add CSS to this IA?

2015-04-12_19h48_50


I noticed that on mobile, the detail view uses the fixed image instead of the Gif -- is that expected?

Update: Looking at the template, we use the thumbnail for the detail view on mobile (because we set loadHighRes = false -- I think we need better handling of that for gifs? No point it showing a static image in the detail, even on mobile...

/cc @jagtalon @bsstoner @russellholt


IA Page: https://duck.co/ia/view/gifs

total: res.pagination.total_count,
itemType: 'Gifs'
},
var searchTerm = DDG.get_query().replace(/gifs?/i,'').trim();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This won't match the trigger giphy

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

total: res.pagination.total_count,
itemType: 'Gifs'
},
var searchTerm = DDG.get_query().replace(/gifs?|giphy/ig,'').trim();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe shouldn't be //g? There's the case where you could search for "giphy gifs" and it would strip out both of them.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

trim() looks like it's only on IE 9.

You deploy a polyfill on production for the trim function 👍
https://duckduckgo.com/d1758.js

Copy link
Member

Choose a reason for hiding this comment

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

@MrChrisW I should know that--thanks!

@jagtalon
Copy link
Member

I actually like the gifs to move in the thumbnails but they eat up too much data. Got 17mb for "hello gif". We should solve the mobile problem on our end though.

@moollaza
Copy link
Member Author

moollaza commented May 6, 2015

I think this one can move ahead then?

@jagtalon
Copy link
Member

@moollaza I added image_mobile which shows the gif (instead of the thumbnail) on mobile. 👍

jagtalon pushed a commit that referenced this pull request May 15, 2015
Gifs Spice: small code cleanup, ready for launch
@jagtalon jagtalon merged commit ec40205 into master May 15, 2015
@jagtalon jagtalon deleted the zaahir/giphy-spice branch May 15, 2015 07:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants