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

Commit d7aa04f

Browse files
cezaraugustopetemill
authored andcommitted
Add an option for no delay in tab preview timing
closes #8860
1 parent f1ddefb commit d7aa04f

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

app/common/constants/settingsEnums.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ const bookmarksToolbarMode = {
2222
}
2323

2424
const tabPreviewTiming = {
25-
LONG: 2000,
26-
NORMAL: 1000,
27-
SHORT: 500
25+
NONE: 50, // add a bit of delay to avoid flashing of unwanted previews
26+
SHORT: 400,
27+
LONG: 750
2828
}
2929

3030
const tabCloseAction = {

app/extensions/brave/locales/en-US/preferences.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ newTabHomePage=Home page
197197
newTabMode=A new tab shows
198198
newTabNewTabPage=Dashboard
199199
nextContribution=Next contribution:
200+
none=None
200201
nonVerifiedPublishers=Allow contributions to non-verified sites
201202
noPaymentHistory=No previous contributions
202203
normal=Normal
@@ -357,7 +358,7 @@ tabCloseActionLastActive=Select the last viewed tab
357358
tabCloseActionNext=Select the next tab
358359
tabCloseActionParent=Select its parent tab
359360
tableEmptyText=No table data.
360-
tabPreviewTiming=Time to wait before previewing a tab
361+
tabPreviewTiming=Tab Preview Delay
361362
tabs=Tabs
362363
tabSettings=Tab Settings
363364
tabsPerTabPage=Number of tabs per tab set:

app/renderer/components/preferences/tabsTab.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ class TabsTab extends ImmutableComponent {
3939
get tabPreviewTimingOptions () {
4040
return [
4141
{
42-
id: 'long',
43-
action: tabPreviewTiming.LONG
44-
},
45-
{
46-
id: 'normal',
47-
action: tabPreviewTiming.NORMAL
42+
id: 'none',
43+
action: tabPreviewTiming.NONE
4844
},
4945
{
5046
id: 'short',
5147
action: tabPreviewTiming.SHORT
48+
},
49+
{
50+
id: 'long',
51+
action: tabPreviewTiming.LONG
5252
}
5353
]
5454
}

js/constants/appConfig.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const isTest = process.env.NODE_ENV === 'test'
1212

1313
const buildConfig = require('./buildConfig')
1414
const isProduction = buildConfig.nodeEnv === 'production'
15-
const {fullscreenOption, autoplayOption} = require('../../app/common/constants/settingsEnums')
15+
const {fullscreenOption, autoplayOption, tabPreviewTiming} = require('../../app/common/constants/settingsEnums')
1616
const Channel = require('../../app/channel')
1717

1818
module.exports = {
@@ -153,7 +153,7 @@ module.exports = {
153153
'tabs.tabs-per-page': 20,
154154
'tabs.close-action': 'parent',
155155
'tabs.show-tab-previews': true,
156-
'tabs.preview-timing': 1000,
156+
'tabs.preview-timing': tabPreviewTiming.SHORT,
157157
'tabs.show-dashboard-images': true,
158158
'privacy.history-suggestions': true,
159159
'privacy.bookmark-suggestions': true,

0 commit comments

Comments
 (0)