зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1751851 - [devtools] Migrate all ui selectors to a selector module. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D136862
This commit is contained in:
Родитель
47cee65f87
Коммит
bea7ff1402
|
@ -131,63 +131,4 @@ function update(state = initialUIState(), action) {
|
|||
}
|
||||
}
|
||||
|
||||
// NOTE: we'd like to have the app state fully typed
|
||||
// https://github.com/firefox-devtools/debugger/blob/master/src/reducers/sources.js#L179-L185
|
||||
|
||||
export function getSelectedPrimaryPaneTab(state) {
|
||||
return state.ui.selectedPrimaryPaneTab;
|
||||
}
|
||||
|
||||
export function getActiveSearch(state) {
|
||||
return state.ui.activeSearch;
|
||||
}
|
||||
|
||||
export function getFrameworkGroupingState(state) {
|
||||
return state.ui.frameworkGroupingOn;
|
||||
}
|
||||
|
||||
export function getShownSource(state) {
|
||||
return state.ui.shownSource;
|
||||
}
|
||||
|
||||
export function getPaneCollapse(state, position) {
|
||||
if (position == "start") {
|
||||
return state.ui.startPanelCollapsed;
|
||||
}
|
||||
|
||||
return state.ui.endPanelCollapsed;
|
||||
}
|
||||
|
||||
export function getHighlightedLineRange(state) {
|
||||
return state.ui.highlightedLineRange;
|
||||
}
|
||||
|
||||
export function getConditionalPanelLocation(state) {
|
||||
return state.ui.conditionalPanelLocation;
|
||||
}
|
||||
|
||||
export function getLogPointStatus(state) {
|
||||
return state.ui.isLogPoint;
|
||||
}
|
||||
|
||||
export function getOrientation(state) {
|
||||
return state.ui.orientation;
|
||||
}
|
||||
|
||||
export function getViewport(state) {
|
||||
return state.ui.viewport;
|
||||
}
|
||||
|
||||
export function getCursorPosition(state) {
|
||||
return state.ui.cursorPosition;
|
||||
}
|
||||
|
||||
export function getInlinePreview(state) {
|
||||
return state.ui.inlinePreviewEnabled;
|
||||
}
|
||||
|
||||
export function getEditorWrapping(state) {
|
||||
return state.ui.editorWrappingEnabled;
|
||||
}
|
||||
|
||||
export default update;
|
||||
|
|
|
@ -9,7 +9,6 @@ export * from "../reducers/pause";
|
|||
export * from "../reducers/threads";
|
||||
export * from "../reducers/breakpoints";
|
||||
export * from "../reducers/pending-breakpoints";
|
||||
export * from "../reducers/ui";
|
||||
|
||||
export {
|
||||
getSourceActor,
|
||||
|
@ -44,6 +43,7 @@ export * from "./quick-open";
|
|||
export * from "./source-tree";
|
||||
export * from "./tabs";
|
||||
export * from "./threads";
|
||||
export * from "./ui";
|
||||
export {
|
||||
getVisibleBreakpoints,
|
||||
getFirstVisibleBreakpoints,
|
||||
|
|
|
@ -26,4 +26,5 @@ CompiledModules(
|
|||
"threads.js",
|
||||
"visibleBreakpoints.js",
|
||||
"visibleColumnBreakpoints.js",
|
||||
"ui.js",
|
||||
)
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
|
||||
export function getSelectedPrimaryPaneTab(state) {
|
||||
return state.ui.selectedPrimaryPaneTab;
|
||||
}
|
||||
|
||||
export function getActiveSearch(state) {
|
||||
return state.ui.activeSearch;
|
||||
}
|
||||
|
||||
export function getFrameworkGroupingState(state) {
|
||||
return state.ui.frameworkGroupingOn;
|
||||
}
|
||||
|
||||
export function getShownSource(state) {
|
||||
return state.ui.shownSource;
|
||||
}
|
||||
|
||||
export function getPaneCollapse(state, position) {
|
||||
if (position == "start") {
|
||||
return state.ui.startPanelCollapsed;
|
||||
}
|
||||
|
||||
return state.ui.endPanelCollapsed;
|
||||
}
|
||||
|
||||
export function getHighlightedLineRange(state) {
|
||||
return state.ui.highlightedLineRange;
|
||||
}
|
||||
|
||||
export function getConditionalPanelLocation(state) {
|
||||
return state.ui.conditionalPanelLocation;
|
||||
}
|
||||
|
||||
export function getLogPointStatus(state) {
|
||||
return state.ui.isLogPoint;
|
||||
}
|
||||
|
||||
export function getOrientation(state) {
|
||||
return state.ui.orientation;
|
||||
}
|
||||
|
||||
export function getViewport(state) {
|
||||
return state.ui.viewport;
|
||||
}
|
||||
|
||||
export function getCursorPosition(state) {
|
||||
return state.ui.cursorPosition;
|
||||
}
|
||||
|
||||
export function getInlinePreview(state) {
|
||||
return state.ui.inlinePreviewEnabled;
|
||||
}
|
||||
|
||||
export function getEditorWrapping(state) {
|
||||
return state.ui.editorWrappingEnabled;
|
||||
}
|
Загрузка…
Ссылка в новой задаче