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

Add "wide URL bar" option #8714

Merged
merged 1 commit into from
May 19, 2017
Merged

Add "wide URL bar" option #8714

merged 1 commit into from
May 19, 2017

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented May 5, 2017

Fix #8421

Auditors:

Test Plan 1:

  1. Clear the browser profile
  2. Open the browser
  3. Open about:preferences#general
  4. Make sure "Use wide URL bar" is disabled
  5. Enable the option
  6. Make sure the URL bar fills the margin around itself

Test Plan 2:

  1. Open about:preferences#advanced
  2. Enable/disable 'Always show the URL bar'
  3. Make sure the setting is applied

Test Plan 3:

  1. Open about:preferences#extensions
  2. Enable LastPass extension
  3. Make sure there is margin between the URL bar and the extension's icon

Test Plan 4:

  1. Minimize the window's width
  2. Make sure there does not appear extraDragArea between the URL bar and the extension's icon

Test Plan 5:

  1. Open about:preferences#general
  2. Change the window width from 600 px to 599 px
  3. Make sure the URL bar width does not change greatly
  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).

@@ -325,6 +325,7 @@ alwaysDeny=Always deny
alwaysAsk=Always ask
autoHideMenuBar=Hide the menu bar by default
disableTitleMode=Always show the URL bar
wideURLbar=Use wide URL bar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually am not sure if it sounds native. Should it be rather something like Maximize the URL bar or Make the URL bar wide, etc?

Copy link
Member

Choose a reason for hiding this comment

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

@luixxiul I think that's a good name 😄

Other names might be too complex, like "Have URL bar fill entire width" (which sounds confusing)

@alexwykoff alexwykoff modified the milestones: 0.15.4, 0.15.3 May 5, 2017
@luixxiul luixxiul modified the milestones: 0.15.3, 0.15.4 May 5, 2017
@luixxiul luixxiul modified the milestones: 0.15.3, 0.15.4 May 7, 2017
@bbondy bbondy modified the milestones: 0.15.4, 0.15.3 May 8, 2017
@cezaraugusto
Copy link
Contributor

cezaraugusto commented May 16, 2017

code looks good but I'm not sure if we want the UI as-is. Mind adding this commit to a branch in the main repo so @bradleyrichter can check it out? some screenshots might help as well

@luixxiul
Copy link
Contributor Author

luixxiul commented May 16, 2017

np I'll upload gif later.

also:

git fetch upstream pull/8714/head:wideURLbar
git checkout wideURLbar

@luixxiul
Copy link
Contributor Author

also it looks some media queries are working around 600px on about:preferences.

wideurlbar

it does not happen with normal pages.

@luixxiul
Copy link
Contributor Author

#8421 (comment)

yes, default should be as is to allow for easier window dragging so please add a pref in about:preferences#advanced.

It is disabled by default. cf: https://github.com/brave/browser-laptop/pull/8714/files#diff-18a136e10fa10b96b0c7256285b87f95R134

@luixxiul
Copy link
Contributor Author

Also I found the fix for the issue above. I'll push another commit.

@luixxiul
Copy link
Contributor Author

luixxiul commented May 16, 2017

For @bradleyrichter:

wideurlbar

@luixxiul
Copy link
Contributor Author

ready for re-review.

@@ -167,6 +168,8 @@ class NavigationBar extends React.Component {
}

render () {
const wideURLbar = getSetting(settings.WIDE_URL_BAR)
Copy link
Contributor

Choose a reason for hiding this comment

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

All variables that are used in renderer needs to be defined in mergeProps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed with 9edeee4

Copy link
Contributor

Choose a reason for hiding this comment

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

perfect thank you

@@ -483,9 +483,12 @@ class UrlBar extends React.Component {
}

render () {
const wideURLbar = getSetting(settings.WIDE_URL_BAR)
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed with 9edeee4

@bradleyrichter
Copy link
Contributor

I only see one change needed for this PR:

Let's move both URL bar options from general prefs to advanced prefs. General is becoming heavy and should be reserved for the most basic options rather than overrides.

image

@luixxiul
Copy link
Contributor Author

OK I'll address that.

@luixxiul
Copy link
Contributor Author

Updated.

@@ -183,7 +183,8 @@ AppStore
'extensions.pocket.enabled': boolean, // true if pocket is enabled
'extensions.vimium.enabled': boolean, // true if vimium is enabled
'general.autohide-menu': boolean, // true if the Windows menu should be autohidden
'general.bookmarks-toolbar-mode': boolean, // true to show bookmakrs toolbar
'general.wide-url-bar': boolean, // true to use wide URL bar
'general.bookmarks-toolbar-mode': boolean, // true to show bookmarks toolbar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just fixed typo

Fix #8421

Auditors:

Test Plan 1:
1. Clear the browser profile
2. Open the browser
3. Open about:preferences#general
4. Make sure "Use wide URL bar" is disabled
5. Enable the option
6. Make sure the URL bar fills the margin around itself

Test Plan 2:
1. Open about:preferences#advanced
2. Enable/disable 'Always show the URL bar'
3. Make sure the setting is applied

Test Plan 3:
1. Open about:preferences#extensions
2. Enable LastPass extension
3. Make sure there is margin between the URL bar and the extension's icon

Test Plan 4:
1. Minimize the window's width
2. Make sure there does not appear extraDragArea between the URL bar and the extension's icon

Test Plan 5:
1. Open about:preferences#general
2. Change the window width from 600 px to 599 px
3. Make sure the URL bar width does not change greatly
@luixxiul
Copy link
Contributor Author

Since the issue has been addressed, I'm going to merge this. Let's address other issues if any with follow-ups.

@luixxiul luixxiul merged commit 1362dbc into brave:master May 19, 2017
@luixxiul luixxiul deleted the navigationBar-wide-url-bar branch May 19, 2017 16:50
@bsclifton
Copy link
Member

Great job, @luixxiul! This looks amazing. I'll definitely be using it 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants