• Dmitriy Zaporozhets's avatar
    Merge branch 'feature/custom_app_logo' into 'master' · c6810fd7
    Dmitriy Zaporozhets authored
    Custom header logo
    
    # What does this MR do?
    
    Adds enterprise feature that enables administrator to customize the small header logos in the header/navigation bar. There are 2 custom logos that must be uploaded - one for light themes and one for dark themes.
    
    Both a `dark` and `light` logo must be uploaded for the custom header logo. There are validations to prevent only one. Otherwise if a user chooses a light logo they might have a custom logo but another user with a dark theme would see the standard GitLab logo.
    
    # Are there points in the code the reviewer needs to double check?
    
    Look at the `appearances_helper.rb`, specifically the `brand_header_logos` method. I tried to keep all of the logic inside the appearances helper to avoid future merge conflicts in the view. Is there a better way to do this other than inline styles?
    
    See code comment in `appearances_helper.rb` for another question.
    
    # Why was this MR needed?
    
    Enterprise users like the ability to brand GitLab to their organization. The appearances support was a great first step. This builds upon that by allowing users to upload logos for the header.
    
    # Screenshots
    
    Appearances admin page showing what the page looks like after custom logos have been uploaded. I added the basic and dark backgrounds to the respective logos so they appeared closer to how they will in the header.
    
    ![appearances_admin](https://gitlab.com/uploads/subscribers/gitlab-ee/c7e0338be2/appearances_admin.png)
    
    With a dark theme selected.
    
    ![dark_logo](https://gitlab.com/uploads/subscribers/gitlab-ee/31faaf70f6/dark_logo.png)
    
    With a light theme selected.
    
    ![light_logo](https://gitlab.com/uploads/subscribers/gitlab-ee/46b4942df8/light_logo.png)
    
    See merge request !26
    c6810fd7
schema.rb 21.6 KB