From c6932ba733e0a67220ce56bec72431240518f7d8 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Sat, 9 Jul 2022 02:07:42 +0530 Subject: [PATCH] fix(desktop): don't shift sections on macOS if window is small (#1235) --- packages/desktop/app/stylesheets/renderer.css | 12 +++++++----- .../javascripts/Components/Navigation/Navigation.tsx | 1 + .../javascripts/Components/SearchBar/SearchBar.tsx | 5 +++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/desktop/app/stylesheets/renderer.css b/packages/desktop/app/stylesheets/renderer.css index 32a243a28..689f6d9ae 100644 --- a/packages/desktop/app/stylesheets/renderer.css +++ b/packages/desktop/app/stylesheets/renderer.css @@ -9,12 +9,14 @@ transition: 0.15s padding ease; } -.mac-desktop #app.collapsed-notes.collapsed-navigation #editor-column { - padding-top: 18px; -} +@media screen and (min-width: 768px) { + .mac-desktop #app.collapsed-notes.collapsed-navigation #editor-column { + padding-top: 18px; + } -.mac-desktop #app.collapsed-navigation #items-column { - padding-top: 18px; + .mac-desktop #app.collapsed-navigation #items-column { + padding-top: 18px; + } } panel-resizer { diff --git a/packages/web/src/javascripts/Components/Navigation/Navigation.tsx b/packages/web/src/javascripts/Components/Navigation/Navigation.tsx index 816b24f84..a106c2e26 100644 --- a/packages/web/src/javascripts/Components/Navigation/Navigation.tsx +++ b/packages/web/src/javascripts/Components/Navigation/Navigation.tsx @@ -52,6 +52,7 @@ const Navigation: FunctionComponent = ({ application }) => {
diff --git a/packages/web/src/javascripts/Components/SearchBar/SearchBar.tsx b/packages/web/src/javascripts/Components/SearchBar/SearchBar.tsx index 76ff9fc08..0ecd8f853 100644 --- a/packages/web/src/javascripts/Components/SearchBar/SearchBar.tsx +++ b/packages/web/src/javascripts/Components/SearchBar/SearchBar.tsx @@ -8,11 +8,12 @@ import DecoratedInput from '../Input/DecoratedInput' import { observer } from 'mobx-react-lite' type Props = { + selectedViewTitle?: string itemListController: ItemListController searchOptionsController: SearchOptionsController } -const SearchBar = ({ itemListController, searchOptionsController }: Props) => { +const SearchBar = ({ itemListController, searchOptionsController, selectedViewTitle = 'Notes' }: Props) => { const searchInputRef = useRef(null) const { noteFilterText, setNoteFilterText, clearFilterText, onFilterEnter } = itemListController @@ -52,7 +53,7 @@ const SearchBar = ({ itemListController, searchOptionsController }: Props) => { container: 'px-1', input: 'placeholder:text-passive-0', }} - placeholder="Search" + placeholder={`Search in ${selectedViewTitle}`} value={noteFilterText} ref={searchInputRef} onBlur={onSearchBlur}