From 86b38e104166d88fb7f584ca19ab11b05fdc4aad Mon Sep 17 00:00:00 2001 From: Laurent Senta Date: Mon, 24 Jan 2022 15:50:41 +0100 Subject: [PATCH] fix: tag placeholder align (#819) * fix: padding in navigation no-tag-placeholder * fix: lint-staged was disabled * fix: make findArray typesafe --- .../javascripts/ui_models/app_state/notes_view_state.ts | 5 ++++- app/assets/stylesheets/_navigation.scss | 2 +- package.json | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/ui_models/app_state/notes_view_state.ts b/app/assets/javascripts/ui_models/app_state/notes_view_state.ts index dda719f08..e0a31dfb1 100644 --- a/app/assets/javascripts/ui_models/app_state/notes_view_state.ts +++ b/app/assets/javascripts/ui_models/app_state/notes_view_state.ts @@ -95,7 +95,10 @@ export class NotesViewState { /** A tag could have changed its relationships, so we need to reload the filter */ this.reloadNotesDisplayOptions(); this.reloadNotes(); - if (findInArray(tags, 'uuid', this.appState.selectedTag?.uuid)) { + if ( + this.appState.selectedTag && + findInArray(tags, 'uuid', this.appState.selectedTag.uuid) + ) { /** Tag title could have changed */ this.reloadPanelTitle(); } diff --git a/app/assets/stylesheets/_navigation.scss b/app/assets/stylesheets/_navigation.scss index 7faf812ca..c0de65551 100644 --- a/app/assets/stylesheets/_navigation.scss +++ b/app/assets/stylesheets/_navigation.scss @@ -31,7 +31,7 @@ } .no-tags-placeholder { - padding: 0px 12px; + padding: 0px 14px; font-size: 12px; opacity: 0.4; margin-top: -5px; diff --git a/package.json b/package.json index 28343a799..913d5078e 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "react-dnd-touch-backend": "^14.1.1" }, "lint-staged": { - "app/*.{js,ts,jsx,tsx}": "eslint --cache --fix", - "app/*.{js,ts,jsx,tsx,css,md}": "prettier --write" + "app/**/*.{js,ts,jsx,tsx}": "eslint --cache --fix", + "app/**/*.{js,ts,jsx,tsx,css,md}": "prettier --write" } }