Skip to content

Add a project avatar to gitlab

Hannes Rosenögger requested to merge haynes/gitlab-ce:project_avatar into master

What does this MR do?

This MR adds the possibility to add an avatar to each project.

Possible Image states/Behaviour of the avatar upload

This MR introduces 3 possible states for a project avatar:

  1. The User uploaded an avatar
  • uploaded avatar is used
  1. The user didn't upload an avatar, but there is a logo.png file in the repository root
  • logo.png from repository is used
  1. The User didn't upload an avatar and there is no logo in the repository
  • autogenerated font icon is used everywhere except for the project settings page.

In the project settings page i decided to keep a placeholder image if no image has been uploaded.
Reason: The font icons look good when they are small, but depending on the color it can be plain ugly to have a big, pink font icon in the project settings.

Forking

When a project has an avatar and is being forked, the avatar will be copied to the fork as well.

Are there points in the code the reviewer needs to double check?

I'm not sure about the code, but this changes some styles and adds new UI elements. It needs review for mobile devices. So far the only issue i found is with the resolution 320x480. (see screenshot on imgur) If you open the projects sidebar with this resolution it will overflow. But this is already the case without this MR.

Why was this MR needed?

With this MR you could add the app-icon of a mobile app to the project to have a fast visible distinction between the projects.

What are the relevant issue numbers / Feature requests?

This MR finally fulfills http://feedback.gitlab.com/forums/176466-general/suggestions/5433454-add-uploadable-project-icons
and is based on the previous done work by Steven Thonus (https://github.com/gitlabhq/gitlabhq/pull/6422/)

Screenshots

To prevent cluttering this MR I've uploaded the Screenshots to imgur. http://imgur.com/a/6t4Zk/all

Merge request reports