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

Merged
merged 11 commits into from
Jun 4, 2024

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

@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.

@drikusroor drikusroor force-pushed the feat/custom-admin-interface branch from 762f3ea to 507b53e Compare May 31, 2024 07:59
@drikusroor
Copy link
Contributor Author

Should I merge this?

@drikusroor drikusroor force-pushed the feat/custom-admin-interface branch 2 times, most recently from ffb7ea0 to 9a562e7 Compare June 3, 2024 09:49
drikusroor added 10 commits June 4, 2024 13:44
…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.
The commit removes the unused code for appending color behind input in the `admin_interface_configuration.js` file. This code was commented out and not being used in the application.
@drikusroor drikusroor force-pushed the feat/custom-admin-interface branch from 9a562e7 to 248a4a7 Compare June 4, 2024 11:44
The commit removes the unused `admin_custom.css` file from the `admin_interface/css` directory. This file was no longer being used in the application.
@drikusroor drikusroor merged commit 42df321 into develop Jun 4, 2024
10 checks passed
@drikusroor drikusroor deleted the feat/custom-admin-interface branch June 4, 2024 12:14
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