From 8997c768ecfcc809841ecf12b5b44aa04cb9d01e Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Sat, 17 Jun 2017 20:26:02 +0900 Subject: [PATCH] Refactor navigationBar (part 3) Create components etc -- navigator.js, navigationBar.js, urlBar.js etc - navigator.js - topLevelEndButtons - navigationWrapper - counterBraveMenu - navigationBar.js - bookmarkButtonContainer - publisherToggleContainer - urlBar.js - titleBar - loadTimer - input - legend - noScriptInfo Also: - Refactor lionBadge - Refactor publisherToggle - replace topLevelEndButtons__braveMenuButton with braveMenuButton, adding the correct BEM level comment. - Move extensionButtons before braveMenuButton - Replace navigator__endButtons with commonStyles.navigator__buttonContainer (apply the same styles as bookmarkButtonContainer on navigationBar.js) - Change the width and height of bookmarkButton and publisherToggle to '100%' (make the whole area inside the publisher toggle container clickable) - Replace span + BrowserButton with a normal button on publisherToggle.js temporarily - Move module.exports to the bottom Test Plan: available on https://github.com/brave/browser-laptop/pull/9299#issue-234116287 --- .../components/navigation/navigationBar.js | 90 ++++---- .../components/navigation/navigator.js | 216 ++++++++++-------- .../components/navigation/publisherToggle.js | 69 +++--- app/renderer/components/navigation/urlBar.js | 136 ++++++----- test/bravery-components/braveryPanelTest.js | 2 +- .../components/navigation/navigatorTest.js | 4 +- 6 files changed, 277 insertions(+), 240 deletions(-) diff --git a/app/renderer/components/navigation/navigationBar.js b/app/renderer/components/navigation/navigationBar.js index edc257ce783..f140e844283 100644 --- a/app/renderer/components/navigation/navigationBar.js +++ b/app/renderer/components/navigation/navigationBar.js @@ -161,6 +161,41 @@ class NavigationBar extends React.Component { /> } + // BEM Level: navigator + get bookmarkButtonContainer () { + return +