]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9780 Add keyboard shortcuts help on the Rules page
authorStas Vilchik <stas.vilchik@sonarsource.com>
Thu, 12 Oct 2017 14:49:12 +0000 (16:49 +0200)
committerStas Vilchik <stas.vilchik@sonarsource.com>
Mon, 16 Oct 2017 09:08:02 +0000 (11:08 +0200)
server/sonar-web/src/main/js/apps/coding-rules/templates/coding-rules-workspace-header.hbs
server/sonar-web/src/main/js/apps/coding-rules/workspace-header-view.js
server/sonar-web/src/main/less/components/search-navigator.less
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 97623f1e77a18360fe0e1fed52fd87be363da152..900951bc70d247662c120f1d5e683390dc39fba2 100644 (file)
@@ -2,14 +2,28 @@
   {{#if state.rule}}
     <a class="js-back">{{t 'coding_rules.return_to_list'}}</a>
   {{else}}
-    &nbsp;
+    {{#if canBulkChange}}
+      <button class="js-bulk-change">{{t 'bulk_change'}}</button>
+    {{/if}}
+    <button class="js-new-search" id="coding-rules-new-search">{{t 'clear_all_filters'}}</button>
   {{/if}}
 </div>
 
 
 <div class="pull-right">
+  <span class="note big-spacer-right">
+    <span class="shortcut-button little-spacer-right">↑</span><span class="shortcut-button little-spacer-right">↓</span>{{t 'coding_rules.to_select_rules'}}
+    <span class="shortcut-button little-spacer-right big-spacer-left">←</span><span class="shortcut-button little-spacer-right">→</span>{{t 'issues.to_navigate'}}
+  </span>
+
   {{#notNull state.total}}
-    <div class="search-navigator-header-pagination flash flash-heavy">
+    <a class="js-reload link-no-underline" href="#">
+      <svg width="18" height="24" viewBox="0 0 18 24">
+        <path fill="#777" d="M16.6454 8.1084c-.3-.5-.9-.7-1.4-.4-.5.3-.7.9-.4 1.4.9 1.6 1.1 3.4.6 5.1-.5 1.7-1.7 3.2-3.2 4-3.3 1.8-7.4.6-9.1-2.7-1.8-3.1-.8-6.9 2.1-8.8v3.3h2v-7h-7v2h3.9c-3.7 2.5-5 7.5-2.8 11.4 1.6 3 4.6 4.6 7.7 4.6 1.4 0 2.8-.3 4.2-1.1 2-1.1 3.5-3 4.2-5.2.6-2.2.3-4.6-.8-6.6z" />
+      </svg>
+    </a>
+
+    <div class="search-navigator-header-pagination spacer-left flash flash-heavy">
       <strong>
         {{#gt state.total 0}}
           <span class="current">
       {{t 'coding_rules._rules'}}
     </div>
   {{/notNull}}
-
-
-  <div class="search-navigator-header-buttons button-group">
-    <button class="js-reload">{{t 'reload'}}</button>
-    <button class="js-new-search" id="coding-rules-new-search">{{t 'coding_rules.new_search'}}</button>
-    {{#if canBulkChange}}
-      <button class="js-bulk-change">{{t 'bulk_change'}}</button>
-    {{/if}}
-  </div>
 </div>
index 708164d62aeb72bc0d11e09bb084981961da409a..cbf44b2aa3ddcb820d8499c317abaa8b7de6b062 100644 (file)
@@ -49,7 +49,8 @@ export default WorkspaceHeaderView.extend({
     }).render();
   },
 
-  reload() {
+  reload(event) {
+    event.preventDefault();
     this.options.app.controller.fetchList(true);
   },
 
index dcd88bc69d77d8ec42e20ebf1254fad4e7daaddb..c3ca54bce786c695f6225a910b20f89fff7ac310 100644 (file)
 .search-navigator-header-pagination {
   display: inline-block;
   vertical-align: top;
-  margin-right: 20px;
-  font-size: @smallFontSize;
 }
 
 .search-navigator-header-buttons {
index b71154a1f9a4f4616ab84a7059e308eb52e52644..43cf2a8e953e196080958caf36552fec977f10f2 100644 (file)
@@ -1184,7 +1184,6 @@ coding_rules.deactivate_in_all_quality_profiles=Deactivate In All {0} Profiles
 coding_rules.inherits="{0}" inherits from "{1}"
 coding_rules.issues=Issues
 coding_rules.most_violating_projects=Most Violating Projects
-coding_rules.new_search=New Search
 coding_rules.no_results=No Coding Rules
 coding_rules.no_tags=No tags
 coding_rules.original=Original:
@@ -1205,6 +1204,7 @@ coding_rules.rule_template=Rule Template
 coding_rules.rule_template.title=This rule can be used as a template to create custom rules,\nit cannot be activated on a profile
 coding_rules._rules=rules
 coding_rules.show_template=Show Template
+coding_rules.to_select_rules=to select rules
 coding_rules.type.tooltip.CODE_SMELL=Code Smell Detection Rule
 coding_rules.type.tooltip.BUG=Bug Detection Rule
 coding_rules.type.tooltip.VULNERABILITY=Vulnerability Detection Rule