Skip to content

Commit e12ee25

Browse files
committed
Add blog post: CC Browser Extension Week 5, 6
1 parent c0f0401 commit e12ee25

File tree

1 file changed

+37
-0
lines changed
  • content/blog/entries/cc-browser-extension-week5-6

1 file changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
title: CC Browser Extension Week 5, 6
2+
---
3+
categories:
4+
gsoc
5+
gsoc-2019
6+
cc-browser-extension
7+
open-source
8+
---
9+
author: makkoncept
10+
---
11+
pub_date: 2019-07-04
12+
---
13+
body:
14+
15+
For the context, I am working on my GSoC project that is to make a browser-extension to search CC Licensed content in the public domain by interacting with CC Catalog API.
16+
17+
**Previous Blogs**:
18+
- [CC Browser Extension - A GSoC Project](http://creativecommons.github.io/blog/entries/cc-browser-extension-a-gsoc-project/)
19+
20+
### Work Done
21+
These couple weeks were spent on finishing the filter section, setting up infinite-scroll and fixing issues and bugs after some days of testing.
22+
23+
Most of the filter section was complete but I missed a tiny detail that the Catalog API [does not accept](https://api.creativecommons.engineering/image/search?q=hello&li=cc0&lt=commercial) both the license and use-case filter queries in the same request. I did some changes in the code for generating the valid URL for every filter action and added the relevant UI changes of deselecting and disabling the license drop-down when a use-case is selected.
24+
25+
The infinite scroll was set-up by following the classic solution of firing another request to the API when the user scrolls to the bottom and appending the thumbnails of the result in the grid.
26+
27+
I tested the extension for a couple of days and made some [bug reports](https://github.com/creativecommons/ccsearch-browser-extension/issues?q=is%3Aissue+is%3Aclosed) on Github. Most of them were pretty easy to fix but the one I struggled with was [this](https://github.com/creativecommons/ccsearch-browser-extension/issues/3) one. After some discussion on slack, [Breno](https://creativecommons.org/author/brenoferreira/) and [Dhruv](https://github.com/dhruvkb) suggested using the [Masonry grid](https://masonry.desandro.com/) for the thumbnails (I was previously using the standard float grid of 3 columns). I made the transition but observed some flickering in the images on firefox when a new batch loaded on scrolling. It was working fine on chrome though. I spent a whole day looking for alternatives or doing some silly fix by using a bunch of timeouts. Again, Breno and Druv came to the rescue and suggested that some animations may be causing this. But even after a few hours of hit and trial and removing and fixing animations, I couldn't fix it only because I was looking in the wrong place. By changing the `transitionDuration` option of masonry to `0` did the trick. In fact, it was the first thing I should have tried. I should maybe take breaks more often to clear my mind :p
28+
29+
### Coming Up
30+
- Work on showing relevant image info when we click on the image.
31+
- Let users copy the rich-text or HTML version of the attribution with one click.
32+
- Add the download buttons to download the image and the attribution.
33+
34+
You can check out the project on [Github](https://github.com/creativecommons/ccsearch-browser-extension) and join the discussion on `#gsoc-browser-ext` channel on [slack](http://creativecommons.github.io/community/#slack).
35+
36+
*Special Thanks*: [Alden](https://creativecommons.org/author/aldencreativecommons-org/), [Timid](https://creativecommons.org/author/timidcreativecommons-org/) and [Kriti](https://creativecommons.org/author/kriticreativecommons-org/)
37+

0 commit comments

Comments
 (0)