Skip to content

Commit 79c6260

Browse files
Merge pull request #204 from SwiftFiddle/lookup
Rename Syntax to Lookup
2 parents 00d4a0a + 04bd99e commit 79c6260

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

Public/css/common.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ body {
3939
overflow: auto;
4040
}
4141

42-
#syntax-container {
42+
#lookup-container {
4343
font-family: Menlo, Consolas, "DejaVu Sans Mono", "Ubuntu Mono", monospace;
4444
font-size: 11pt;
4545
line-height: 1.4;
File renamed without changes.

Public/index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@
7878
</button>
7979
</li>
8080
<li class="nav-item lined" role="presentation">
81-
<button type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#syntax-tab-pane" role="tab"
82-
aria-controls="syntax-tab-pane" aria-selected="false"><span class="fa-light fa-file-code"></span><span
83-
class="px-3">Syntax</span>
81+
<button type="button" class="nav-link" data-bs-toggle="tab" data-bs-target="#lookup-tab-pane" role="tab"
82+
aria-controls="lookup-tab-pane" aria-selected="false"><span class="fa-light fa-file-code"></span><span
83+
class="px-3">Lookup</span>
8484
</button>
8585
</li>
8686
<li class="nav-item lined" role="presentation">
@@ -105,8 +105,8 @@
105105
tabindex="0">
106106
<div id="structure" class="" role="document"></div>
107107
</div>
108-
<div id="syntax-tab-pane" class="tab-pane" role="tabpanel" aria-labelledby="syntax-tab" tabindex="0">
109-
<div id="syntax-container" class="" role="document"></div>
108+
<div id="lookup-tab-pane" class="tab-pane" role="tabpanel" aria-labelledby="lookup-tab" tabindex="0">
109+
<div id="lookup-container" class="" role="document"></div>
110110
</div>
111111
<div id="statistics-tab-pane" class="tab-pane" role="tabpanel" aria-labelledby="statistics-tab"
112112
tabindex="0">

Public/js/app.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Tooltip } from "bootstrap";
44
import { Editor } from "./editor.js";
55
import { Balloon } from "./balloon.js";
66
import { StructureView } from "./structure_view.js";
7-
import { SyntaxView } from "./syntax_view.js";
7+
import { LoopupView } from "./lookup_view.js";
88
import { StatisticsView } from "./statistics_view.js";
99
import { WebSocketClient } from "./websocket.js";
1010
import { debounce } from "./debounce.js";
@@ -24,8 +24,8 @@ export class App {
2424
this.structureView = new StructureView(
2525
document.getElementById("structure")
2626
);
27-
this.syntaxView = new SyntaxView(
28-
document.getElementById("syntax-container")
27+
this.loopupView = new LoopupView(
28+
document.getElementById("lookup-container")
2929
);
3030
this.statisticsView = new StatisticsView(
3131
document.getElementById("statistics-container")
@@ -117,7 +117,7 @@ export class App {
117117
);
118118

119119
this.updateStructure(structureData);
120-
this.updateSyntaxMap(data.syntaxHTML);
120+
this.updateLookup(data.syntaxHTML);
121121

122122
const statistics = structureData
123123
.filter((node) => node.token === undefined)
@@ -136,7 +136,7 @@ export class App {
136136
})
137137
.catch((error) => {
138138
this.structureView.error = error;
139-
this.syntaxView.error = error;
139+
this.loopupView.error = error;
140140
this.statisticsView.error = error;
141141
})
142142
.finally(() => {
@@ -163,8 +163,8 @@ export class App {
163163
};
164164
}
165165

166-
updateSyntaxMap(syntaxHTML) {
167-
this.syntaxView.update(syntaxHTML);
166+
updateLookup(syntaxHTML) {
167+
this.loopupView.update(syntaxHTML);
168168
}
169169

170170
updateStatistics(statistics) {
@@ -185,7 +185,7 @@ export class App {
185185
this.editor.refresh();
186186

187187
document.getElementById("structure").style.height = this.contentViewHeight;
188-
document.getElementById("syntax-container").style.height =
188+
document.getElementById("lookup-container").style.height =
189189
this.contentViewHeight;
190190
document.getElementById("statistics-container").style.height =
191191
this.contentViewHeight;

Public/js/syntax_view.js renamed to Public/js/lookup_view.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
"use strict";
22

33
import { Popover } from "./popover.js";
4-
import "../css/syntax.css";
4+
import "../css/lookup.css";
55

6-
export class SyntaxView {
6+
export class LoopupView {
77
set error(error) {
88
this.container.innerHTML = `<div class="alert alert-danger m-3" role="alert">${error}</div>`;
99
}

0 commit comments

Comments
 (0)