From da6e3ac62a556b358d29ff2bccbcc1c92e7c5a66 Mon Sep 17 00:00:00 2001 From: Cezar Augusto Date: Thu, 27 Apr 2017 15:13:16 -0300 Subject: [PATCH] Split scroll between titles and folders for BM manager - Auditors: @bsclifton - Close #5076 --- js/about/bookmarks.js | 95 ++++++++++++++++++++------------------- less/about/bookmarks.less | 36 +++++++++++++++ less/variables.less | 1 + 3 files changed, 86 insertions(+), 46 deletions(-) diff --git a/js/about/bookmarks.js b/js/about/bookmarks.js index 0cf2869cc75..0acab547618 100644 --- a/js/about/bookmarks.js +++ b/js/about/bookmarks.js @@ -16,6 +16,7 @@ const SortableTable = require('../components/sortableTable') const siteUtil = require('../state/siteUtil') const formatUtil = require('../../app/common/lib/formatUtil') const iconSize = require('../../app/common/lib/faviconUtil').iconSize +const ScrollableContent = require('../../app/renderer/components/common/scrollableContent') const ipc = window.chrome.ipcRenderer @@ -136,55 +137,57 @@ class BookmarkFolderItem extends React.Component { class BookmarkFolderList extends ImmutableComponent { render () { return - { - this.props.isRoot && this.props.search - ?
- - -
- : null - } - { - this.props.isRoot - ? - : null - } - { - this.props.bookmarkFolders.map((bookmarkFolder) => - this.props.isRoot && bookmarkFolder.get('parentFolderId') === -1 - ? null - : + { + this.props.isRoot && this.props.search + ?
+ + +
+ : null + } + { + this.props.isRoot + ? + : null + } + { + this.props.bookmarkFolders.map((bookmarkFolder) => + this.props.isRoot && bookmarkFolder.get('parentFolderId') === -1 + ? null + : ) + } + { + this.props.isRoot + ? ) - } - { - this.props.isRoot - ? - : null - } + bookmarkFolder={Immutable.fromJS({folderId: -1, tags: [siteTags.BOOKMARK_FOLDER]})} /> + : null + } +
} } @@ -448,7 +451,7 @@ class AboutBookmarks extends React.Component { this.refs.bookmarkSearch.focus() } render () { - return
+ return
diff --git a/less/about/bookmarks.less b/less/about/bookmarks.less index 8c43f6d62f4..3541dc4ab8d 100644 --- a/less/about/bookmarks.less +++ b/less/about/bookmarks.less @@ -11,6 +11,11 @@ height: 100%; min-height: 100vh; + &.bookmarksManager { + position: fixed; + width: 100%; + } + .siteDetailsPageHeader { display: flex; padding: 24px; @@ -51,6 +56,11 @@ > .bookmarkFolderList { display: block; + overflow-x: auto; + overflow-y: auto; + max-width: 410px; + // viewport - header size - header size + max-height: calc(~"100vh - 84px - 35px"); .listItem >* { color: @buttonColor; @@ -76,6 +86,8 @@ .organizeView { flex-grow: 5; border-left: 1px solid @braveOrange; + overflow: scroll; + max-height: 100vh; .sortableTable { user-select: none; @@ -185,3 +197,27 @@ .exportBookmarks { -webkit-mask-image: url('../../img/toolbar/bookmarks_export.svg'); } + +// Reset styles for small breakpoints +@media (max-width: @breakpointForBookmarksPage) { + .siteDetailsPage.bookmarksManager { + position: static; + } + + .siteDetailsPage { + .siteDetailsPageContent { + .folderView { + .organizeView { + overflow: visible; + max-height: inherit; + } + > .bookmarkFolderList { + overflow-x: visible; + overflow-y: visible; + max-width: inherit; + max-height: inherit; + } + } + } + } +} diff --git a/less/variables.less b/less/variables.less index 7e0074c006f..15a70da017d 100644 --- a/less/variables.less +++ b/less/variables.less @@ -155,6 +155,7 @@ @breakpointWideViewport: 1000px; @breakpointNarrowViewport: 600px; +@breakpointForBookmarksPage: 565px; @breakpointExtensionButtonPadding: 720px; @breakpointSmallWin32: 650px; @breakpointTinyWin32: 500px;