Skip to content

Commit d2dbf6b

Browse files
darkwingjasonLaster
authored andcommitted
Allow 'Reveal in Tree' for pretty tabs (firefox-devtools#5483)
1 parent db9c698 commit d2dbf6b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

src/actions/ui.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import { getSource, getActiveSearch, getPaneCollapse } from "../selectors";
88
import { getProjectDirectoryRoot } from "../reducers/ui";
99
import type { ThunkArgs, panelPositionType } from "./types";
10+
import { getRawSourceURL } from "../utils/source";
1011

1112
import type {
1213
ActiveSearchType,
@@ -66,7 +67,7 @@ export function showSource(sourceId: string) {
6667

6768
dispatch({
6869
type: "SHOW_SOURCE",
69-
sourceUrl: source.get("url")
70+
sourceUrl: getRawSourceURL(source.get("url"))
7071
});
7172
};
7273
}

src/components/Editor/EditorMenu.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function getMenuItems(
140140
id: "node-menu-show-source",
141141
label: revealInTreeLabel,
142142
accesskey: revealInTreeKey,
143-
disabled: isPrettyPrinted,
143+
disabled: false,
144144
click: () => showSource(sourceId)
145145
};
146146

src/components/Editor/Tab.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ class Tab extends PureComponent<Props> {
114114
}
115115
];
116116

117-
if (!isPrettySource) {
118-
items.push({
119-
item: { ...tabMenuItems.showSource, click: () => showSource(tab) }
120-
});
117+
items.push({
118+
item: { ...tabMenuItems.showSource, click: () => showSource(tab) }
119+
});
121120

121+
if (!isPrettySource) {
122122
items.push({
123123
item: {
124124
...tabMenuItems.prettyPrint,

0 commit comments

Comments
 (0)