#479 Avatar handling
Merged by abompard. Opened by ryanlerch.
ryanlerch/fedora-hubs avatar-and-stars  into  develop

Download 479.patch

Primarily, this PR fixes the avatar handling of groups:

  • fix the model to no longer use placekitten as a default avatar for every group hub, instead make it empty.
  • change populate.py to set a placekitten for the i18n group, and leave the rest blank
  • abstracts out the monogram generation code in the python to a filter that we can use in the templates
  • make the myhubs widget use this new abstracted code, and show avatars if the url is set, the monogram if it is not set
  • re-create the monogram generation code in javascript for use in the react stuff
  • add the avatar to the group hubs page (had to move the location of the star a bit)
  • add the star to the user hub page

fixes #476 #470

rebased onto 2c317a880f392693d1d4ee64cd76d526c9692ac6

Please also register it in hubs/app.py (around line 25) so non-widget Flask templates can use it too.

I SEE DEAD SPACES...

Leftover console.log() call here.

4 new commits added

  • make hub avatars show in search if they are set
  • add avatar to group hubs, add star to user hubs
  • make myhubs widget use either the avatar URL or the monogram
  • remove placekittin from model, update populate.py

4 new commits added

  • make hub avatars show in search if they are set
  • add avatar to group hubs, add star to user hubs
  • make myhubs widget use either the avatar URL or the monogram
  • remove placekittin from model, update populate.py

slowly getting better at interactive rebases, but i got-er-done.

registered the filter in the app,py,

removed the extra spaces and console.log in the utils.js

Thanks! Does it make sense to show the star for a user's own hub? What about hubs where they're already a member or an owner?

i'm thinking we might keep it for if you are a member / owner -- i think the way mo wants it to work is that stars are at the top of the bookmarks, super-special ones.

def remove starring yourself, as it is always at the top of the bookmarks anyways.

either way, i am working on another PR right now to actually get the stars working, do you mind if i add the logic to remove it for a own user hub in that PR?

Sure! :-)

Pull-Request has been merged by abompard

Metadata