From patchwork Sat Jul 24 01:35:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raxel Gutierrez X-Patchwork-Id: 1509411 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=Z/p2srCj; 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 4GWpfn48fPz9sXJ for ; Sat, 24 Jul 2021 11:35:45 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GWpfn2Lq2z305q for ; Sat, 24 Jul 2021 11:35: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=Z/p2srCj; 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::f49; helo=mail-qv1-xf49.google.com; envelope-from=3y277yaukctwpyvcjemmejc.amknyrafumpijgqrq.mxjyzq.mpe@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=Z/p2srCj; dkim-atps=neutral Received: from mail-qv1-xf49.google.com (mail-qv1-xf49.google.com [IPv6:2607:f8b0:4864:20::f49]) (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 4GWpfh1pwVz2ymb for ; Sat, 24 Jul 2021 11:35:38 +1000 (AEST) Received: by mail-qv1-xf49.google.com with SMTP id b8-20020a0562141148b02902f1474ce8b7so2902009qvt.20 for ; Fri, 23 Jul 2021 18:35:37 -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; bh=esAPxALvdRyMBLjEvFU6nRWErDffgPHKQTZIXCZSx14=; b=Z/p2srCj/vBGQTDSnxg0EZwpSOAsWqh+IvfHwUDZkusU3DTLwQZZFUBh7ViPuufVsr zBPAy8+3SNKlIbzm+nEj1CqusuS8+Q0ZNFC6gzsW4V/WiYQ68d3SC2nSrbwFWNrs/A+6 7RHZoKwx1KWCUv2eX2L78WkUlaTh9MLlCqcps5mkBeZZXjZYI+/S9nEe7ZsyngTNZP++ UQA1wbjDmu8Z6c6+2QPn76SC5nMOU7rnDEIuO/O2AOsDMsrB9upwrTTpTQbWoZU0Cho4 B9IwrYLOH/T0379mXEuNAZdtznMX0dPi3jm3SYqDb7pvqznJiEd4d31bfMzou8NODXcK hojg== 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; bh=esAPxALvdRyMBLjEvFU6nRWErDffgPHKQTZIXCZSx14=; b=NYChE5++K0ygRoz1wFSHJ0SKIpb0UXw3dO+gyoApR2V4EsdIvkd6+bT7wPiiastAx6 7UnwKrSQxYcBB8fTszyveeXzIFvWRhGM49BG29jsAPIpI31FFf6yHU4a/BodyiZSmLgz exmdVKKddq3aqsKTGntyfRWyqeTgIqLpFMsYQlYrPUKL9EnVDQLyxUj+kuaeitYyAvyr 4G8URSAGrvLy5IOyEuOSbqLIVfdduwsosjzy0uKcOBZDoqPWH5dakuz8HzZhzzXwWnPx 7ndISZBkYC4G5onoZZ48twOh+Ju0yV/7vxEajEQ0CA1UZNPs/SlqZhwtheG2DYH0bEen xxrA== X-Gm-Message-State: AOAM532JFfnYNKJlBnFmx581Bo23LNJfULO4OQ62MotrlVW+0flmpCuF qYy+oJm0FjbfL1kVZrdgmZedS7j06oixumJh0vkEKj14zQEOdkJaRnopUJew0gx3TNnVhl0b7KZ z1OGx0yfwuyNLJoXnu+YxX2TrcUznXxPNqks8CWi9YE4JetMmoCActXZFFGYX8AAy X-Google-Smtp-Source: ABdhPJyuAUs/pF9CjvqmpC8uqB0OZUNl9G9r7pcSg5N5xKMgPlK2ryuq1ndyFeJYZEY9K37g7gbxLtE9ug== X-Received: from raxel-pw.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2fda]) (user=raxel job=sendgmr) by 2002:a0c:c245:: with SMTP id w5mr4479205qvh.21.1627090531341; Fri, 23 Jul 2021 18:35:31 -0700 (PDT) Date: Sat, 24 Jul 2021 01:35:25 +0000 Message-Id: <20210724013525.2789450-1-raxel@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog Subject: [PATCH] patch-detail: move patch diff section up and add collapse button 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 hide/show button to "Patch" header action bar so that the patch diff can be collapsed for easier viewing of comments and other related information. Also, the buttons are now left-aligned instead of right-aligned. The download buttons are also next to the patch subject title. Before [1] when the Patch section is at the bottom of the page and after [2] where it is moved to the top and button group next to the patch subject title is also left-aligned now. [1] https://imgur.com/svhP18W [2] https://imgur.com/loFPIpX Signed-off-by: Raxel Gutierrez --- htdocs/css/style.css | 10 +++++++ htdocs/js/submission.js | 9 +++++- .../patchwork/partials/download-buttons.html | 5 +++- patchwork/templates/patchwork/submission.html | 29 +++++++++---------- 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/htdocs/css/style.css b/htdocs/css/style.css index 2f63b9a..8161310 100644 --- a/htdocs/css/style.css +++ b/htdocs/css/style.css @@ -302,6 +302,16 @@ table.patchmeta tr th, table.patchmeta tr td { border: 0; } +.patch-diff-header, .patch-submission-header { + display: inline-flex; + flex-wrap: wrap; + align-items: center; +} + +#patch-diff-actions { + margin-left: 16px; +} + .patch .content { padding: 1em; } diff --git a/htdocs/js/submission.js b/htdocs/js/submission.js index 79b677d..d5284f2 100644 --- a/htdocs/js/submission.js +++ b/htdocs/js/submission.js @@ -1,6 +1,7 @@ -import { updateProperty } from "./rest.js"; +// import { updateProperty } from "./rest.js"; $( document ).ready(function() { + console.log("hello"); function toggle_div(link_id, headers_id, label_show, label_hide) { const link = document.getElementById(link_id) const headers = document.getElementById(headers_id) @@ -39,6 +40,12 @@ $( document ).ready(function() { toggle_div("toggle-patch-series", "patch-series", "expand", "collapse"); }); + // Click listener to show/hide patch diff + document.getElementById("toggle-patch-diff").addEventListener("click", function() { + console.log("hello"); + toggle_div("toggle-patch-diff", "patch"); + }); + // Click listener to show/hide related patches document.getElementById("toggle-related").addEventListener("click", function() { toggle_div("toggle-related", "related"); diff --git a/patchwork/templates/patchwork/partials/download-buttons.html b/patchwork/templates/patchwork/partials/download-buttons.html index e75a25c..bbe3e0e 100644 --- a/patchwork/templates/patchwork/partials/download-buttons.html +++ b/patchwork/templates/patchwork/partials/download-buttons.html @@ -1,4 +1,7 @@ -
+
+ {% if collapse %} + + {% endif %}