From patchwork Wed Jul 28 18:17:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Raxel Gutierrez X-Patchwork-Id: 1510946 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=bnNxKOyB; 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 4GZhhw2lKqz9sX3 for ; Thu, 29 Jul 2021 04:17:36 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GZhhw1S6kz3bZ1 for ; Thu, 29 Jul 2021 04:17:36 +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=bnNxKOyB; 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::b49; helo=mail-yb1-xb49.google.com; envelope-from=3m58byqukcyy1k7ovqyyqvo.mywzk3mr6y1uvs232.y9vkl2.y1q@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=bnNxKOyB; dkim-atps=neutral Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) (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 4GZhhm6s7Sz303M for ; Thu, 29 Jul 2021 04:17:26 +1000 (AEST) Received: by mail-yb1-xb49.google.com with SMTP id r1-20020a0569021541b029054df41d5cceso3794871ybu.18 for ; Wed, 28 Jul 2021 11:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc :content-transfer-encoding; bh=u+F5QBAsE1/HsXf884tE4D04cBLr/6lGUle/zoBkti8=; b=bnNxKOyBHSl0C8ht1R4Ut+kF3cEgq6uUt/y3plIwxmtpdM2G23gxRdZUcDl8z944DD UFI9/mLwOzn096aw/ZZjhA9SoLBIz7AJ9/nxCZnOCaX7Ys2oLt5h3CYxqlyzrAH8T7/8 Sa1fs0PgHQ1F83WOLvhsly96BTkqUNmcwoN/MFro9lprAxkClbHy5tHoqejERYwF6ZqJ +/0LI7kf2uN2lkfmRNMERU0OIRQTKG4mZQl1FTUc4tG9wNsU+Z7TYdJ08MiyGhOSA3QW 8Mgu5K6jkB75A4LfnSqG6UtZTy7simEyxPWTINP4nt8PpKtxuTSP+qtHXIXocvsRdSVE fI5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc :content-transfer-encoding; bh=u+F5QBAsE1/HsXf884tE4D04cBLr/6lGUle/zoBkti8=; b=n/hS9pdtB1DXevvEVHhBIVsrSvOGavTUF2p2pp6TIXdchCC7Yn4rPLFuzQ1zI1dMky AGMpXpoSujuRmydia4n7p2v8Ln6lp9XqaTSun1R+wR9c8BR7mRFl4SnWQArtGrKLtRmq M67QqP+y4nW1UYS/lcdQd+Q/bz4BNnUoXgrqhadzG56lj/TWR4SXLFKdpInU67l62ct1 5VFWStt2UBwxVXg6jvyB/0MqmhVtXQ+3ABkpDQDI4DnZQDvdmT3yyakSBmbYbLGKfpo3 0/0rirSkyQH6BZes1qOKYI0kU4xHR/vpqgjvKsfEfFJwrPY5yQq8ZB9ADqqOvFV3Boc4 CcQw== X-Gm-Message-State: AOAM5321wUvKAnewIRSLOVj5KokR92P/YMBTVL+9DvV9KE5tZQUcxeOu FqkhQt+U4zjECSopGHIQJ8Da61DtHyGqwpMOYmB+uvuxzGoBxVXmFjUDmhSx/qp6Oo1i9bgt4D1 iu1BStHUmQ72CtfO86qQAaWkkqtWY+/HBWXQDEZYt7o9a5TeVfP7n3LWZNSqxnsds X-Google-Smtp-Source: ABdhPJyTnsnqFl6mHumlxt8aq7nijjiDyZwe1xLKVyjBFgoHB/pZRXJ2a/3VgbSe9pgDPbPCo8TQ2NHPhQ== X-Received: from raxel-pw.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2fda]) (user=raxel job=sendgmr) by 2002:a25:e7d6:: with SMTP id e205mr1284264ybh.57.1627496243188; Wed, 28 Jul 2021 11:17:23 -0700 (PDT) Date: Wed, 28 Jul 2021 18:17:13 +0000 Message-Id: <20210728181718.3613124-1-raxel@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog Subject: [PATCH v2 0/5] patch-detail: add unaddressed/addressed status to patch comments 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" Currently, there is no state or status associated with patch comments. In particular, knowing whether a comment on a patch is addressed is useful for transparency and accountability in the review and contribution process. This series adds labels to comments to show whether they are “Addressed” or “Unaddressed”. Also, the addressed status of a comment can be manually changed given the required permissions to edit a patch. A future feature that would be useful to implement with this new feature is the ability to automatically add unaddressed comments to a user’s TODO page. Something important to note is that this patch series relies on the JS cookie library [1] and rest.js file [2], both introduced in my previous patch series. Also, the patch series was previously a RFC [3] that lacked tests and release notes. Also, the first patch now adds the OpenAPI definition of the new comment detail endpoint and upgrades the REST API to v1.3 accordingly. For the first patch, the addressed field is added to the data model and a new endpoint for the REST API to work with a specific comment is added as well. The endpoint is upgraded to v1.3 and defined for OpenAPI. For the second patch, tests are added for the new endpoint. Also, the addressed field is added to create_patch_comment in the api tests utils.py. For the third patch, the addressed status label and button to change the addressed status are added with styling. For the fourth patch, the REST API call is added when the buttons are clicked to change the addressed status of a comment. Also, the UI is set to update accordingly. For the fifth patch, release notes are added for these changes. [1] https://lists.ozlabs.org/pipermail/patchwork/2021-July/006994.html [2] https://lists.ozlabs.org/pipermail/patchwork/2021-July/006997.html [3] https://lists.ozlabs.org/pipermail/patchwork/2021-July/006974.html Raxel Gutierrez (5): api: add addressed field and detail endpoint for patch comments tests: add tests for patch comments detail endpoint patch-detail: add label and button for comment addressed status patch-detail: add functionality for comment status updates docs: add release note for addressed/unaddressed comments docs/api/schemas/generate-schemas.py | 4 +- docs/api/schemas/latest/patchwork.yaml | 144 +- docs/api/schemas/patchwork.j2 | 148 +- docs/api/schemas/v1.0/patchwork.yaml | 35 +- docs/api/schemas/v1.1/patchwork.yaml | 35 +- docs/api/schemas/v1.2/patchwork.yaml | 35 +- docs/api/schemas/v1.3/patchwork.yaml | 2749 +++++++++++++++++ htdocs/css/style.css | 55 +- htdocs/js/submission.js | 52 + patchwork/api/base.py | 24 +- patchwork/api/check.py | 21 +- patchwork/api/comment.py | 76 +- patchwork/api/patch.py | 2 +- .../migrations/0045_patchcomment_addressed.py | 18 + patchwork/models.py | 5 +- patchwork/templates/patchwork/submission.html | 165 +- patchwork/tests/api/test_comment.py | 201 +- patchwork/tests/utils.py | 1 + patchwork/urls.py | 17 +- patchwork/views/patch.py | 1 + ...essed-patch-comments-bfe71689b6f35a22.yaml | 20 + templates/base.html | 2 +- 22 files changed, 3653 insertions(+), 157 deletions(-) create mode 100644 docs/api/schemas/v1.3/patchwork.yaml create mode 100644 htdocs/js/submission.js create mode 100644 patchwork/migrations/0045_patchcomment_addressed.py create mode 100644 releasenotes/notes/comment-detail-endpoint-for-addressed-unaddressed-patch-comments-bfe71689b6f35a22.yaml