#312 Improve the widget-loading system and fix some HTML/CSS problems
Merged by abompard. Opened by abompard.
abompard/fedora-hubs js-widget-loading  into  develop

Download 312.patch

Please look at each commit one after the other, it will make more sense :-)

Loading http://localhost:5000/jcline/stream/ got me

Traceback (most recent call last):
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1994, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/vagrant/devel/hubs/views/utils.py", line 60, in decorated_function
    return function(*args, **kwargs)
  File "/home/vagrant/devel/hubs/views/user.py", line 27, in stream
    actions=actions
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/templating.py", line 134, in render_template
    context, ctx.app)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/templating.py", line 116, in _render
    rv = template.render(context)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/devel/hubs/templates/stream.html", line 1, in top-level template code
    {% extends "master.html" %}
  File "/home/vagrant/devel/hubs/templates/master.html", line 56, in top-level template code
    {% block content %}{% endblock %}
  File "/home/vagrant/devel/hubs/templates/stream.html", line 53, in block "content"
    {% include "includes/right_widgets.html" %}
  File "/home/vagrant/devel/hubs/templates/includes/right_widgets.html", line 4, in top-level template code
    data-url="{{ url_for(widget.plugin+'_root', hub=hub.name, idx=widget.idx) }}"
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/helpers.py", line 333, in url_for
    return appctx.app.handle_url_build_error(error, endpoint, values)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/app.py", line 1805, in handle_url_build_error
    reraise(exc_type, exc_value, tb)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/flask/helpers.py", line 323, in url_for
    force_external=external)
  File "/home/vagrant/.virtualenvs/hubs/lib/python2.7/site-packages/werkzeug/routing.py", line 1758, in build
    raise BuildError(endpoint, values, method, self)
BuildError: Could not build url for endpoint u'contact_root' with values ['hub', 'idx']. Did you mean 'increment_counter' instead?

Ah yeah, my mistake, that's a part that leaked from my other branch. I've fixed it.

rebased

Did you intend it to make the stream stretch out like this?

It looks like a div class="container" was removed in 37a6eec05064b1e7575b5044af7438f2fedc6d5d, I'm just not sure if you meant to or not. The commit message makes me think not.

Yes, the rest of the pages use the whole page width, only the stream was using a fixed with. It's going to be tighter later anyway because I plan on bringing the left menu that the main hubs page has to the stream page too..

Oh okay, I just wanted to make sure this wasn't accidental.

Merge away!

Pull-Request has been merged by abompard

Metadata