From 0da30213d42e8ec5067eb598cd0ebffc0cae74a1 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 31 Oct 2024 22:03:28 +0000 Subject: [PATCH 1/9] docker: Update tag This will need to be part of our release procedure going forward. Signed-off-by: Stephen Finucane --- tools/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 0a55b54d..1136d8e4 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/getpatchwork/pyenv:latest +FROM ghcr.io/getpatchwork/pyenv:stable-3.2 ARG UID=1000 ARG GID=1000 From b35f6e3a792d096fc35c8c4168110426581685aa Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Fri, 16 Aug 2024 09:20:28 +0200 Subject: [PATCH 2/9] templates/submission: Fix alignment of commit message Preformatted content must not be indented because any space is kept in the output, making the content wrongly indented. When aligning message headers to the left, the new HTML code has been indented including some preformatted content indented with two spaces. The fix is to remove the indent of the content. Signed-off-by: Thomas Monjalon Fixes: fe34ab2ffad3 ("patch-detail: left align message headers") Reviewed-by: Robin Jarry Reviewed-by: Stephen Finucane (cherry picked from commit 13bbc0d94ea035c149f8acd042d2998778b9efd9) --- patchwork/templates/patchwork/submission.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html index 85e7be4b..e924934f 100644 --- a/patchwork/templates/patchwork/submission.html +++ b/patchwork/templates/patchwork/submission.html @@ -262,7 +262,7 @@

Message

{{ submission.date }} UTC
-  {{ submission|commentsyntax }}
+{{ submission|commentsyntax }}
   
From 1455a92363500c0128eacc75785eb4aea5fd0015 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 31 Oct 2024 22:14:38 +0000 Subject: [PATCH 3/9] Release 3.2.1 Signed-off-by: Stephen Finucane --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index 944880fa..e4604e3a 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.0 +3.2.1 From b2374a0620f32ecd2e7c175a9c347c674ae03cc6 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 31 Oct 2024 22:15:18 +0000 Subject: [PATCH 4/9] Post-release version bump Signed-off-by: Stephen Finucane --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index e4604e3a..c6779f4b 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.1 +3.2.2.alpha.0 From 3e924483395c260aae8ece1873a31f7266ce0ef2 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 31 Oct 2024 22:58:34 +0000 Subject: [PATCH 5/9] Fix version.txt Fixes: b2374a06 ("Post-release version bump") Signed-off-by: Stephen Finucane --- version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.txt b/version.txt index c6779f4b..4f840312 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.2.alpha.0 +3.2.2.a.0 From 95682fd3de5b46cc05e1d5de2377571278dd62ab Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 31 Oct 2024 22:18:20 +0000 Subject: [PATCH 6/9] CI: Cancel builds upon a new push Signed-off-by: Stephen Finucane (cherry picked from commit 09939ba107bde85e0b9df35c0dbbf90428789a94) --- .github/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5fb784df..98a9583a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,9 @@ name: CI on: - push - pull_request +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: lint: name: Run linters From 5c4b660ecefcbc349b6279ed7b987ae7ed3d5fc5 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 31 Oct 2024 22:59:18 +0000 Subject: [PATCH 7/9] tests: Dump more info if version test fails Signed-off-by: Stephen Finucane (cherry picked from commit fa14cf8480d9e515ed7a769adbd9eab33c6d82d9) --- patchwork/tests/test_version.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/patchwork/tests/test_version.py b/patchwork/tests/test_version.py index 8e512084..9cbb1305 100644 --- a/patchwork/tests/test_version.py +++ b/patchwork/tests/test_version.py @@ -32,4 +32,9 @@ def test_validate_version(self): # if the tag is missing from one, it should be missing from the other # (and vice versa) - self.assertEqual(bool(str_match.group(1)), bool(git_match.group(1))) + self.assertEqual( + bool(str_match.group(1)), + bool(git_match.group(1)), + f'mismatch between git and version.txt post-release metadata: ' + f'git={git_match.group(1)!r}, version.txt={str_match.group(1)!r}', + ) From 794bdb9863dcb802f1d384da8ecc46f8783c219d Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 5 Oct 2022 16:24:05 +0200 Subject: [PATCH 8/9] css: make diff colors more accessible The colors used to display patch diffs are confusing. The context color is very similar to the added line color and the contrast between added and removed lines is very low. Originally, the choice of purple/blue (instead of the more common red/green palette) may have been made with colorblindness accessibility in mind. However, after inspecting the current colors with colorblindness "simulators", I found that the low contrast was consistent no matter what vision deficiency (if any) you might have. Update the colors to use a more common red/green palette. Add background colors to increase contrast for colorblind people. Use less confusing colors for context and diff hunks. Use normal line height to prevent background colors from overlapping. Use a different color for email quotes (blue) to avoid confusion with added lines. I have made a compilation of the current and updated color palette previews for normal vision and all common color deficiencies. I also included the same diff as seen from Github interface for reference. Link: http://files.diabeteman.com/patchwork-diff-colors/ Signed-off-by: Robin Jarry (cherry picked from commit c443cd9c0e96ca21842a188f9101b1a8244535ee) --- htdocs/css/style.css | 16 ++++++++-------- ...-colors-more-accessible-82eda58a89984d46.yaml | 5 +++++ 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/make-diff-colors-more-accessible-82eda58a89984d46.yaml diff --git a/htdocs/css/style.css b/htdocs/css/style.css index 9156aa6e..1a739510 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -17,7 +17,7 @@ h2 a, h2 span { } pre { - line-height: 110%; + line-height: normal; background-color: white; border-radius: 0; } @@ -354,15 +354,15 @@ button[class^=comment-action] { } .quote { - color: #007f00; + color: #365cb5; } -span.p_header { color: #2e8b57; font-weight: bold; } -span.p_chunk { color: #a52a2a; font-weight: bold; } -span.p_context { color: #a020f0; } -span.p_add { color: #008b8b; } -span.p_del { color: #6a5acd; } -span.p_mod { color: #0000ff; } +span.p_header { font-weight: bold; } +span.p_chunk { color: #329fb0; font-weight: bold; } +span.p_context { } +span.p_add { color: #1b9d09; background-color: #edffed; } +span.p_del { color: #c80101; background-color: #ffe2e2; } +span.p_mod { color: #a020f0; } .acked-by { color: #2d4566; diff --git a/releasenotes/notes/make-diff-colors-more-accessible-82eda58a89984d46.yaml b/releasenotes/notes/make-diff-colors-more-accessible-82eda58a89984d46.yaml new file mode 100644 index 00000000..f65995e5 --- /dev/null +++ b/releasenotes/notes/make-diff-colors-more-accessible-82eda58a89984d46.yaml @@ -0,0 +1,5 @@ +--- +other: + - | + The patch diff color palette was modified to make it more accessible for + all users, including those with common color deficiencies. From 5b5fef54af62a900fd971d0df1bbbf34d52fd4e7 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 1 Nov 2024 15:45:03 +0000 Subject: [PATCH 9/9] views: Switch logout to POST This was deprecated in 4.1 and removed in 5.0. I missed it. [1] https://docs.djangoproject.com/en/5.0/releases/4.1/#features-deprecated-in-4-1 Signed-off-by: Stephen Finucane (cherry picked from commit 45f47e96c6c90aefac37b02e0e15052f6ba41a90) --- htdocs/css/style.css | 28 ++++++++++++++++++++++++++++ templates/base.html | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/htdocs/css/style.css b/htdocs/css/style.css index 1a739510..c4025c05 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -56,6 +56,34 @@ pre { color: #999; } +ul.dropdown-menu > li > form { + display: block; + width: 100%; +} + +ul.dropdown-menu > li > form > button { + /* taken from bootstrap's styling for '.dropdown-menu > li > a' */ + background: none; + border: none; + cursor: pointer; + display: block; + padding: 3px 20px; + clear: both; + font-weight: 400; + line-height: 1.42857143; + color: #333; + white-space: nowrap; + width: 100%; + text-align: left; +} + +ul.dropdown-menu > li > form > button:hover { + /* taken from bootstrap's styling for '.dropdown-menu > li > a:hover' */ + color: #262626; + text-decoration: none; + background-color: #f5f5f5; +} + form { padding: 0em; margin: 0em; diff --git a/templates/base.html b/templates/base.html index 747da592..9519ecc5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -93,7 +93,12 @@
  • Administration
  • {% endif %}
  • View profile
  • -
  • Logout
  • +
  • +
    + {% csrf_token %} + +
    +
  • {% else %}