Skip to content

Commit

Permalink
History Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
claytoncarney committed Sep 25, 2020
1 parent 9961436 commit b005784
Show file tree
Hide file tree
Showing 14 changed files with 301 additions and 590 deletions.
402 changes: 121 additions & 281 deletions bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion help/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>KJS</h1>
<p>ALL the power belongs to My King! The glory is all His.</p>
<p>"Heaven and earth shall pass away, but my words shall not pass away."</p>
<h1>Version</h1>
<p>2020.07.15</p>
<p>2020.09.25</p>
<p>The application supports Android, Linux, or Windows platforms with the latest version of Google Chrome.</p>
<p>It should also support the latest version of Safari, but has not been extensively tested on Mac/iOS platforms.</p>
<h1>Contact</h1>
Expand Down
2 changes: 1 addition & 1 deletion help/overview.html
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ <h1>Layout And Icons</h1>
</li>
</ul>
<h1>Action Menus</h1>
<p>The List, Folder, and History task panes provide for additional actions on individual entries via an Action Menu.</p>
<p>The List and Folder task panes provide for additional actions on individual entries via an Action Menu.</p>
<p>Tap the Menu button to open the Action Menu for that entry:</p>
<div class="entry entry--icon">
<div class="icon-description">Menu</div>
Expand Down
24 changes: 22 additions & 2 deletions help/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,26 @@ <h3>History Pane</h3>
<p>The History pane displays a list of previous queries.</p>
<p>Tap an history entry to set the Active Query.</p>
<p>The Active Filter is reset to Tome and the Result pane is opened.</p>
<p>The history list is managed via their Action Menu. Tap the Menu button to open the Action Menu. You may reorder or delete entries as desired.</p>
<p>To remove all history entries, tap the Clear History button.</p>
<p>To remove an history entry, tap the Delete button:</p>
<div class="entry entry--icon">
<div class="icon-description">Delete</div>
<div class="icon-holder">
<svg class="icon-svg">
<title>Delete</title>
<use class="icon-holder__use icon-holder__use--down" xlink:href="icons.svg#delete"></use>
</svg>
</div>
</div>
<br>
<p>To remove all history entries, tap the Clear History button in the lower toolbar:</p>
<div class="entry entry--icon">
<div class="icon-description">Clear History</div>
<div class="icon-holder">
<svg class="icon-svg">
<title>Clear History</title>
<use class="icon-holder__use icon-holder__use--down" xlink:href="icons.svg#history-clear"></use>
</svg>
</div>
</div>
<br>
</div>
50 changes: 30 additions & 20 deletions help/strong.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,44 +18,54 @@ <h3>Dictionary Entry</h3>
<li>Definition: Statement of the meaning of the word (or phrase), including variations and idioms.</li>
</ul>
<p>The definition statement may contain references to related Strong Numbers. Tap on a number to open the Definition pane for that number.</p>
<h3>Strong Chain</h3>
<p>Selecting related Strong Numbers creates a definition chain. This button in the lower toolbar traverses back up the chain:</p>
<div class="entry entry--icon">
<div class="icon-description">Previous</div>
<div class="icon-holder">
<svg class="icon-svg">
<title>Previous</title>
<use class="icon-holder__use icon-holder__use--prev" xlink:href="icons.svg#prev"></use>
</svg>
</div>
</div>
<h3>Strong Word Summary</h3>
<p>The summary presents a list of the different translated words (Strong Words) found in the KJV.</p>
<p>The word summary is represented in the form: word (word count/verse count).</p>
<p>Three special word symbols are used as appropriate. The symbol '*' is used for all translated words combined. The symbol '+' is used where multiple Strong Numbers are associated with a translated word (viz. a phrase). The symbol '-' is used where no translated word is associated with the Strong Number.</p>
<p>Tap on a word to set the Strong Word. The Strong Word is highlighted. The Result pane is filtered to display only that word.</p>
<p>When a new Strong Number is selected, the Strong Word is reset to '*' (all) or to the unique word, as appropriate.</p>
<h3>History Selection</h3>
<p>These buttons in the upper toolbar provide rapid navigation of Strong Number History:</p>
<hr>
<p>The following auxiliary panes are available via the lower toolbar</p>
<hr>
<h3>Lookup Pane</h3>
<p>The Lookup pane is used query the dictionaries by Strong Number.</p>
<p>Enter a Strong Number in the input field. Tap the Search button, or press Enter, to set the Active Strong Number.</p>
<h3>History Pane</h3>
<p>The History pane displays a list of previous Strong Number queries.</p>
<p>Tap an history entry to set the Strong Number.</p>
<p>The Active Filter is reset to Tome, the Strong Word is reset to '*' (all) or unique, and the Result pane is opened.</p>
<p>To remove an history entry, tap the Delete button:</p>
<div class="entry entry--icon">
<div class="icon-description">Previous Number</div>
<div class="icon-description">Delete</div>
<div class="icon-holder">
<svg class="icon-svg">
<title>Previous Number</title>
<use class="icon-holder__use icon-holder__use--prev" xlink:href="icons.svg#prev"></use>
<title>Delete</title>
<use class="icon-holder__use icon-holder__use--down" xlink:href="icons.svg#delete"></use>
</svg>
</div>
</div>
<br>
<p>To remove all history entries, tap the Clear History button in the lower toolbar:</p>
<div class="entry entry--icon">
<div class="icon-description">Next Number</div>
<div class="icon-description">Clear History</div>
<div class="icon-holder">
<svg class="icon-svg">
<title>Next Number</title>
<use class="icon-holder__use icon-holder__use--next" xlink:href="icons.svg#next"></use>
<title>Clear History</title>
<use class="icon-holder__use icon-holder__use--down" xlink:href="icons.svg#history-clear"></use>
</svg>
</div>
</div>
<hr>
<p>The following auxiliary panes are available via the lower toolbar</p>
<hr>
<h3>Lookup Pane</h3>
<p>The Lookup pane is used query the dictionaries by Strong Number.</p>
<p>Enter a Strong Number in the input field. Tap the Search button, or press Enter, to set the Active Strong Number.</p>
<h3>History Pane</h3>
<p>The History pane displays a list of previous Strong Number queries.</p>
<p>Tap an history entry to set the Strong Number.</p>
<p>The Active Filter is reset to Tome, the Strong Word is reset to '*' (all) or unique, and the Result pane is opened.</p>
<p>The history list is managed via their Action Menu. Tap the Menu button to open the Action Menu. You may reorder or delete entries as desired.</p>
<p>To remove all history entries, tap the Clear History button.</p>
<h2>Result Pane</h2>
<p>The Result pane displays the verse list matching the Strong Number, Strong Word, and Active Filter.</p>
<p>The upper toolbar displays the Active Filter, Strong Number, and Strong Word.</p>
Expand Down
3 changes: 3 additions & 0 deletions icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion js/Controller/NavigatorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class NavigatorController {
}

chapterIdxUpdate() {
queue.publish('read.scroll-to-top');
queue.publish('read.scroll-to-top', null);
if (this.sidebar === 'navigator') {
if (this.panes === 1) {
queue.publish('sidebar.change', 'none');
Expand Down
14 changes: 0 additions & 14 deletions js/Controller/SearchController.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ class SearchController {
queue.publish('search.history.delete', query);
}

historyDown(query) {
queue.publish('search.history.down', query);
}

historyPane() {
queue.publish('search.task.change', 'search-history');
}
Expand All @@ -64,10 +60,6 @@ class SearchController {
queue.publish('search.query.change', query);
}

historyUp(query) {
queue.publish('search.history.up', query);
}

historyUpdate() {
if (this.historySelectPending) {
this.historySelectPending = false;
Expand Down Expand Up @@ -164,15 +156,9 @@ class SearchController {
queue.subscribe('search-history.delete', (query) => {
this.historyDelete(query);
});
queue.subscribe('search-history.down', (query) => {
this.historyDown(query);
});
queue.subscribe('search-history.select', (query) => {
this.historySelect(query);
});
queue.subscribe('search-history.up', (query) => {
this.historyUp(query);
});

queue.subscribe('search-lookup', () => {
this.lookupPane();
Expand Down
22 changes: 9 additions & 13 deletions js/Controller/StrongController.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class StrongController {
}

defSelect(strongDef) {
queue.publish('strong.def.sub-change', strongDef);
queue.publish('strong.chain.add', null);
queue.publish('strong.def.change', strongDef);
}

defUpdate() {
Expand Down Expand Up @@ -91,6 +92,7 @@ class StrongController {
}

lookupFind(strongNum) {
queue.publish('strong.chain.clear', null);
queue.publish('strong.def.change', strongNum);
}

Expand All @@ -102,16 +104,12 @@ class StrongController {
queue.publish('strong.strong-mode.toggle', null);
}

nextStrong() {
queue.publish('strong.next', null);
}

panesUpdate(panes) {
this.panes = panes;
}

prevStrong() {
queue.publish('strong.prev', null);
prev() {
queue.publish('strong.chain.prev', null);
}

readSelect(verseIdx) {
Expand Down Expand Up @@ -152,12 +150,6 @@ class StrongController {
queue.subscribe('strong-def', () => {
this.defPane();
});
queue.subscribe('strong-def.next.strong',
() => { this.nextStrong(); }
);
queue.subscribe('strong-def.prev.strong',
() => { this.prevStrong(); }
);
queue.subscribe('strong-def.select', (strongDef) => {
this.defSelect(strongDef);
});
Expand Down Expand Up @@ -230,6 +222,9 @@ class StrongController {
queue.subscribe('strong.hide', () => {
this.hide();
});
queue.subscribe('strong.prev', () => {
this.prev();
});
queue.subscribe('strong.show', () => {
this.show();
});
Expand Down Expand Up @@ -271,6 +266,7 @@ class StrongController {
}

verseSelect(strongDef) {
queue.publish('strong.chain.clear', null);
queue.publish('strong.def.change', strongDef);
}

Expand Down
Loading

0 comments on commit b005784

Please sign in to comment.