From patchwork Wed Jul 28 18:17:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raxel Gutierrez X-Patchwork-Id: 1510948 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=2404:9400:2:0:216:3eff:fee1:b9f1; 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=fXMI4+YZ; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GZhj6276jz9sXN for ; Thu, 29 Jul 2021 04:17:46 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GZhj571CKz30HJ for ; Thu, 29 Jul 2021 04:17:45 +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=fXMI4+YZ; 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::f4a; helo=mail-qv1-xf4a.google.com; envelope-from=3n58byqukcyo5obszu22uzs.q203o7qva25yzw676.2dzop6.25u@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=fXMI4+YZ; dkim-atps=neutral Received: from mail-qv1-xf4a.google.com (mail-qv1-xf4a.google.com [IPv6:2607:f8b0:4864:20::f4a]) (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 4GZhhp3ml1z2yNB for ; Thu, 29 Jul 2021 04:17:30 +1000 (AEST) Received: by mail-qv1-xf4a.google.com with SMTP id j13-20020a0cf30d0000b029032dd803a7edso2466504qvl.2 for ; Wed, 28 Jul 2021 11:17:30 -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=3v/UUuRDq5rEHcYCF3mxRY2MTUcbkbz0tsG5Wy+XR7o=; b=fXMI4+YZ3tPQzkq4mGyl9aU/VzG7b5NupUIdKYZaS3UOFmyJ40ZdZGnlKEA0Tgwa3A ryzc8uUer0G5iuc4sUsBf3OuzmmC2d6YNjO0HdONJrr6Xdo9uydytJl4fjiZCVS7iRKI w+9Xbzv24fnD4xIST1XnmaJoySyxO5NU0jhuudvJl6B0MwAdJ8Lo0nFVnCRlmoT8zLJ3 n+IZceqpwiEbqEWA3MRrrfCGhHxPmYAaovgEqZu/Qv306jhJxlHjTckstppDuKxFZ6EH qqKtyW3HsnUr2eQ07XNcIQglzoFMHvhZOLyF4z9wtKoTXFSWTg6xgFkGzI16Cs2sEKAL slhg== 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=3v/UUuRDq5rEHcYCF3mxRY2MTUcbkbz0tsG5Wy+XR7o=; b=aVH3kG42FYAiphCHkkSDLjIdO5v8ZIi4DIwQOZRT80bgZy1Tp2pZxO55Aplfw4nsGU 5KYc6W39e0pSWhhqdHhBoUZjCbAfwIAYmOk53GAwCi2qoQXFx6klUj/zhSwTqdqGCIBF 7s3JJPPVAXnD3zuPfkrl08i3ugN1D4iK58nZlLDb+XdzaeCf3Ma0Hwjvqlm5GP3JVE8z xxTkPxGZh3kajckayEa3q3onYh5KY0Z2D1YvK1cVLviirNWG9PMe4xkHVO8A+Qg1MoXg Wfxa+ykFMTgMKZ23Es4mU1vqs3h1kXM08cmc1YILssr1qUA+OHVCXumBbqZd3/6hLOyP viZA== X-Gm-Message-State: AOAM531P51LJDvK5yZUzzE3eXTFPz9Xr9bnFsQdmqWPp9MBEYBq2xRxA 59M1qST4bStdud1gmmEvg+pzWPpomC9/j1exHoZX/NAx7o5EaQov/mj/clioQ+ISqmzFYXmD+c/ sxYV2ynpNz6UT/CFkbnCMeI8+EBoDGMHUeyMMw4GumrvpFS+rJgXm9MxDxKqNSfvu X-Google-Smtp-Source: ABdhPJzm0WBGXUDrFR+bfouS82n851pscBVoc4fEZVMRSh+hPHwFqP+jldSaaC5NppVpkA4F60XSPbseKQ== X-Received: from raxel-pw.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2fda]) (user=raxel job=sendgmr) by 2002:a05:6214:5018:: with SMTP id jo24mr1365899qvb.6.1627496247397; Wed, 28 Jul 2021 11:17:27 -0700 (PDT) Date: Wed, 28 Jul 2021 18:17:16 +0000 In-Reply-To: <20210728181718.3613124-1-raxel@google.com> Message-Id: <20210728181718.3613124-4-raxel@google.com> Mime-Version: 1.0 References: <20210728181718.3613124-1-raxel@google.com> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog Subject: [PATCH v2 3/5] 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 %} + +