#441 Rewrite the Library widget
Merged by abompard. Opened by abompard.
abompard/fedora-hubs feature/library-rework  into  develop

Download 441.patch

Rewrite the Library widget to implement the mockup in issue #433.

XXX?

Looks good to me :thumbsup:

Hey I tried this out but couldn't get a fedora wiki link to work when adding to library - i get this -

15:29:55 web.1 | File "/usr/lib/python2.7/site-packages/requests/models.py", line 355, in prepare_url
15:29:55 web.1 | raise MissingSchema(error)
15:29:55 web.1 | MissingSchema: Invalid URL 'fedoraproject.org/wiki/Design': No schema supplied. Perhaps you meant http://fedoraproject.org/wiki/Design?

The UI gives some spew about schema as well:

TypeError: find() got multiple values for keyword argument 'name' // Werkzeug Debugger <script src="?__debugger__=yes&cmd=resource&f=jquery.js"></script> <script src="?__debugger__=yes&cmd=resource&f=debugger.js"></script> <script type="text/javascript"> var TRACEBACK = 140068757756176, CONSOLE_MODE = false, EVALEX = true, EVALEX_TRUSTED = false, SECRET = "OHzrwdHYr01DDcdK97qU"; </script>

TypeError

TypeError: find() got multiple values for keyword argument 'name'

Traceback (most recent call last)

  • File "/usr/lib/python2.7/site-packages/flask/app.py", line 2000, in __call__

     error = None
     ctx.auto_pop(error)
     
     def __call__(self, environ, start_response):
     """Shortcut for :attr:`wsgi_app`."""
     return self.wsgi_app(environ, start_response)
     
     def __repr__(self):
     return '<%s %r>' % (
    The URLs I tried to add and got this error for are: http://fedoraproject.org/wiki/Design http://pagure.io/design http://sparkleshare.org I also tried with https.

Just an idea - can file this as an issue if useful - we should have a default 'no thumbnail' image to use for sites that don't have one. I encountered this when trying to add my blog to my hub -

http://blog.linuxgrrl.com/

I have an image you can use for this, PR comments dont seem to allow for attaching images so i'll attach to #433

@sayanchowdhury Ah, the XXX is there because I meant to add documentation but forgot ;-)

@duffy good catch with the error, I'll fix it. I'll also add the placeholder image, thanks.

Actually @duffy, your blog metadata says it has an image, but it points to https://s0.wp.com/i/blank.jpg which, as the name says, is blank.

I'll add the placeholder anyway for the URLs that don't set a metadata image, but I'm not sure I can do much for blank images (except allowing uploads but that's probably not for the MVP).

Also, @duffy could you make a higher resolution of the placeholder image? Something around 170px would look better in the "link edit" modal.

rebased onto 6fbdf05f518600217071c93690eca8f1f1229241

rebased onto dfbe155f51f2118c9624cb7e4aaf9cfe8ff859d4

ping @duffy :-)

rebased onto f7d1f7da04ee9f3cfb64974943d79bb8869eeeb9

OK, fixed!

Since this PR has already been reviewed I'll just merge it.

rebased onto 66e703374c2aa3f687864ec548b019735a2bfc04

Pull-Request has been merged by abompard

Metadata