Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to customize logo and title #9052

Merged
merged 12 commits into from
Feb 14, 2025
Merged

Added ability to customize logo and title #9052

merged 12 commits into from
Feb 14, 2025

Conversation

klakhov
Copy link
Contributor

@klakhov klakhov commented Feb 5, 2025

Motivation and context

This simple PR moves logo management to /about server endpoint. It would make easier to change it if needed by replacing logo.svg asset on the server. Additinally, there is a possibility to edit subtitle using settings

CVAT logo is 64x32px in svg format. It is reccomended to use the same format and proportions.
Customization process is the following: update logo.svg asset in cvat/apps/engine/static (if the logo has different name, update LOGO_FILENAME in settings/base.py), update subtitle in ABOUT_INFO to change text on the sign-in/sign-up pages.

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • [ ] I have updated the documentation accordingly
  • [ ] I have added tests to cover my changes
  • [ ] I have linked related issues (see GitHub docs)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

Attention: Patch coverage is 80.95238% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.98%. Comparing base (df5678a) to head (80553a1).
Report is 7 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #9052      +/-   ##
===========================================
+ Coverage    73.91%   73.98%   +0.06%     
===========================================
  Files          428      429       +1     
  Lines        44530    44601      +71     
  Branches      3881     3890       +9     
===========================================
+ Hits         32916    32998      +82     
+ Misses       11614    11603      -11     
Components Coverage Δ
cvat-ui 77.55% <77.77%> (+0.10%) ⬆️
cvat-server 71.03% <100.00%> (+0.02%) ⬆️

@klakhov klakhov requested a review from nmanovic as a code owner February 5, 2025 11:18
Copy link
Member

@bsekachev bsekachev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this implementation it is still not customizable, as was requested by the customer, as icon is a part of docker image

@SpecLad
Copy link
Contributor

SpecLad commented Feb 7, 2025

In this implementation it is still not customizable, as was requested by the customer, as icon is a part of docker image

That seems normal to me - where else would it be? I'm assuming that the customization process will involve mounting an alternate icon file into the container.

Did you have something else in mind?

@klakhov
Copy link
Contributor Author

klakhov commented Feb 11, 2025

From my perspective, the logo customization process should be straightforward: place the new file in correct folder and configure a setting for its name if necessary. The same goes for text info in /about.
I dont think we want implement something like uploading new logo from UI

.cvat-signing-header {
background: transparent;
position: fixed;
padding: $grid-unit-size * 2 0 0 0;
width: 100%;

.cvat-logo-icon {
fill: white;
filter: brightness(0) invert(1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it makes any logo on sign-in page white, however what if a color logo provided?
This approach will break such logo.

@klakhov klakhov merged commit ac8c5a4 into develop Feb 14, 2025
34 checks passed
@klakhov klakhov deleted the kl/setup-logo branch February 14, 2025 11:19
@cvat-bot cvat-bot bot mentioned this pull request Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants