Skip to content

Commit 8907898

Browse files
author
Irene Ni
committed
Bug 1922398 - Fix New Tab Customize button focus order. r=home-newtab-reviewers,nbarrett,ayeddi
Differential Revision: https://phabricator.services.mozilla.com/D268147
1 parent 13a0928 commit 8907898

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

browser/extensions/newtab/content-src/components/Base/Base.jsx

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -779,36 +779,6 @@ export class BaseContent extends React.PureComponent {
779779

780780
return (
781781
<div className={featureClassName}>
782-
{/* Floating menu for customize menu toggle */}
783-
<menu className="personalizeButtonWrapper">
784-
<CustomizeMenu
785-
onClose={this.closeCustomizationMenu}
786-
onOpen={this.openCustomizationMenu}
787-
openPreferences={this.openPreferences}
788-
setPref={this.setPref}
789-
enabledSections={enabledSections}
790-
enabledWidgets={enabledWidgets}
791-
wallpapersEnabled={wallpapersEnabled}
792-
activeWallpaper={activeWallpaper}
793-
pocketRegion={pocketRegion}
794-
mayHaveTopicSections={mayHavePersonalizedTopicSections}
795-
mayHaveInferredPersonalization={mayHaveInferredPersonalization}
796-
mayHaveWeather={mayHaveWeather}
797-
mayHaveTrendingSearch={mayHaveTrendingSearch}
798-
mayHaveWidgets={mayHaveWidgets}
799-
mayHaveTimerWidget={mayHaveTimerWidget}
800-
mayHaveListsWidget={mayHaveListsWidget}
801-
showing={customizeMenuVisible}
802-
/>
803-
{this.shouldShowOMCHighlight("CustomWallpaperHighlight") && (
804-
<MessageWrapper dispatch={this.props.dispatch}>
805-
<WallpaperFeatureHighlight
806-
position="inset-block-start inset-inline-start"
807-
dispatch={this.props.dispatch}
808-
/>
809-
</MessageWrapper>
810-
)}
811-
</menu>
812782
<div className="weatherWrapper">
813783
{shouldDisplayWeather && (
814784
<ErrorBoundary>
@@ -887,6 +857,36 @@ export class BaseContent extends React.PureComponent {
887857
<TopicSelection supportUrl={supportUrl} />
888858
)}
889859
</div>
860+
{/* Floating menu for customize menu toggle */}
861+
<menu className="personalizeButtonWrapper">
862+
<CustomizeMenu
863+
onClose={this.closeCustomizationMenu}
864+
onOpen={this.openCustomizationMenu}
865+
openPreferences={this.openPreferences}
866+
setPref={this.setPref}
867+
enabledSections={enabledSections}
868+
enabledWidgets={enabledWidgets}
869+
wallpapersEnabled={wallpapersEnabled}
870+
activeWallpaper={activeWallpaper}
871+
pocketRegion={pocketRegion}
872+
mayHaveTopicSections={mayHavePersonalizedTopicSections}
873+
mayHaveInferredPersonalization={mayHaveInferredPersonalization}
874+
mayHaveWeather={mayHaveWeather}
875+
mayHaveTrendingSearch={mayHaveTrendingSearch}
876+
mayHaveWidgets={mayHaveWidgets}
877+
mayHaveTimerWidget={mayHaveTimerWidget}
878+
mayHaveListsWidget={mayHaveListsWidget}
879+
showing={customizeMenuVisible}
880+
/>
881+
{this.shouldShowOMCHighlight("CustomWallpaperHighlight") && (
882+
<MessageWrapper dispatch={this.props.dispatch}>
883+
<WallpaperFeatureHighlight
884+
position="inset-block-start inset-inline-start"
885+
dispatch={this.props.dispatch}
886+
/>
887+
</MessageWrapper>
888+
)}
889+
</menu>
890890
</div>
891891
);
892892
}

browser/extensions/newtab/data/content/activity-stream.bundle.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16746,32 +16746,7 @@ class BaseContent extends (external_React_default()).PureComponent {
1674616746
const shouldShowDownloadHighlight = this.state.showDownloadHighlightOverride ?? this.shouldShowOMCHighlight("DownloadMobilePromoHighlight");
1674716747
return /*#__PURE__*/external_React_default().createElement("div", {
1674816748
className: featureClassName
16749-
}, /*#__PURE__*/external_React_default().createElement("menu", {
16750-
className: "personalizeButtonWrapper"
16751-
}, /*#__PURE__*/external_React_default().createElement(CustomizeMenu, {
16752-
onClose: this.closeCustomizationMenu,
16753-
onOpen: this.openCustomizationMenu,
16754-
openPreferences: this.openPreferences,
16755-
setPref: this.setPref,
16756-
enabledSections: enabledSections,
16757-
enabledWidgets: enabledWidgets,
16758-
wallpapersEnabled: wallpapersEnabled,
16759-
activeWallpaper: activeWallpaper,
16760-
pocketRegion: pocketRegion,
16761-
mayHaveTopicSections: mayHavePersonalizedTopicSections,
16762-
mayHaveInferredPersonalization: mayHaveInferredPersonalization,
16763-
mayHaveWeather: mayHaveWeather,
16764-
mayHaveTrendingSearch: mayHaveTrendingSearch,
16765-
mayHaveWidgets: mayHaveWidgets,
16766-
mayHaveTimerWidget: mayHaveTimerWidget,
16767-
mayHaveListsWidget: mayHaveListsWidget,
16768-
showing: customizeMenuVisible
16769-
}), this.shouldShowOMCHighlight("CustomWallpaperHighlight") && /*#__PURE__*/external_React_default().createElement(MessageWrapper, {
16770-
dispatch: this.props.dispatch
16771-
}, /*#__PURE__*/external_React_default().createElement(WallpaperFeatureHighlight, {
16772-
position: "inset-block-start inset-inline-start",
16773-
dispatch: this.props.dispatch
16774-
}))), /*#__PURE__*/external_React_default().createElement("div", {
16749+
}, /*#__PURE__*/external_React_default().createElement("div", {
1677516750
className: "weatherWrapper"
1677616751
}, shouldDisplayWeather && /*#__PURE__*/external_React_default().createElement(ErrorBoundary, null, /*#__PURE__*/external_React_default().createElement(Weather_Weather, null))), /*#__PURE__*/external_React_default().createElement("div", {
1677716752
className: `mobileDownloadPromoWrapper ${mobileDownloadPromoWrapperHeightModifier}`
@@ -16808,7 +16783,32 @@ class BaseContent extends (external_React_default()).PureComponent {
1680816783
dispatch: this.props.dispatch
1680916784
}))), mayShowTopicSelection && pocketEnabled && /*#__PURE__*/external_React_default().createElement(TopicSelection, {
1681016785
supportUrl: supportUrl
16811-
})));
16786+
})), /*#__PURE__*/external_React_default().createElement("menu", {
16787+
className: "personalizeButtonWrapper"
16788+
}, /*#__PURE__*/external_React_default().createElement(CustomizeMenu, {
16789+
onClose: this.closeCustomizationMenu,
16790+
onOpen: this.openCustomizationMenu,
16791+
openPreferences: this.openPreferences,
16792+
setPref: this.setPref,
16793+
enabledSections: enabledSections,
16794+
enabledWidgets: enabledWidgets,
16795+
wallpapersEnabled: wallpapersEnabled,
16796+
activeWallpaper: activeWallpaper,
16797+
pocketRegion: pocketRegion,
16798+
mayHaveTopicSections: mayHavePersonalizedTopicSections,
16799+
mayHaveInferredPersonalization: mayHaveInferredPersonalization,
16800+
mayHaveWeather: mayHaveWeather,
16801+
mayHaveTrendingSearch: mayHaveTrendingSearch,
16802+
mayHaveWidgets: mayHaveWidgets,
16803+
mayHaveTimerWidget: mayHaveTimerWidget,
16804+
mayHaveListsWidget: mayHaveListsWidget,
16805+
showing: customizeMenuVisible
16806+
}), this.shouldShowOMCHighlight("CustomWallpaperHighlight") && /*#__PURE__*/external_React_default().createElement(MessageWrapper, {
16807+
dispatch: this.props.dispatch
16808+
}, /*#__PURE__*/external_React_default().createElement(WallpaperFeatureHighlight, {
16809+
position: "inset-block-start inset-inline-start",
16810+
dispatch: this.props.dispatch
16811+
}))));
1681216812
}
1681316813
}
1681416814
BaseContent.defaultProps = {

0 commit comments

Comments
 (0)