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

Updated General Preferences #4640

Merged
merged 1 commit into from
Oct 17, 2016
Merged

Updated General Preferences #4640

merged 1 commit into from
Oct 17, 2016

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Oct 8, 2016

  • 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).

Updated General Preferences

  • Show home button now disables itself when home page is cleared (null/empty)
  • Removed appearance settings; moved to under "My home page is" per the mockup on General Settings: "My home page is" setting #2108
  • Bookmarks toolbar switches were changed into a single drop down
  • Small refactor done to settings.js (with regards to default settings)

Unit tests are in place and working + I've manually at least two of the scenarios outlined in the attached steps

Fixes #2108
Fixes #3008
Fixes #2111
Possibly fixes #3544 (auditor discretion)

Auditors

@bbondy, @ayumi, @cezaraugusto - small changes EXCEPT the new config value for BTB. This only had two touchpoints (main.js, contextMenus.js) versus the password manager changes

@BrendanEich - you had previously reviewed the settings code; LMK how the changes in ./js/settings.js look

Upgrade test plan

  1. Install a previous version of Brave (0.12.4 or older); ENABLE favicons and ENABLE show only favicons
  2. Upgrade to this version (0.12.5?). Confirm it consolidates preference to "Favicons only" in preferences drop down
  3. Install a previous version of Brave (0.12.4 or older); ENABLE favicons but DISABLE show only favicons
  4. Upgrade to this version (0.12.5?). Confirm it consolidates preference to "Text and Favicons" in preferences drop down
  5. Install a previous version of Brave (0.12.4 or older); DISABLE favicons and DISABLE show only favicons
  6. Upgrade to this version (0.12.5?). Confirm it consolidates preference to "Text only" in preferences drop down
  7. Uninstall Brave completely; move session file out of the way

Regular test plan

consolidation of bookmarks toolbar settings

  1. Install a clean version of Brave (0.12.5?)
  2. Launch preferences, confirm preference defaults to "Text only"
  3. Confirm no favicons show (only text):
    • at the root level of the bookmarks toolbar
    • when expanding a folder inside the bookmarks toolbar
  4. Repeat step 2/3 for the other two settings. NOTE: show only favicon does not apply to items inside bookmark folders

bookmark toolbar enable/disable change

  1. Go to preferences and toggle "Always show the bookmarks toolbar"
  2. If disabled, notice how drop down is now disabled too (not allowing you to change)
  3. When enabled, notice how drop down is re-enabled

disabling of show home button

  1. Set your home page to brave.com and enable "show home button"
  2. Erase out the value in home page and confirm "show home button" is:
    • is turned off
    • disabled completely (not clickable)
  3. Type a non-whitespace character or characters into home page box
  4. Confirm the "show home button" is clickable again

overall general settings tab

  1. Ensure screen matches corresponding parts of mockup shown in General Settings: "My home page is" setting #2108
  2. Ensure screen matches corresponding parts of mockup shown in General Settings: "Bookmarks Bar" setting #2111

Screenshots

cc: @bradleyrichter

Before
screen shot 2016-10-08 at 2 31 34 pm

After
screen shot 2016-10-08 at 2 31 54 pm

@bradleyrichter
Copy link
Contributor

yeah. thanks!

@bsclifton
Copy link
Member Author

rebased and ready for review 😄

@bsclifton
Copy link
Member Author

bsclifton commented Oct 10, 2016

Look after review w/ Brad

screen shot 2016-10-10 at 4 53 13 pm

Search screen was tweaked also:

  • padding so that text in columns line up w/ header
  • decreased size of "default" column
    screen shot 2016-10-10 at 4 47 34 pm

@cezaraugusto
Copy link
Contributor

great job here, looks good to me ++

(+1 for disabling "show home button.." when field is empty)

@jkup
Copy link
Contributor

jkup commented Oct 13, 2016

👍 Code looks great. Is there any reason to keep those three strings in bookmarksToolbarMode.js as opposed to just inlining them?

@bsclifton
Copy link
Member Author

@jkup yes- there are a few other places it's used (main.js for example, for determining if whethere or not to show favicon). It's nice to be able to do a require and then use the constant like an enum (in case we change the underlying value) 😄

- Show home button now disables itself when home page is cleared (null/empty)
- Removed appearance settings; moved to under "My home page is" per the mockup on #2108
- Bookmarks toolbar switches were changed into a single drop down

Unit tests are in place and working + I've manually at least two of the scenarios outlined in the attached steps

Fixes #2108
Fixes #3008
Fixes #2111
Possibly fixes #3544

Auditors:
@BrendanEich - you had previously reviewed the settings code; LMK how the changes in `./js/settings.js` look
@bbondy - small changes EXCEPT the new config value for BTB. This only had two touchpoints (main.js, contextMenus.js) versus the password manager changes

Tweaks made per review w/ Brad. Includes:
- reducing space between label and field in preferences
- the lone toggle switch was pulled over to the left
- import button is moved up
- import button area is no longer a separate grouping

Upgrade test plan:
1. Install a previous version of Brave (0.12.4 or older); ENABLE favicons and ENABLE show only favicons
2. Upgrade to this version (0.12.5?). Confirm it consolidates preference to "Favicons only" in preferences drop down
3. Install a previous version of Brave (0.12.4 or older); ENABLE favicons but DISABLE show only favicons
4. Upgrade to this version (0.12.5?). Confirm it consolidates preference to "Text and Favicons" in preferences drop down
5. Install a previous version of Brave (0.12.4 or older); DISABLE favicons and DISABLE show only favicons
6. Upgrade to this version (0.12.5?). Confirm it consolidates preference to "Text only" in preferences drop down
7. Uninstall Brave completely; move session file out of the way

Regular test plan:
** consolidation of bookmarks toolbar settings**
1. Install a clean version of Brave (0.12.5?)
2. Launch preferences, confirm preference defaults to "Text only"
3. Confirm no favicons show (only text):
  - at the root level of the  bookmarks toolbar
  - when expanding a folder inside the bookmarks toolbar
4. Repeat step 2/3 for the other two settings. NOTE: show only favicon does not apply to items inside bookmark folders

** bookmark toolbar enable/disable change **
5. Go to preferences and toggle "Always show the bookmarks toolbar"
6. If disabled, notice how drop down is now disabled too (not allowing you to change)
7. When enabled, notice how drop down is re-enabled

** disabling of show home button **
8. Set your home page to brave.com and enable "show home button"
9. Erase out the value in home page and confirm "show home button" is:
  - is turned off
  - disabled completely (not clickable)
10. Type a non-whitespace character or characters into home page box
11. Confirm the "show home button" is clickable again

** overall general settings tab **
12. Ensure screen matches corresponding parts of mockup shown in #2108
13. Ensure screen matches corresponding parts of mockup shown in #2111
@bsclifton
Copy link
Member Author

Rebased to fix conflict. I'll go ahead and merge this one, making sure to leave #3544 open as no feedback was received regarding those changes

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