Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Display message to indicate no selected source in Outline tab (#5266) (
Browse files Browse the repository at this point in the history
…#5506)

* Display message to indicate no selected source in Outline tab (#5266)

* Fix incorrect comment

* Use the positive conditional in the ternary
  • Loading branch information
Bilie authored and jasonLaster committed Mar 12, 2018
1 parent abf2574 commit 86b8095
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions assets/panel/debugger.properties
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ outline.header=Outline
# LOCALIZATION NOTE (outline.noFunctions): Outline text when there are no functions to display
outline.noFunctions=No functions

# LOCALIZATION NOTE (outline.noFileSelected): Outline text when there are no files selected
outline.noFileSelected=No file selected

# LOCALIZATION NOTE (sources.search): Sources left sidebar prompt
# e.g. Cmd+P to search. On a mac, we use the command unicode character.
# On windows, it's ctrl.
Expand Down
10 changes: 5 additions & 5 deletions src/components/PrimaryPanes/Outline.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ export class Outline extends Component<Props> {
}

renderPlaceholder() {
return (
<div className="outline-pane-info">
{L10N.getStr("outline.noFunctions")}
</div>
);
const placeholderMessage = this.props.selectedSource
? L10N.getStr("outline.noFunctions")
: L10N.getStr("outline.noFileSelected");

return <div className="outline-pane-info">{placeholderMessage}</div>;
}

renderFunction(func: SymbolDeclaration) {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3882,9 +3882,9 @@ eslint-plugin-jest@^21.5.0:
version "21.7.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.7.0.tgz#651f1c6ce999af3ac59ab8bf8a376d742fd0fc23"

[email protected]:
version "0.9.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-mozilla/-/eslint-plugin-mozilla-0.9.0.tgz#1c924e585b1a6272206e181b8e5522f0dd663cd0"
eslint-plugin-mozilla@^0.9.0:
version "0.9.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-mozilla/-/eslint-plugin-mozilla-0.9.1.tgz#af77cb5f9d2bc3a403c201c858902caacf8c1f7c"
dependencies:
ini-parser "0.0.2"
sax "1.2.4"
Expand Down

0 comments on commit 86b8095

Please sign in to comment.