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

fix: Add more RTL improvements #526

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 8 additions & 30 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,14 @@ name: Lint
on: [push]

jobs:
flake8:
name: flake8
ruff:
name: ruff
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install flake8
run: pip install --upgrade flake8
- name: Run flake8
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: flake8
run: flake8
- uses: actions/checkout@v4

- run: python -Im pip install --user ruff

- name: Run ruff on djangocms-admin-style
run: ruff check --output-format=github djangocms_admin_style

isort:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- run: python -m pip install isort
- name: isort
uses: liskin/gh-problem-matcher-wrap@v1
with:
linters: isort
run: isort --check --diff djangocms_admin_style
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11']
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
requirements-file: [
django-2.2.txt,
django-3.2.txt,
django-4.2.txt,
django-5.0.txt,
Expand All @@ -19,8 +18,6 @@ jobs:
ubuntu-20.04,
]
exclude:
- requirements-file: django-5.0.txt
python-version: 3.8
- requirements-file: django-5.0.txt
python-version: 3.9

Expand All @@ -37,7 +34,7 @@ jobs:
python setup.py install

- name: Run coverage
run: coverage run setup.py test
run: coverage run ./test_settings.py

- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v1
47 changes: 29 additions & 18 deletions djangocms_admin_style/sass/components/_base.scss
Copy link
Contributor

Choose a reason for hiding this comment

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

The icon for messagelist is hovering over the text

image

Copy link
Contributor

Choose a reason for hiding this comment

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

border-radius on lines 131 and 136
padding-left on line 201.
padding on line 329.

Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@
body {
background-color: $gray-lightest;
h1 {
margin-left: 0 !important;
margin-inline-start: 0 !important;
}
.module {
h2 {
padding-left: 0;
padding-inline-start: 0;
}
p {
padding-left: 0;
padding-right: 0;
margin-left: 0 !important;
padding-inline: 0;
margin-inline-start: 0 !important;
}
table {
margin-bottom: 20px !important;
margin-block-end: 20px !important;
}
}
.skip-to-content-link {
display: none; // hide skip to main content link in newer django admin versions
}
}


Expand Down Expand Up @@ -74,7 +76,7 @@ h6 {

ul,
ol {
margin-left: 20px;
margin-inline-start: 20px;
}

// buttons and links
Expand All @@ -84,20 +86,26 @@ a.btn {

.button.default, input[type=submit].default, .submit-row input.default {
float: right;
[dir="rtl"] & {
float: left;
}
}

.submit-row {
display: block;
text-align: right;
text-align: end;
input {
display: inline-block;
}
.deletelink-box, .deletelink {
display: inline-block;
float: left;
[dir="rtl"] & {
float: right;
}
}
a.deletelink {
margin-left: 10px;
margin-inline-start: 10px;
display: inline-block;
}
.btn {
Expand All @@ -108,10 +116,11 @@ a.btn {
vertical-align: top;
align-items: center;
& + .btn {
margin-left: 10px;
margin-inline-start: 10px;
}
}
}

.cms-btn-group {
@include button-variant($btn-default-color, $btn-default-bgcolor, $btn-default-border, true);
display: inline-block;
Expand All @@ -126,7 +135,7 @@ a.btn {
}
// last-child stands for advanced button
&:last-child {
margin-left: -4px;
margin-inline-start: -4px;
border-radius: 0 3px 3px 0 !important;
}
}
Expand Down Expand Up @@ -159,15 +168,18 @@ a:link {
// make sure that cancel link has correct height #261
a.button.cancel-link {
float: right;
[dir="rtl"] & {
float: left;
}
font-family: $base-font-family;
display: inline-block;
line-height: 34px !important;
height: 34px !important;
margin-left: 10px;
margin-right: 10px;
margin-inline: 10px;
margin-top: 0;
padding: 0 20px !important
}

// resets general list styles for object-tool list elements
.colM ul:not(.object-tools):not(.messagelist) {
margin: 20px 0 25px;
Expand All @@ -193,10 +205,9 @@ a.button.cancel-link {
}
// 3rd level list
ul {
margin-left: 20px;
margin-inline-start: 20px;
li {
padding-left: 0;
padding-right: 0;
padding-inline: 0;
}
}
}
Expand All @@ -209,7 +220,7 @@ p,
color: $gray !important;
font-weight: normal;
margin-bottom: 10px;
padding-left: 0;
padding-inline-start: 0;
}
.datetimeshortcuts {
font-size: $font-size-small !important;
Expand Down Expand Up @@ -324,7 +335,7 @@ ul.messagelist {
border-bottom: 0;
&:before {
position: absolute;
left: 10px;
inset-inline-start: 10px;
font-size: 18px !important;
margin-right: 20px !important;
}
Expand Down
Loading
Loading