From 7da138e99e6b8cd2176c5dd3b2f6666a8aedd2a6 Mon Sep 17 00:00:00 2001 From: Ru Singh Date: Mon, 29 Nov 2021 19:51:09 +0530 Subject: [PATCH] UI fix for multi-line pill text underline issues (#1499) * chore(docker): improve repeat contributions workflow * This change adds two new commands to gracefully stop and remove the Postgres and Clickhouse docker containers. To do so, it also gives them a recognizable name. * Additionally, the Postgres container is updated to use a named volume for its data. This lower friction for repeat contributions where one would otherwise sign up and activate their accounts again and again each time. * fix(ui): pill text to use text decoration instead of border Support is pretty good including Safari 12+ without a prefix. * docs(changelog): entry for pill text fix --- CHANGELOG.md | 3 +++ assets/css/app.css | 14 ++++++++++++++ .../dashboard/stats/conversions/prop-breakdown.js | 2 +- assets/js/dashboard/stats/devices/index.js | 2 +- assets/js/dashboard/stats/locations/index.js | 2 +- assets/js/dashboard/stats/pages/index.js | 2 +- assets/js/dashboard/stats/sources/source-list.js | 2 +- 7 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c52073019..430ad695d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ All notable changes to this project will be documented in this file. - Region and city-level geolocation plausible/analytics#1449 - The `u` option can now be used in the `manual` extension to specify a URL when triggering events. +### Fixed +- UI fix where multi-line text in pills would not be underlined properly on small screens. + ## v1.4.1 ### Fixed diff --git a/assets/css/app.css b/assets/css/app.css index a3ac26981..708b842eb 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -322,3 +322,17 @@ iframe[hidden] { left: 0 !important; } } + +.active-prop-heading { + /* Properties related to text-decoration are all here in one place. TailwindCSS does support underline but that's about it. */ + text-decoration-line: underline; + text-decoration-color: #4338CA; /* tailwind's indigo-700 */ + text-decoration-thickness: 2px; +} + +@media (prefers-color-scheme: dark) { + .active-prop-heading { + text-decoration-color: #6366F1; /* tailwind's indigo-500 */ + } + +} \ No newline at end of file diff --git a/assets/js/dashboard/stats/conversions/prop-breakdown.js b/assets/js/dashboard/stats/conversions/prop-breakdown.js index b9e03f058..50fe54455 100644 --- a/assets/js/dashboard/stats/conversions/prop-breakdown.js +++ b/assets/js/dashboard/stats/conversions/prop-breakdown.js @@ -168,7 +168,7 @@ export default class PropertyBreakdown extends React.Component { const isActive = this.state.propKey === key if (isActive) { - return
  • {key}
  • + return
  • {key}
  • } else { return
  • {key}
  • } diff --git a/assets/js/dashboard/stats/devices/index.js b/assets/js/dashboard/stats/devices/index.js index f7a3253af..1e5ce88f2 100644 --- a/assets/js/dashboard/stats/devices/index.js +++ b/assets/js/dashboard/stats/devices/index.js @@ -161,7 +161,7 @@ export default class Devices extends React.Component { if (isActive) { return (
  • {name}
  • diff --git a/assets/js/dashboard/stats/locations/index.js b/assets/js/dashboard/stats/locations/index.js index c9b15bd6d..762d9de08 100644 --- a/assets/js/dashboard/stats/locations/index.js +++ b/assets/js/dashboard/stats/locations/index.js @@ -104,7 +104,7 @@ export default class Locations extends React.Component { if (isActive) { return (
  • {name}
  • diff --git a/assets/js/dashboard/stats/pages/index.js b/assets/js/dashboard/stats/pages/index.js index fb6b45ccf..990a4767c 100644 --- a/assets/js/dashboard/stats/pages/index.js +++ b/assets/js/dashboard/stats/pages/index.js @@ -47,7 +47,7 @@ export default class Pages extends React.Component { if (isActive) { return (
  • {name}
  • diff --git a/assets/js/dashboard/stats/sources/source-list.js b/assets/js/dashboard/stats/sources/source-list.js index 3c89dbde0..9c6f3668b 100644 --- a/assets/js/dashboard/stats/sources/source-list.js +++ b/assets/js/dashboard/stats/sources/source-list.js @@ -284,7 +284,7 @@ export default class SourceList extends React.Component { } renderTabs() { - const activeClass = 'inline-block h-5 text-indigo-700 dark:text-indigo-500 font-bold border-b-2 border-indigo-700 dark:border-indigo-500' + const activeClass = 'inline-block h-5 text-indigo-700 dark:text-indigo-500 font-bold active-prop-heading' const defaultClass = 'hover:text-indigo-600 cursor-pointer' return (