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

Commit

Permalink
Add an option for no delay in tab preview timing
Browse files Browse the repository at this point in the history
closes #8860
  • Loading branch information
cezaraugusto authored and petemill committed Jan 24, 2018
1 parent f1ddefb commit d7aa04f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/common/constants/settingsEnums.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const bookmarksToolbarMode = {
}

const tabPreviewTiming = {
LONG: 2000,
NORMAL: 1000,
SHORT: 500
NONE: 50, // add a bit of delay to avoid flashing of unwanted previews
SHORT: 400,
LONG: 750
}

const tabCloseAction = {
Expand Down
3 changes: 2 additions & 1 deletion app/extensions/brave/locales/en-US/preferences.properties
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ newTabHomePage=Home page
newTabMode=A new tab shows
newTabNewTabPage=Dashboard
nextContribution=Next contribution:
none=None
nonVerifiedPublishers=Allow contributions to non-verified sites
noPaymentHistory=No previous contributions
normal=Normal
Expand Down Expand Up @@ -357,7 +358,7 @@ tabCloseActionLastActive=Select the last viewed tab
tabCloseActionNext=Select the next tab
tabCloseActionParent=Select its parent tab
tableEmptyText=No table data.
tabPreviewTiming=Time to wait before previewing a tab
tabPreviewTiming=Tab Preview Delay
tabs=Tabs
tabSettings=Tab Settings
tabsPerTabPage=Number of tabs per tab set:
Expand Down
12 changes: 6 additions & 6 deletions app/renderer/components/preferences/tabsTab.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ class TabsTab extends ImmutableComponent {
get tabPreviewTimingOptions () {
return [
{
id: 'long',
action: tabPreviewTiming.LONG
},
{
id: 'normal',
action: tabPreviewTiming.NORMAL
id: 'none',
action: tabPreviewTiming.NONE
},
{
id: 'short',
action: tabPreviewTiming.SHORT
},
{
id: 'long',
action: tabPreviewTiming.LONG
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions js/constants/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const isTest = process.env.NODE_ENV === 'test'

const buildConfig = require('./buildConfig')
const isProduction = buildConfig.nodeEnv === 'production'
const {fullscreenOption, autoplayOption} = require('../../app/common/constants/settingsEnums')
const {fullscreenOption, autoplayOption, tabPreviewTiming} = require('../../app/common/constants/settingsEnums')
const Channel = require('../../app/channel')

module.exports = {
Expand Down Expand Up @@ -153,7 +153,7 @@ module.exports = {
'tabs.tabs-per-page': 20,
'tabs.close-action': 'parent',
'tabs.show-tab-previews': true,
'tabs.preview-timing': 1000,
'tabs.preview-timing': tabPreviewTiming.SHORT,
'tabs.show-dashboard-images': true,
'privacy.history-suggestions': true,
'privacy.bookmark-suggestions': true,
Expand Down

0 comments on commit d7aa04f

Please sign in to comment.