From patchwork Thu Jul 22 21:35:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raxel Gutierrez X-Patchwork-Id: 1508895 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=NdxFqQ8M; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GW5P93HPJz9sWc for ; Fri, 23 Jul 2021 07:36:29 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GW5P926H0z30HN for ; Fri, 23 Jul 2021 07:36:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=NdxFqQ8M; dkim-atps=neutral X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=flex--raxel.bounces.google.com (client-ip=2607:f8b0:4864:20::749; helo=mail-qk1-x749.google.com; envelope-from=3zut5yaukcy08rev2x55x2v.t536ratyd5812z9a9.5g2rs9.58x@flex--raxel.bounces.google.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20161025 header.b=NdxFqQ8M; dkim-atps=neutral Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4GW5Nz1pnsz308y for ; Fri, 23 Jul 2021 07:36:18 +1000 (AEST) Received: by mail-qk1-x749.google.com with SMTP id h22-20020a05620a13f6b02903b94aaa0909so5083481qkl.15 for ; Thu, 22 Jul 2021 14:36:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=nlfP87VwvwAY3ZLKFda9/wONIoPmRytBvQvmGXk23Gk=; b=NdxFqQ8MNLUgSycg+vi9cofbFne2dGoU67RWsuDvQLY/kmyJqTw3Qq9yXMxZgOy3pg H6g2ezYMghrVrcFVZqdKNIZkp+OnoWT9hvCkzohxEcvP61tp8vF0T6Hw+ijUpjKA5Vs0 bpsq55kvHVsOTJAEIhTjCq9UDcw5ppSVtw9wKNJhVSixvk8n6r6Z5VReRBNeMbpe1jl0 cLLDvbL4DLy4sddsDw/GkUeN3R2y158rLeKL7j5JK8EvBn7BkXtMfUDCBp14WENZC7oI ISBtP34Ry1ywJ6im4nVrJVthAU62dyZU4kIpjpOecuG3SxEfkMzLOtTxb+N5Bt+0jZRH LnIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=nlfP87VwvwAY3ZLKFda9/wONIoPmRytBvQvmGXk23Gk=; b=kj8ThpPqhK4iTwWibhPKBQmlUZoujhkHsR+oot9t1i6Assb9L1xAU49trnAyW0hcqw xtPU6K994SrUYd73ipiahi93Tn9XOXqQBMkCUbY1FIdViZvtMyk/DHTOpq4KUDbmLeMP Cf1GymXhKjwaTPJaMeAqU/aiJy+W6wgjCTxDnZij/K1czYRs3yI5EkvxLf8njqM5wSTm Z7ZNvllHWGjh8Dp0H0feFaJHcm6OJ/9x9r2RnS+GRsMqPF4KoXP8js2PRzpwCNBq8AMH P5OuGwsfqtMRySUftTPS6ZUIVYYnbg7lQJ6A8s325yAR4iGtyumTRJTGmXogTHKmUUv0 u2nQ== X-Gm-Message-State: AOAM530zbfNTCCuAh5Yn3ARYvlvat8XLX6PK2gjV/66iGbqMI9TkNDyJ x4QBYde+EVwWeWVNRD3i0vD5d0fdwPYkuPxTkBD4UKsuuxjMgCZ+3qscv0DD0/B2gxtGbAYYUFQ XwqZfeYgy79n/uLA4aBd3VRQWnsaBq7V2WHYDIf7syuJjaslLqcxycubqpVLW7F5N X-Google-Smtp-Source: ABdhPJxWAb/Jn8XA4KB4gDtCjjVGiZR2CPmRstWQcNgG+3PEIC1cxISHMWmVu0wHI5dGsfmfsXEli5mbUg== X-Received: from raxel-pw.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2fda]) (user=raxel job=sendgmr) by 2002:a05:6214:7cf:: with SMTP id bb15mr1837314qvb.29.1626989774337; Thu, 22 Jul 2021 14:36:14 -0700 (PDT) Date: Thu, 22 Jul 2021 21:35:42 +0000 In-Reply-To: <20210722213543.2592044-1-raxel@google.com> Message-Id: <20210722213543.2592044-3-raxel@google.com> Mime-Version: 1.0 References: <20210722213543.2592044-1-raxel@google.com> X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog Subject: [RFC/PATCH 2/3] patch-detail: add label and button for comment addressed status From: Raxel Gutierrez To: patchwork@lists.ozlabs.org X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" Add new label to show the status of whether a comment is addressed and a button to change the status of the comment. Only users that can edit the patch (submitter, delegate, project maintainers) can change the status of a comment. Clean up submission.html to have hyphen delimited id and class selector names as well. Before [1] and after [2] images for reference. [1] https://imgur.com/NDfcPJy [2] https://imgur.com/kIhohED Signed-off-by: Raxel Gutierrez --- htdocs/css/style.css | 46 +++++- patchwork/templates/patchwork/submission.html | 146 +++++++++++------- patchwork/views/patch.py | 1 + 3 files changed, 134 insertions(+), 59 deletions(-) diff --git a/htdocs/css/style.css b/htdocs/css/style.css index 243caa0..ff34ff5 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -1,3 +1,9 @@ +:root { + --light-color: #F7F7F7; + --warning-color: #f0ad4e; + --success-color: #5cb85c; +} + h2 { font-size: 25px; margin: 18px 0 18px 0; @@ -192,7 +198,7 @@ table.patchmeta tr th, table.patchmeta tr td { vertical-align: top; } -.submissionlist ul { +.submission-list ul { list-style-type: none; padding: 0; margin: 0; @@ -277,12 +283,18 @@ table.patchmeta tr th, table.patchmeta tr td { color: #f7977a; } -.comment .meta { +.patch-message .meta { + display: flex; + align-items: center; background: #f0f0f0; padding: 0.3em 0.5em; } -.comment .content { +.patch-message .message-date { + margin-left: 8px; +} + +.patch-message .content { border: 0; } @@ -294,6 +306,34 @@ table.patchmeta tr th, table.patchmeta tr td { font-family: "DejaVu Sans Mono", fixed; } +#comment-status-bar { + display: flex; + flex-wrap: wrap; + align-items: center; +} + +#comment-status-label { + margin: 0px 8px; +} + +#comment-action-addressed, #comment-action-unaddressed { + background-color: var(--light-color); + border-radius: 4px; +} + +#comment-action-addressed { + border-color: var(--success-color); +} + +#comment-action-unaddressed { + border-color: var(--warning-color); +} + +#comment-action-addressed:hover, #comment-action-unaddressed:hover { + background-color: var(--success-color); + color: var(--light-color); +} + .quote { color: #007f00; } diff --git a/patchwork/templates/patchwork/submission.html b/patchwork/templates/patchwork/submission.html index 978559b..4109442 100644 --- a/patchwork/templates/patchwork/submission.html +++ b/patchwork/templates/patchwork/submission.html @@ -1,3 +1,4 @@ + {% extends "base.html" %} {% load humanize %} @@ -32,7 +33,7 @@ function toggle_div(link_id, headers_id, label_show, label_hide)

{{ submission.name }}

- +
{% if submission.list_archive_url %} @@ -61,12 +62,14 @@ function toggle_div(link_id, headers_id, label_show, label_hide) {% endif %} - {% if submission.series %} @@ -75,11 +78,12 @@ function toggle_div(link_id, headers_id, label_show, label_hide) {% endif %} @@ -277,14 +283,14 @@ function toggle_div(link_id, headers_id, label_show, label_hide) {% else %}

Message

{% endif %} -
-
- {{ submission.submitter|personify:project }} - {{ submission.date }} UTC -
-
-{{ submission|commentsyntax }}
-
+
+
+ {{ submission.submitter|personify:project }} + {{ submission.date }} UTC +
+
+  {{ submission|commentsyntax }}
+  
{% for item in comments %} @@ -293,15 +299,43 @@ function toggle_div(link_id, headers_id, label_show, label_hide) {% endif %} -
-
- {{ item.submitter|personify:project }} - {{ item.date }} UTC | #{{ forloop.counter }} -
-
-{{ item|commentsyntax }}
-
+
+
+ {{ item.submitter|personify:project }} + {{ item.date }} UTC | + #{{ forloop.counter }} + + {% if item.addressed %} +
+
+ + Addressed +
+ {% if editable %} + + {% endif %} +
+ {% else %} +
+
+ + Unaddressed +
+ {% if editable %} + + {% endif %} +
+ {% endif %} +
+
+  {{ item|commentsyntax }}
+  
{% endfor %} diff --git a/patchwork/views/patch.py b/patchwork/views/patch.py index 3e6874a..ac9cb44 100644 --- a/patchwork/views/patch.py +++ b/patchwork/views/patch.py @@ -128,6 +128,7 @@ def patch_detail(request, project_id, msgid): patch.check_set.all().select_related('user'), ) context['submission'] = patch + context['editable'] = editable context['patchform'] = form context['createbundleform'] = createbundleform context['project'] = patch.project
Message ID
Headersshow - + + +
{{ submission.series.name }} - | - expand -
Related - show - + {% endfor %} + {% if related_different_project %} + + + {% endif %} + +