Maven Central Repository spice #104

Merged
merged 3 commits into from Aug 20, 2013

Projects

None yet

4 participants

@nicoulaj

Here is a simple spice that searches Java libraries in Maven central repository.

@nicoulaj nicoulaj commented on the diff Oct 28, 2012
lib/DDG/Spice/Maven.pm
@@ -0,0 +1,20 @@
+package DDG::Spice::Maven;
+# ABSTRACT: Search library in Maven Central Repository.
+
+use DDG::Spice;
+
+attribution github => ['https://github.com/nicoulaj', 'nicoulaj'],
+ twitter => ['http://twitter.com/nicoulaj', 'nicoulaj'];
+
+triggers startend => "maven", "mvn";
+
+spice to => 'http://search.maven.org/solrsearch/select?q=$1&rows=5&wt=json&callback={{callback}}';
@nicoulaj
nicoulaj Oct 28, 2012

The query is limited to 5 results, I don't really know what the policy is.

@jagtalon jagtalon was assigned Nov 2, 2012
@jagtalon
DuckDuckGo member

Hi, @nicoulaj. Thanks for submitting a plugin! I'm still testing and it looks great! I have a question though: Why is spice is_unsafe set to 1? Are there queries that contain adult material?

@jagtalon
DuckDuckGo member

@nicoulaj a few UI fixes, if you don't mind.

  • A fixed-width table for short and long text. It would also be best to add a function to limit the text.
  • The style should go to spice.css instead of a style attribute. This way, you would be able to separate the design from the actual logic.
  • It would be better if <th> tags were set to font-style: italic instead of font-weight: bold.

I think that's it. Thanks again for contributing!

@nicoulaj

Thanks for your feedback !

I pushed some commits, hopefully this addresses the issues you mentioned.

(I misunderstood the sense of is_unsafe when looking at other spices, I thought it was related to wrap_jsonp_callback)

@jagtalon
DuckDuckGo member

@nicoulaj Hi there! Thanks for the changes. It seems that artifactId and version can be exceedingly long sometimes:

But other than that, it looks great!

@moollaza
DuckDuckGo member

@jagtalon @nicoulaj we have so much empty space, why not make the table the full width of the spice div?

That way we can get each result on one line and if necessary clip the text when its too long. Percentage widths might be the best way to do it so it scales. Keep in mind how this might look on a mobile screen.

@jagtalon
DuckDuckGo member

@moollaza Your right about that one. Thanks for the extra comments!

@moollaza
DuckDuckGo member

@nicoulaj sorry for the delay. We've been very busy lately, specifically with updating and releasing Spice v2. We have made significant changes to the way the frontend of Spice plugins work.

If you're still willing to work on this plugin, I would ask that you convert it to the new Spice format and then we can merge it in and release it live.

I think the original layout of this plugin is best. Would also probably be best if this plugin mimicked the layout and design of the recent LeakDB to maintain design consistency.

@majuscule
DuckDuckGo member

Hi guys,

I went ahead and ported this to spice2 since it looked simple. I think it looks good with the new table design as you suggested @moollaza.

I've temporarily deployed to dylan.duckduckgo.com for everyone to check out. Is there a reason the test cases were originally marked unsafe? I can't see this being an adult plugin.

If no one has any issues (please let me know if you see any issues :-)) let's get this live!

@majuscule
DuckDuckGo member
@nicoulaj

@nospampleasemam Thanks !

Any chance to see this branch merged ?

@majuscule majuscule merged commit 83d4d97 into duckduckgo:master Aug 20, 2013
@majuscule
DuckDuckGo member

Merged! Sorry for the delay, I just wanted to see if anyone else had any comments. It will be live within the week.

Thanks again for writing and submitting this spice. I hope we see another pull request from you in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment