Skip to content

Commit 300c913

Browse files
committed
Default ?omnibar to true
1 parent 025c91b commit 300c913

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

special-pages/pages/new-tab/app/mock-transport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ export function initialSetup(url) {
586586
widgetsFromStorage.push({ id: 'protections' });
587587
widgetConfigFromStorage.push({ id: 'protections', visibility: 'visible' });
588588

589-
if (url.searchParams.has('omnibar')) {
589+
if (url.searchParams.get('omnibar') !== 'false') {
590590
const favoritesWidgetIndex = widgetsFromStorage.findIndex((widget) => widget.id === 'favorites') ?? 0;
591591
widgetsFromStorage.splice(favoritesWidgetIndex, 0, { id: 'omnibar' });
592592
const favoritesWidgetConfigIndex = widgetConfigFromStorage.findIndex((widget) => widget.id === 'favorites') ?? 0;

special-pages/pages/new-tab/integration-tests/new-tab.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ test.describe('newtab widgets', () => {
2727
context: 'specialPages',
2828
featureName: 'newTabPage',
2929
params: [
30+
{ id: 'omnibar', visibility: 'visible' },
3031
{ id: 'favorites', visibility: 'visible' },
3132
{ id: 'protections', visibility: 'hidden' },
3233
],
@@ -60,6 +61,7 @@ test.describe('newtab widgets', () => {
6061
context: 'specialPages',
6162
featureName: 'newTabPage',
6263
params: [
64+
{ id: 'omnibar', visibility: 'visible' },
6365
{ id: 'favorites', visibility: 'visible' },
6466
{ id: 'protections', visibility: 'visible' },
6567
],
@@ -85,6 +87,10 @@ test.describe('newtab widgets', () => {
8587
method: 'contextMenu',
8688
params: {
8789
visibilityMenuItems: [
90+
{
91+
id: 'omnibar',
92+
title: 'Search',
93+
},
8894
{
8995
id: 'favorites',
9096
title: 'Favorites',

0 commit comments

Comments
 (0)