From 2458ccbbffdada0706eab80f77dd090bcf1d38d7 Mon Sep 17 00:00:00 2001 From: indigane Date: Tue, 2 Aug 2022 17:51:59 +0300 Subject: [PATCH] Add category name editing --- analysis.html | 202 +++++++++++++++++++++++++++++++++++++++------- common-scripts.js | 32 ++++++++ 2 files changed, 203 insertions(+), 31 deletions(-) diff --git a/analysis.html b/analysis.html index 26bda9e..d736973 100644 --- a/analysis.html +++ b/analysis.html @@ -12,6 +12,9 @@ font-family: sans-serif; color: #000; } + body { + padding-bottom: 60vh; + } * { box-sizing: border-box; } @@ -31,7 +34,6 @@ } /* Category refinement */ .category-refinement { - grid-area: bottom; position: relative; } .category-refinement .title-bar { @@ -46,7 +48,9 @@ .category-refinement .title-bar h2 { margin: 0; } - .category-refinement .title-bar button { + .category-refinement .title-bar button, + .category-refinement .title-bar input[type="checkbox"], + .category-refinement .title-bar label { cursor: pointer; } .category-refinement .title-bar button[disabled] { @@ -72,6 +76,11 @@ } .category-refinement .category-name { grid-area: topleft; + white-space: pre-wrap; + outline-offset: 3px; + } + .category-refinement .category-name:hover:not(:focus):not(:active) { + outline: 2px solid #ddd; } .category-refinement .category-merge-tool { grid-area: bottomleft; @@ -99,13 +108,6 @@ .category-refinement .category-merge-button-start:focus { opacity: 1; } - /* - @media (hover: none) { - .category-refinement .category-merge-button-start { - opacity: 1; - } - } - */ .category-refinement .categories:not(.is-merge-active) .category-merge-button-end, .category-refinement .categories.is-merge-active .is-merge-source .category-merge-button-end, .category-refinement .categories.is-merge-active .category-merge-button-start, @@ -159,6 +161,9 @@ border: 1px solid rgba(102, 102, 255, 0); border-color: rgba(102, 102, 255, var(--more-weight)); border-radius: 5px; + box-shadow: 0 0 0 2px rgba(0, 0, 0, 0); + --similarity-highlight: 0 0 0 2px rgba(0, 0, 0, 1); + transition: box-shadow .1s ease-in; } .category-refinement .card:not(:last-child) { margin-right: 10px; @@ -172,12 +177,14 @@ } /* Association table */ .associations { + position: relative; padding: 15px; } .associations .title-bar { position: sticky; top: 0; padding: 15px 0; + width: fit-content; background: #fff; } .associations .title-bar h2 { @@ -187,6 +194,14 @@ border-collapse: collapse; --border-styles: 1px solid #eee; } + .association-table tr:first-of-type th:first-of-type { + text-align: right; + vertical-align: bottom; + padding: 15px; + } + .association-table .associations-button-swap-axes { + margin: 15px 0 0 15px; + } .association-table th { text-align: inherit; font-weight: inherit; @@ -196,12 +211,12 @@ border: var(--border-styles); padding: 0; } - .association-table .card-text-cell { + .association-table .x-axis-head-cell { width: 30px; height: 200px; vertical-align: bottom; } - .association-table .card-text { + .association-table .x-axis-head-text { position: absolute; width: 260px; transform-origin: left bottom; @@ -210,7 +225,7 @@ white-space: nowrap; text-overflow: ellipsis; } - .association-table .category-name { + .association-table .y-axis-head-text { padding-right: 0.25em; text-align: right; white-space: nowrap; @@ -241,10 +256,15 @@
+

Category refinement

- + +
@@ -255,7 +275,7 @@