From patchwork Mon Jul 26 13:50:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raxel Gutierrez X-Patchwork-Id: 1510060 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=gA1nlhLR; 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) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GYLsS5zDkz9sXN for ; Mon, 26 Jul 2021 23:50:20 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4GYLsR5Ft7z306m for ; Mon, 26 Jul 2021 23:50:19 +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=gA1nlhLR; 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=3kr3-yaukcrcexk183bb381.zb9cxgz4jbe785fgf.bm8xyf.be3@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=gA1nlhLR; 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 4GYLsN6GlVz305p for ; Mon, 26 Jul 2021 23:50:14 +1000 (AEST) Received: by mail-qv1-xf4a.google.com with SMTP id hf7-20020a0562140e87b02902dc988b8675so8377123qvb.3 for ; Mon, 26 Jul 2021 06:50:14 -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=sIyYDbdikID+5BZjJc0EEi45naaEql+0MHLWBrgShS0=; b=gA1nlhLRrpXtnKYx1o4Vw2mWgdB2XlFb+PjIIAOhtndL4ZkSieePj/v72puw5L3mZg eLDAEid4Nr+N4eVEQ50jcIENMAZJHpzDt7ekAHrR2rf1U6B/gwchFWjjbJmWHr5LZDQp IeQgAjcDx6Ev6v8SSOedh6Ap3541iAmEshXYw1U+l1bO673bTfvx4YAPbsvIWFJo68bi EvMtDm0dKxs5U5R2Z9MzLcnotvqSeRYXgl/HI2gYi1CDa8KCV+meNZ1x4WGSkNkLarjf L9oEt41vibiNrz1bjJAXwskhZoMv2+LFNF4DGOZqxRTvmCkvUlke4nGTXErSR/SHBSWO ekpw== 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=sIyYDbdikID+5BZjJc0EEi45naaEql+0MHLWBrgShS0=; b=UorzT1Y2Wlb6UQOcJkIUKbdlB/YgaKXwZ3XK3FNZbfThsUXVE2bw9jvKFO7AY1fShl dvhEbrpuF4bF59ZssIpdpldWQ4iJcR2lmd7kbqcGkI1jqlFCGOtwmiwygiKZp+bDuE6T FLk4dKWOfHIU7EXKMXKIrZN+m7YtYQl34emsAv8smk1h5ti6ctba+iJkQCvDkfyeKuFu ZHa8gHAxhduczRZuqnQqJ8855qhBci2uTc/+zABBOJPHyfPss9KYDOONrYzx2Wk+brxB KiCtYsHc6vv4FvlyNPykmMj2NKkV92bO64mq7otDY4lfJwiLlDSWT+JJx0zrwN7ZPm6f r32Q== X-Gm-Message-State: AOAM533/fRQe29XWCFeFgxGP8yQ7rgGSzMb57m2jz1s38i56OLUzKmE/ YTmf2uKbjlOZ3ggAoVGaii4I6Vi7p5GHYmHIN5bM5aV9fyWlhvocSSFraEFoJ3GxFO8yZWrBDGx c4weAsEk6Q3fllRwWSXOM2y2Q/Q4Qvh2txVm+VmmWa9ibJFgXDjT7sboKAkNSY/+Z X-Google-Smtp-Source: ABdhPJxnO09skofXq+lCVM7aeHYYqDPR826VyKC8IFv8eZPVXFSR7ja2/hpVXe4eRX5ckeLMeVkFENKpKw== X-Received: from raxel-pw.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2fda]) (user=raxel job=sendgmr) by 2002:ad4:56e8:: with SMTP id cr8mr17637978qvb.53.1627307410766; Mon, 26 Jul 2021 06:50:10 -0700 (PDT) Date: Mon, 26 Jul 2021 13:50:06 +0000 Message-Id: <20210726135006.3195332-1-raxel@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.32.0.432.gabb21c7263-goog Subject: [PATCH v2] 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 | 6 ++++ .../patchwork/partials/download-buttons.html | 5 +++- patchwork/templates/patchwork/submission.html | 29 +++++++++---------- 4 files changed, 34 insertions(+), 16 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..2a3cb7f 100644 --- a/htdocs/js/submission.js +++ b/htdocs/js/submission.js @@ -39,6 +39,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 %}