PolyGerrit: Add next/previous page key bindings to keyboard shortcuts
Shortcuts for next/previous page navigation were added in: I0f8c4f55. Mention them on the keyboard shortcuts overlay to reflect this. Given that the next/previous page keys only exposed on change list view, but not on dashboad view, split the table bodies for keyboard shortcuts for this views. Test Plan: * Open change list view * Type: ? * Keyboard shortcuts overlay is opened * Verify, that the name is: "Change List" and that this lines appear: "n or ] Go to next page" "p or [ Go to previous page" * Log in * Open dashboard * Type: ? * Keyboard shortcuts overlay is opened * Verify, that the name is: "Dashboard" and that the keyboard shortcuts for next/previous page not rendered Bug: Issue 4259 Change-Id: I3c82ddad3a21e1f88d4ea6c396095c2e6fea0b34
This commit is contained in:
committed by
David Ostrovsky
parent
a0838b3e91
commit
0d7305ea51
@@ -134,8 +134,8 @@ limitations under the License.
|
||||
</table>
|
||||
|
||||
<table>
|
||||
<!-- Change List and Dashboard -->
|
||||
<tbody hidden$="[[!_computeInChangeListView(view)]]" hidden>
|
||||
<!-- Change List -->
|
||||
<tbody hidden$="[[!_computeInView(view, 'gr-change-list-view')]]" hidden>
|
||||
<tr>
|
||||
<td></td><td class="header">Change list</td>
|
||||
</tr>
|
||||
@@ -147,6 +147,35 @@ limitations under the License.
|
||||
<td><span class="key">k</span></td>
|
||||
<td>Show previous change</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="key">n</span> or <span class="key">]</span></td>
|
||||
<td>Go to next page</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="key">p</span> or <span class="key">[</span></td>
|
||||
<td>Go to previous page</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="key">Enter</span> or
|
||||
<span class="key">o</span>
|
||||
</td>
|
||||
<td>Show selected change</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<!-- Dashboard -->
|
||||
<tbody hidden$="[[!_computeInView(view, 'gr-dashboard-view')]]" hidden>
|
||||
<tr>
|
||||
<td></td><td class="header">Dashboard</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="key">j</span></td>
|
||||
<td>Select next change</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class="key">k</span></td>
|
||||
<td>Show previous change</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="key">Enter</span> or
|
||||
|
||||
@@ -35,11 +35,6 @@
|
||||
return view === currentView;
|
||||
},
|
||||
|
||||
_computeInChangeListView: function(currentView) {
|
||||
return currentView === 'gr-change-list-view' ||
|
||||
currentView === 'gr-dashboard-view';
|
||||
},
|
||||
|
||||
_handleCloseTap: function(e) {
|
||||
e.preventDefault();
|
||||
this.fire('close', null, {bubbles: false});
|
||||
|
||||
Reference in New Issue
Block a user