From 1f69c0abfc7a39930e39813d2216684752cc86f8 Mon Sep 17 00:00:00 2001 From: lookacat Date: Mon, 14 Feb 2022 16:43:28 +0100 Subject: [PATCH 1/8] redesign sort --- src/components/molecules/OcTable/OcTable.vue | 32 ++++++++++++++++++-- src/mixins/sort.js | 1 - src/mixins/sort.scss | 28 ----------------- 3 files changed, 29 insertions(+), 32 deletions(-) delete mode 100644 src/mixins/sort.scss diff --git a/src/components/molecules/OcTable/OcTable.vue b/src/components/molecules/OcTable/OcTable.vue index f6ddc2255..e66480438 100644 --- a/src/components/molecules/OcTable/OcTable.vue +++ b/src/components/molecules/OcTable/OcTable.vue @@ -19,17 +19,23 @@ + > + + @@ -519,6 +525,26 @@ export default { } } } +.header-text:hover + .oc-button-sort { + opacity: 1; +} +.header-text { + vertical-align: middle; + display: inline-table; + color: var(--oc-color-swatch-inverse-default); + &:hover { + text-decoration: underline; + } +} +.oc-button-sort { + opacity: 0; + display: inline-table; + vertical-align: middle; + .oc-icon { + display: table-cell !important; + vertical-align: middle !important; + } +} ```js diff --git a/src/mixins/sort.js b/src/mixins/sort.js index 4c031652c..5f5f820c7 100644 --- a/src/mixins/sort.js +++ b/src/mixins/sort.js @@ -1,5 +1,4 @@ import { EVENT_THEAD_CLICKED } from "../helpers/constants" -import "./sort.scss" const SORT_DIRECTION_ASC = "asc" const SORT_DIRECTION_DESC = "desc" diff --git a/src/mixins/sort.scss b/src/mixins/sort.scss deleted file mode 100644 index 98061fc3d..000000000 --- a/src/mixins/sort.scss +++ /dev/null @@ -1,28 +0,0 @@ -.oc-thead { - th { - &[aria-sort] .oc-button-sort { - background-position: center; - background-repeat: no-repeat; - background-size: 0.65em 1em; - cursor: pointer; - display: inline; - height: 1em; - margin-left: var(--oc-space-xsmall); - padding: 0; - vertical-align: middle; - width: 0.65em; - } - - &[aria-sort='none'] .oc-button-sort { - background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" stroke="white" stroke-width="12" width="101" height="101" preserveAspectRatio="none"%3E%3Cpath opacity=".3" d="M51 1l25 23 24 22H1l25-22zm0 100l25-23 24-22H1l25 22z"/%3E%3C/svg%3E'); - } - - &[aria-sort='descending'] .oc-button-sort { - background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" stroke="white" stroke-width="12" width="101" height="101" preserveAspectRatio="none"%3E%3Cpath opacity=".3" d="M51 1l25 23 24 22H1l25-22z"/%3E%3Cpath d="M51 101l25-23 24-22H1l25 22z"/%3E%3C/svg%3E'); - } - - &[aria-sort='ascending'] .oc-button-sort { - background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg xmlns="http://www.w3.org/2000/svg" stroke="white" stroke-width="12" width="101" height="101" preserveAspectRatio="none"%3E%3Cpath d="M51 1l25 23 24 22H1l25-22z"/%3E%3Cpath opacity=".3" d="M51 101l25-23 24-22H1l25 22z"/%3E%3C/svg%3E'); - } - } -} From 2b314c9b5fea7900ac3a7d28f4206e49fda6ce76 Mon Sep 17 00:00:00 2001 From: lookacat Date: Wed, 16 Feb 2022 12:36:41 +0100 Subject: [PATCH 2/8] click on icon behaves now like click on resource name --- .../organisms/OcResource/OcResource.vue | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/components/organisms/OcResource/OcResource.vue b/src/components/organisms/OcResource/OcResource.vue index 9fd700e0c..1ddef7321 100644 --- a/src/components/organisms/OcResource/OcResource.vue +++ b/src/components/organisms/OcResource/OcResource.vue @@ -1,14 +1,24 @@