From 954a7672dd86c4ae50b8196c3f0bb54de27f0abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Kr=C3=B6ger?= Date: Sat, 20 Oct 2018 23:39:26 +0200 Subject: [PATCH 1/8] :children_crossing: (overview) Improved touch actions on menu --- CHANGELOG.md | 5 +++++ src/app/overview/Overview.vue | 5 +++++ src/app/overview/components/Menu.vue | 10 ++++++---- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b4f2ad..96d2b278 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented here. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added +- Improved touch actions on the overview menu + ## [1.3.1] - 2018-10-18 ### Changed diff --git a/src/app/overview/Overview.vue b/src/app/overview/Overview.vue index df647352..0da2cfc0 100644 --- a/src/app/overview/Overview.vue +++ b/src/app/overview/Overview.vue @@ -269,6 +269,11 @@ this.cancelDeleteMode() }, updateEditMode (type) { + if (type === 'view-mode-toggle') { + this.hideBackdrop() + return + } + this.editMode = type if (type === 'category' || type === 'view-mode') { diff --git a/src/app/overview/components/Menu.vue b/src/app/overview/components/Menu.vue index 2e1268c7..91284eb3 100644 --- a/src/app/overview/components/Menu.vue +++ b/src/app/overview/components/Menu.vue @@ -7,7 +7,8 @@ aria-label="View mode" :class="`view-mode icon ${disableMenu ? '' : 'inverse'}`" @click.native.prevent="emitMenuAction('view-mode')"> - + + @@ -50,7 +51,9 @@ 'feather-trash': () => import('vue-feather-icons/icons/Trash2Icon' /* webpackChunkName: "icons" */), 'feather-grid': () => - import('vue-feather-icons/icons/GridIcon' /* webpackChunkName: "icons" */) + import('vue-feather-icons/icons/GridIcon' /* webpackChunkName: "icons" */), + 'feather-x': () => + import('vue-feather-icons/icons/XIcon' /* webpackChunkName: "icons" */) }, props: { @@ -72,8 +75,7 @@ methods: { emitMenuAction (type) { - if (this.disableMenu) return - this.$emit('clicked-item', type) + this.$emit('clicked-item', this.disableMenu ? `${type}-toggle` : type) } } } From 68a579fd3ee86bffd56732b4919fd050bd993039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20Kr=C3=B6ger?= Date: Sat, 20 Oct 2018 23:41:03 +0200 Subject: [PATCH 2/8] :children_crossing: (plants) Added tag suggestions when adding a new tag to plants --- src/app/plant/Plant.vue | 12 +++-- src/app/plant/components/PlantComponent.vue | 2 + src/app/plant/components/PlantFooter.vue | 2 + src/app/plant/components/PlantTags.vue | 56 ++++++++++++++++++--- src/components/Tag.vue | 26 +++++++++- 5 files changed, 84 insertions(+), 14 deletions(-) diff --git a/src/app/plant/Plant.vue b/src/app/plant/Plant.vue index 8c4d6a13..b732a6a0 100644 --- a/src/app/plant/Plant.vue +++ b/src/app/plant/Plant.vue @@ -28,8 +28,9 @@ @update-photo="updatePlantPhoto" /> @@ -48,7 +49,7 @@ @@ -104,7 +105,8 @@ theme: state => state.settings.theme, plantsData: state => state.plants.data, plantsLoading: state => state.plants.loading, - plant: state => state.selected + plant: state => state.selected, + tags: state => state.tags.data }), ...mapGetters({ plantTags: 'getPlantTags' @@ -112,7 +114,7 @@ defaultIconColor () { return this.theme === 'light' ? 'black' : 'white' }, - allTags () { + allPlantTags () { return this.plantTags(this.plant.guid) }, plantModules () { diff --git a/src/app/plant/components/PlantComponent.vue b/src/app/plant/components/PlantComponent.vue index 18450e58..8d2b67ce 100644 --- a/src/app/plant/components/PlantComponent.vue +++ b/src/app/plant/components/PlantComponent.vue @@ -42,6 +42,8 @@ padding: var(--base-gap); margin-bottom: 4px; overflow: hidden; + z-index: 0; + position: relative; } .plant-component header { diff --git a/src/app/plant/components/PlantFooter.vue b/src/app/plant/components/PlantFooter.vue index b7c9063e..1e7084c1 100644 --- a/src/app/plant/components/PlantFooter.vue +++ b/src/app/plant/components/PlantFooter.vue @@ -63,6 +63,8 @@ display: flex; justify-content: space-between; align-items: center; + z-index: 0; + position: relative; &.no-modules { font-size: var(--text-size-base); diff --git a/src/app/plant/components/PlantTags.vue b/src/app/plant/components/PlantTags.vue index a82d3754..ba7b3e1a 100644 --- a/src/app/plant/components/PlantTags.vue +++ b/src/app/plant/components/PlantTags.vue @@ -1,7 +1,7 @@