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: Add admin interface app for global admin dashboard theming and styling #987

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

drikusroor
Copy link
Contributor

@drikusroor drikusroor commented May 1, 2024

This pull request adds a new "admin_interface" app that allows for theming and styling of the global admin dashboard.

For now, I've only added the css color variables that are used by Django and the custom css stylesheet. If we also want to set fonts, I can add it in a later PR.

Architecturally, the theme (AdminInterfaceThemeConfiguration) hangs under the admin interface configuration (AdminInterfaceConfiguration) with a one-to-one relation. I decided to do it like this so we could potentially add other kinds of configuration features to this admin interface configuration model if needed in the future. The theming part (colors, and possibly fonts in the future) will then be nicely separated from potential unrelated settings.

Resolves #894

Screenshots

Overview

image

Edit form

image

…oard theming and styling

(cherry picked from commit 387879fc5277fd5d9828c12f49e09e7825429ebd)
This commit adds the necessary URLs and views for the admin interface app. It includes a new `admin_interface/urls.py` file with a route for the `get_theme_stylesheet` view. Additionally, the `backend/aml/urls.py` file is modified to include the `admin_interface` URLs.

The purpose of this change is to enable theming and styling for the global admin dashboard.

Note: This commit message follows the established convention of starting with a verb in the imperative mood, followed by a brief description of the changes.
This commit modifies the `AdminInterfaceConfigurationAdmin` class in the `admin.py` file to include a theme overview column in the list display. The theme overview shows a visual representation of the colors assigned to the theme using HTML color blocks.

The purpose of this change is to provide a quick visual reference of the theme colors in the admin interface configuration list.

Note: This commit message follows the established convention of starting with a verb in the imperative mood, followed by a brief description of the changes.
… work with color inputs

The commit modifies the `AdminInterfaceThemeConfiguration` model in the `models.py` file. It updates the default color values for various elements such as primary, secondary, accent colors, body colors, header color, link colors, borders, error colors, message colors, darkened colors, selected colors, and button colors.

The purpose of this change is to ensure consistent and visually appealing theming for the admin interface.

Note: This commit message follows the established convention of starting with a verb in the imperative mood, followed by a brief description of the changes.
@drikusroor drikusroor self-assigned this May 1, 2024
@drikusroor drikusroor added the enhancement New feature or request label May 1, 2024
Copy link
Collaborator

@BeritJanssen BeritJanssen left a comment

Choose a reason for hiding this comment

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

I love that you managed to implement a fully customizable admin interface, and kudos to all the effort that went into this but ... I do think 500 lines of code added for functionality that may not really get used (i.e., who will really care enough about how the admin interface looks to set 30+ color variables?) is a bit overkill. It pains me, but I'd vote for a css file to style everything "AML style" and leave this branch for what it is.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is everything commented out here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Themed admin interface
2 participants