django-admin-interface icon indicating copy to clipboard operation
django-admin-interface copied to clipboard

feat: Allow changing foreground/background colors

Open Shriukan33 opened this issue 1 year ago • 19 comments


name: Pull request about: Submit a pull request for this project assignees: fabiocaccamo


Describe your changes I added 4 customization options to Themes :

  • Body background color
  • Foreground color
  • Quiet color
  • Loud color

And extended French translation for the newly added fields. I couldn't find places where loud color was used, but it felt awkward to add the option for the quiet color without the loud color.

Related issue #291

Checklist before requesting a review

  • [x] I have performed a self-review of my code.
  • [NA] I have added tests for the proposed changes.
  • [x] I have run the tests and there are no errors.

Shriukan33 avatar Jan 09 '24 11:01 Shriukan33

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e895a05) 97.35% compared to head (d03f7e9) 97.44%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
+ Coverage   97.35%   97.44%   +0.08%     
==========================================
  Files          38       40       +2     
  Lines         416      430      +14     
==========================================
+ Hits          405      419      +14     
  Misses         11       11              
Flag Coverage Δ
unittests 97.44% <100.00%> (+0.08%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 09 '24 11:01 codecov[bot]

Not sure why the linting fails, it seems to be related to the French translation I added, but the error isn't very clear about what's wrong...

EDIT: I compiled the new .po to .mo with msgfmt django.po -o django.mo and added it to PR

BMourguesFieldbox avatar Jan 09 '24 11:01 BMourguesFieldbox

The linting keeps failing, maybe I should drop the translation commit?

It's my first time updating locale, maybe I'm doing this wrong @fabiocaccamo ?

BMourguesFieldbox avatar Jan 09 '24 14:01 BMourguesFieldbox

@Shriukan33 thanks for this PR, I will review it as soon as possible!

fabiocaccamo avatar Jan 09 '24 14:01 fabiocaccamo

@BMourguesFieldbox have you followed these steps? https://github.com/fabiocaccamo/django-admin-interface#translate-into-another-language

fabiocaccamo avatar Jan 09 '24 14:01 fabiocaccamo

This PR would probably fix #291.

fabiocaccamo avatar Jan 09 '24 14:01 fabiocaccamo

@BMourguesFieldbox have you followed these steps? https://github.com/fabiocaccamo/django-admin-interface#translate-into-another-language

Sorry I missed it, I've gone through the proper commands and repushed ! :)

BMourguesFieldbox avatar Jan 09 '24 14:01 BMourguesFieldbox

@fabiocaccamo Just a reminder if you have some time to pull the trigger on the CI :)

BMourguesFieldbox avatar Jan 12 '24 13:01 BMourguesFieldbox

Hey, just a heads up for this PR :)

Shriukan33 avatar Jan 23 '24 09:01 Shriukan33

@Shriukan33 sorry for the delay in doing the review, but I'm quite busy these days and I'm not able to find the time. I will do it as soon as possible, this has highest-priority in my open-source todo list.

fabiocaccamo avatar Jan 23 '24 09:01 fabiocaccamo

@Shriukan33 sorry for the delay in doing the review, but I'm quite busy these days and I'm not able to find the time. I will do it as soon as possible, this has highest-priority in my open-source todo list.

No problem, I understand ! Life gets in the way sometimes, good luck in whatever keeps you busy :)

BMourguesFieldbox avatar Jan 23 '24 09:01 BMourguesFieldbox

@fabiocaccamo Is there something blocking this from being merged? Would be awesome if we could get this in there. This project has everything I'm looking for except this feature.

selected-pixel-jameson avatar Apr 02 '24 11:04 selected-pixel-jameson

@selected-pixel-jameson I haven't had time to review and test this PR yet.

fabiocaccamo avatar Apr 02 '24 12:04 fabiocaccamo

@fabiocaccamo Is there something blocking this from being merged? Would be awesome if we could get this in there. This project has everything I'm looking for except this feature.

In the meantime, you could use my fork as source in your requirements like so :

django==5.*
git+https://github.com/Shriukan33/django-admin-interface.git@Allow-changing-background-color

Note that you need to have git installed on the image if you're using docker.

BMourguesFieldbox avatar Apr 02 '24 12:04 BMourguesFieldbox

@BMourguesFieldbox I'll take a look, but I'm kind of having concerns even moving forward with this solution as it sounds like the maintainer is potentially running into time constraint issues, which is understandable, I just don't want to implement a solution that in the end is going to run into maintenance issues.

selected-pixel-jameson avatar Apr 02 '24 12:04 selected-pixel-jameson

@BMourguesFieldbox @Shriukan33 @selected-pixel-jameson I'll try to review this as soon as possible!

fabiocaccamo avatar Apr 02 '24 12:04 fabiocaccamo

@BMourguesFieldbox I'll take a look, but I'm kind of having concerns even moving forward with this solution as it sounds like the maintainer is potentially running into time constraint issues, which is understandable, I just don't want to implement a solution that in the end is going to run into maintenance issues.

Understandable, this lib doesn't do much aside from offering a way to edit the admin templates, so it doesn't really relate to app's features, I'd say it's quite low risk (unless you have lots of features in the admin)

@BMourguesFieldbox @Shriukan33 @selected-pixel-jameson I'll try to review this as soon as possible!

Thanks ! :D

BMourguesFieldbox avatar Apr 02 '24 13:04 BMourguesFieldbox

Hey, just a heads up I rebased on current main, as it had like 50 new commits behind :)

BMourguesFieldbox avatar Jul 05 '24 15:07 BMourguesFieldbox