Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Polish sectionTitle #10901

Merged
merged 1 commit into from
Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions app/renderer/about/bookmarks/bookmarks.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const React = require('react')
const Immutable = require('immutable')
const ipc = window.chrome.ipcRenderer

const cx = require('../../../../js/lib/classSet')
const {StyleSheet, css} = require('aphrodite/no-important')

// Components
const {AboutPageSectionTitle} = require('../../components/common/sectionTitle')
const BookmarkFolderList = require('./bookmarkFolderList')
Expand Down Expand Up @@ -133,7 +136,10 @@ class Bookmarks extends React.Component {

render () {
return <div className='siteDetailsPage bookmarksManager' onClick={this.onClick}>
<div className='siteDetailsPageHeader'>
<div className={cx({
siteDetailsPageHeader: true,
[css(styles.bookmarksManager__header)]: true
})}>
<AboutPageSectionTitle data-l10n-id='bookmarkManager' />
<div className='headerActions'>
<div className='searchWrapper'>
Expand Down Expand Up @@ -163,7 +169,8 @@ class Bookmarks extends React.Component {
isRoot
selectedFolderId={this.state.selectedFolderId}
search={this.state.search}
bookmarkOrder={this.state.bookmarkOrder} />
bookmarkOrder={this.state.bookmarkOrder}
/>
</div>
<div className='organizeView'>
<BookmarksList
Expand All @@ -176,11 +183,20 @@ class Bookmarks extends React.Component {
allBookmarkFolders={this.state.bookmarkFolders}
sortable={false}
draggable={!this.state.search}
selectedFolderId={this.state.selectedFolderId} />
selectedFolderId={this.state.selectedFolderId}
/>
</div>
</div>
</div>
}
}

const styles = StyleSheet.create({
bookmarksManager__header: {
Copy link
Contributor Author

@luixxiul luixxiul Sep 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be deprecated with a component like <SiteDetailsPageHeader actions>.

display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
}
})

module.exports = <Bookmarks />
3 changes: 2 additions & 1 deletion app/renderer/components/common/sectionTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const styles = StyleSheet.create({
},

aboutPageSectionTitle: {
display: 'inline-block'
display: 'block',
whiteSpace: 'nowrap'
},
aboutPageSectionSubTitle: {
fontSize: '16px',
Expand Down
15 changes: 12 additions & 3 deletions js/about/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const settings = require('../constants/settings')
const aboutActions = require('./aboutActions')
const getSetting = require('../settings').getSetting
const SortableTable = require('../../app/renderer/components/common/sortableTable')
const Button = require('../../app/renderer/components/common/button')
const BrowserButton = require('../../app/renderer/components/common/browserButton')
const {makeImmutable} = require('../../app/common/state/immutableUtil')
const historyUtil = require('../../app/common/lib/historyUtil')

Expand Down Expand Up @@ -208,7 +208,10 @@ class AboutHistory extends React.Component {
}
render () {
return <div className='siteDetailsPage' onClick={this.onClick}>
<div className='siteDetailsPageHeader'>
<div className={cx({
siteDetailsPageHeader: true,
[css(styles.history__header)]: true
})}>
<AboutPageSectionTitle data-l10n-id='history' />
<div className='headerActions'>
<div className='searchWrapper'>
Expand All @@ -219,7 +222,7 @@ class AboutHistory extends React.Component {
: <span className='fa fa-search searchInputPlaceholder' />
}
</div>
<Button className='primaryButton'
<BrowserButton primaryColor
l10nId='clearBrowsingDataNow'
testId='clearBrowsingDataButton'
onClick={this.clearBrowsingDataNow}
Expand Down Expand Up @@ -247,6 +250,12 @@ class AboutHistory extends React.Component {
}

const styles = StyleSheet.create({
history__header: {
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center'
},

subTitleMargin: {
marginLeft: globalStyles.spacing.aboutPageSectionPadding
}
Expand Down
17 changes: 0 additions & 17 deletions less/about/bookmarks.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

.siteDetailsPage {
display: flex;
padding: 0;
flex-direction: column;
height: 100%;
min-height: 100vh;
Expand All @@ -16,26 +15,10 @@
width: 100%;
}

.siteDetailsPageHeader {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is deprecated with the flex.

display: flex;
padding: 24px;
justify-content: space-between;

.headerActions {
float: none;
align-items: center;

input.searchInput {
margin-right: 0 !important;
}
}
}

.siteDetailsPageContent {
display: flex;
flex-wrap: wrap;
height: 100%;
margin: 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

flex: 1;

.folderView {
Expand Down
3 changes: 0 additions & 3 deletions less/about/siteDetails.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ body {
background: @veryLightGray;
}


.siteDetailsPage {
margin: 0;
padding-top: 24px;
Expand All @@ -19,8 +18,6 @@ body {
padding: 0 @aboutPageSectionPadding;

.headerActions {
float: right;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.


.searchWrapper {
display: inline-block;

Expand Down