From ed8d828ff129d65bb227ecdb61b7d0072b46e040 Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 08:04:57 -0400 Subject: [PATCH 01/12] FIX: Added keyboard bindings for dismiss buttons --- .../javascripts/discourse/lib/keyboard_shortcuts.js | 3 +++ .../templates/discovery/topics.js.handlebars | 12 ++++++------ .../templates/mobile/discovery/topics.js.handlebars | 6 +++--- .../modal/keyboard_shortcuts_help.js.handlebars | 7 +++++-- config/locales/client.en.yml | 3 +++ 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index 991879ba00e..d1b7cdca070 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -35,6 +35,9 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching + 'd n': '#dismiss-new', // dismiss new + 'd t': '#dismiss-topics', // dismiss topics + 'd p': '#dismiss-posts', // dismiss posts 'n': '#user-notifications', // open notifications menu 'o,enter': '.topic-list tr.selected a.title', // open selected topic 'shift+r': '#topic-footer-buttons button.create', // reply to topic diff --git a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars index 92e101e158c..d88a9976c8c 100644 --- a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars +++ b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars @@ -1,11 +1,11 @@ {{#if showDismissAtTop}}
{{#if showDismissRead}} - - + + {{/if}} {{#if showResetNew}} - + {{/if}}
{{/if}} @@ -83,11 +83,11 @@ {{/if}} {{#if allLoaded}} {{#if showDismissRead}} - - + + {{/if}} {{#if showResetNew}} - + {{/if}} {{#if latest}} diff --git a/app/assets/javascripts/discourse/templates/mobile/discovery/topics.js.handlebars b/app/assets/javascripts/discourse/templates/mobile/discovery/topics.js.handlebars index a76edca8621..2dcbabe56f8 100644 --- a/app/assets/javascripts/discourse/templates/mobile/discovery/topics.js.handlebars +++ b/app/assets/javascripts/discourse/templates/mobile/discovery/topics.js.handlebars @@ -29,11 +29,11 @@ {{/if}} {{#if allLoaded}} {{#if showDismissRead}} - - + + {{/if}} {{#if showResetNew}} - + {{/if}} {{#if latest}} diff --git a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars index 76617712dce..44d08a74ce2 100644 --- a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars @@ -10,8 +10,6 @@
  • {{{i18n keyboard_shortcuts_help.jump_to.starred}}}
  • {{{i18n keyboard_shortcuts_help.jump_to.categories}}}
  • - -

    {{i18n keyboard_shortcuts_help.navigation.title}}

    +
    +

    {{i18n keyboard_shortcuts_help.application.title}}

    diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 7fe3c5299ce..2aab846cdd7 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2058,6 +2058,9 @@ en: user_profile_menu: 'p Open user profile menu' search: '/ Search' help: '? Open keyboard shortcuts help' + dismiss_new: 'd, n Dismiss New' + dismiss_topics: 'd, t Dismiss Topics' + dismiss_posts: 'd, p Dismiss Posts' actions: title: 'Actions' star: 'f Star topic' From e4ce995369a8cacc7c8b4d57e713c15524eba17d Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 08:11:23 -0400 Subject: [PATCH 02/12] FIX: Changed Dismiss New and Dismiss Posts to use d + r because p is reserved for the profile menu and n is reserved for the notifications menu --- app/assets/javascripts/discourse/lib/keyboard_shortcuts.js | 3 +-- .../templates/modal/keyboard_shortcuts_help.js.handlebars | 3 +-- config/locales/client.en.yml | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index d1b7cdca070..fd7194730a7 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -35,9 +35,8 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching - 'd n': '#dismiss-new', // dismiss new + 'd r': '#dismiss-new, #dismiss-posts', // dismiss new/posts 'd t': '#dismiss-topics', // dismiss topics - 'd p': '#dismiss-posts', // dismiss posts 'n': '#user-notifications', // open notifications menu 'o,enter': '.topic-list tr.selected a.title', // open selected topic 'shift+r': '#topic-footer-buttons button.create', // reply to topic diff --git a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars index 44d08a74ce2..7077f227c80 100644 --- a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars @@ -28,9 +28,8 @@
  • {{{i18n keyboard_shortcuts_help.application.user_profile_menu}}}
  • {{{i18n keyboard_shortcuts_help.application.search}}}
  • {{{i18n keyboard_shortcuts_help.application.help}}}
  • -
  • {{{i18n keyboard_shortcuts_help.application.dismiss_new}}}
  • +
  • {{{i18n keyboard_shortcuts_help.application.dismiss_new_posts}}}
  • {{{i18n keyboard_shortcuts_help.application.dismiss_topics}}}
  • -
  • {{{i18n keyboard_shortcuts_help.application.dismiss_posts}}}
  • diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 2aab846cdd7..f53ec58ffe4 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2058,9 +2058,8 @@ en: user_profile_menu: 'p Open user profile menu' search: '/ Search' help: '? Open keyboard shortcuts help' - dismiss_new: 'd, n Dismiss New' + dismiss_new_posts: 'd, r Dismiss New/Posts' dismiss_topics: 'd, t Dismiss Topics' - dismiss_posts: 'd, p Dismiss Posts' actions: title: 'Actions' star: 'f Star topic' From 9e72b97a7563b07f1a16387e44aee0f7e4d48231 Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 08:33:45 -0400 Subject: [PATCH 03/12] Corrected an issue with using the same ID for the header/footer of the buttons --- .../discourse/lib/keyboard_shortcuts.js | 22 +++++++++---------- .../templates/discovery/topics.js.handlebars | 6 ++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index fd7194730a7..2bb38350e4a 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -31,17 +31,17 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ // star topic 'f': '#topic-footer-buttons button.star, .topic-list tr.topic-list-item.selected a.star', - 'm m': 'div.notification-options li[data-id="0"] a', // mark topic as muted - 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular - 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking - 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching - 'd r': '#dismiss-new, #dismiss-posts', // dismiss new/posts - 'd t': '#dismiss-topics', // dismiss topics - 'n': '#user-notifications', // open notifications menu - 'o,enter': '.topic-list tr.selected a.title', // open selected topic - 'shift+r': '#topic-footer-buttons button.create', // reply to topic - 'shift+s': '#topic-footer-buttons button.share', // share topic - 's': '.topic-post.selected a.post-date' // share post + 'm m': 'div.notification-options li[data-id="0"] a', // mark topic as muted + 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular + 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking + 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching + 'd r': '#dismiss-new,#dismiss-new-top,#dismiss-posts,#dismiss-posts-top', // dismiss new/posts + 'd t': '#dismiss-topics,#dismiss-topics-top', // dismiss topics + 'n': '#user-notifications', // open notifications menu + 'o,enter': '.topic-list tr.selected a.title', // open selected topic + 'shift+r': '#topic-footer-buttons button.create', // reply to topic + 'shift+s': '#topic-footer-buttons button.share', // share topic + 's': '.topic-post.selected a.post-date' // share post }, FUNCTION_BINDINGS: { diff --git a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars index d88a9976c8c..134c7699e2a 100644 --- a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars +++ b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars @@ -1,11 +1,11 @@ {{#if showDismissAtTop}}
    {{#if showDismissRead}} - - + + {{/if}} {{#if showResetNew}} - + {{/if}}
    {{/if}} From ede9d1e057fa495eb2f7bb6c7dac77b1a4120249 Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 08:46:35 -0400 Subject: [PATCH 04/12] Change the Dismiss keybindings to use 'x' instead of 'd' --- app/assets/javascripts/discourse/lib/keyboard_shortcuts.js | 4 ++-- config/locales/client.en.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index 2bb38350e4a..22b02f42b86 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -35,8 +35,8 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching - 'd r': '#dismiss-new,#dismiss-new-top,#dismiss-posts,#dismiss-posts-top', // dismiss new/posts - 'd t': '#dismiss-topics,#dismiss-topics-top', // dismiss topics + 'x r': '#dismiss-new,#dismiss-new-top,#dismiss-posts,#dismiss-posts-top', // dismiss new/posts + 'x t': '#dismiss-topics,#dismiss-topics-top', // dismiss topics 'n': '#user-notifications', // open notifications menu 'o,enter': '.topic-list tr.selected a.title', // open selected topic 'shift+r': '#topic-footer-buttons button.create', // reply to topic diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index f53ec58ffe4..b805cb4b98c 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2058,8 +2058,8 @@ en: user_profile_menu: 'p Open user profile menu' search: '/ Search' help: '? Open keyboard shortcuts help' - dismiss_new_posts: 'd, r Dismiss New/Posts' - dismiss_topics: 'd, t Dismiss Topics' + dismiss_new_posts: 'x, r Dismiss New/Posts' + dismiss_topics: 'x, t Dismiss Topics' actions: title: 'Actions' star: 'f Star topic' From 3f085c3fd3242b8d7b2ee48111d290f1bf64960f Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 09:22:47 -0400 Subject: [PATCH 05/12] Change the Dismiss keybindings to use 'x' instead of 'd' --- app/assets/javascripts/discourse/lib/keyboard_shortcuts.js | 1 + .../templates/modal/keyboard_shortcuts_help.js.handlebars | 1 + config/locales/client.en.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index 473f9d14e57..a4321fe55d2 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -35,6 +35,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching + '.': '.alert .alert-info .clickable', // show incoming topics 'n': '#user-notifications', // open notifications menu '=': '#site-map', // open site map menu 'p': '#current-user', // open current user menu diff --git a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars index 76617712dce..2ac870f2cac 100644 --- a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars @@ -27,6 +27,7 @@
  • {{{i18n keyboard_shortcuts_help.application.site_map_menu}}}
  • {{{i18n keyboard_shortcuts_help.application.user_profile_menu}}}
  • {{{i18n keyboard_shortcuts_help.application.search}}}
  • +
  • {{{i18n keyboard_shortcuts_help.application.show_incoming_updated}}}
  • {{{i18n keyboard_shortcuts_help.application.help}}}
  • diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 7fe3c5299ce..1edf950b220 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2056,6 +2056,7 @@ en: notifications: 'n Open notifications' site_map_menu: '= Open site map menu' user_profile_menu: 'p Open user profile menu' + show_incoming_updated: '. Show incoming/updated topics' search: '/ Search' help: '? Open keyboard shortcuts help' actions: From cde64580b14ea2e69f782004cede231d2530906c Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 09:35:38 -0400 Subject: [PATCH 06/12] Change the Dismiss keybindings to use 'x' instead of 'd' - moved it to a function binding --- app/assets/javascripts/discourse/lib/keyboard_shortcuts.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index a4321fe55d2..79e5d71b64a 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -35,7 +35,6 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'm r': 'div.notification-options li[data-id="1"] a', // mark topic as regular 'm t': 'div.notification-options li[data-id="2"] a', // mark topic as tracking 'm w': 'div.notification-options li[data-id="3"] a', // mark topic as watching - '.': '.alert .alert-info .clickable', // show incoming topics 'n': '#user-notifications', // open notifications menu '=': '#site-map', // open site map menu 'p': '#current-user', // open current user menu @@ -55,6 +54,7 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ '`': 'nextSection', '~': 'prevSection', '/': 'showSearch', + '.': 'showIncomingUpdatedTopics', // show incoming topics 'ctrl+f': 'showBuiltinSearch', 'command+f': 'showBuiltinSearch', '?': 'showHelpModal', // open keyboard shortcut help @@ -134,6 +134,11 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ } }, + showIncomingUpdatedTopics: function() { + $('.alert .alert-info .clickable').click(); + return false; + }, + toggleProgress: function() { Discourse.__container__.lookup('controller:topic-progress').send('toggleExpansion', {highlight: true}); }, From 80cb8f3a96251c934d299fa3fb16e7e4d10ef6b9 Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 17:54:50 -0400 Subject: [PATCH 07/12] Fixed qunit test assertion --- test/javascripts/components/keyboard-shortcuts-test.js.es6 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/javascripts/components/keyboard-shortcuts-test.js.es6 b/test/javascripts/components/keyboard-shortcuts-test.js.es6 index cb290355c95..e08e582cfc9 100644 --- a/test/javascripts/components/keyboard-shortcuts-test.js.es6 +++ b/test/javascripts/components/keyboard-shortcuts-test.js.es6 @@ -46,6 +46,8 @@ module("Discourse.KeyboardShortcuts", { " ", " ", " ", + " ", + " ", "", "", "
    ", From bc07bc481925946fc4e7ef8310bf811d37323023 Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 18:19:06 -0400 Subject: [PATCH 08/12] Remove incoming/updated topics logic (not sure how that got in here, but it is causing a conflict) --- app/assets/javascripts/discourse/lib/keyboard_shortcuts.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index 79e5d71b64a..473f9d14e57 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -54,7 +54,6 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ '`': 'nextSection', '~': 'prevSection', '/': 'showSearch', - '.': 'showIncomingUpdatedTopics', // show incoming topics 'ctrl+f': 'showBuiltinSearch', 'command+f': 'showBuiltinSearch', '?': 'showHelpModal', // open keyboard shortcut help @@ -134,11 +133,6 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ } }, - showIncomingUpdatedTopics: function() { - $('.alert .alert-info .clickable').click(); - return false; - }, - toggleProgress: function() { Discourse.__container__.lookup('controller:topic-progress').send('toggleExpansion', {highlight: true}); }, From 324c0eb7e4716a3b86f0d3aacb0b6b89deb8ea5c Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Fri, 29 Aug 2014 15:47:50 -0700 Subject: [PATCH 09/12] UX: improve default new user guidance --- config/locales/server.en.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index eadf66784d2..05463dece2f 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -1267,7 +1267,7 @@ en: usage_tips: text_body_template: | - This private message has a few quick tips to get you started: + This private message has a few quick tips to get you started. ## Keep scrolling @@ -1279,11 +1279,13 @@ en: - For search, your user page, or the menu, use the **icon buttons at the upper right**. - - While reading a topic, move back to the top ↑ by clicking the topic title. Click the green progress bar at the bottom right to see full navigation controls, or use the home and end keys. + - In a list of topics, the title will always take you to your next unread post. Use the last activity time to jump to the last post. + + - While reading a topic, jump to the top ↑ by selecting the topic title. Select the green progress bar at the bottom right for full navigation controls, or use the home and end keys. - - The topic title will always take you to your next unread post. Use the last activity time to quickly jump to the first or last post in a topic. + ## How do I reply? @@ -1299,19 +1301,22 @@ en: (To quote an entire post, use the Import Quote button on the editor toolbar.) - To mention someone's name in your reply, start typing `@` and an autocompleter will pop up. + To ping someone in your reply, mention their name. Type `@` and an autocompleter will pop up. + For [standard Emoji](http://www.emoji-cheat-sheet.com/), just start typing `:` or the traditional smileys `:)` :smile: + ## What else can I do? - To let someone know that you enjoyed their post, use the **like** button at the bottom of the post. If you see a problem with a post, don't hesitate to use the **flag** button and privately let them, or our staff, know about it. + There are action buttons at the bottom of each post. - You can also share a link to a post, or bookmark a post for later reference on your user page. + To let someone know that you enjoyed their post, use the **like** button. If you see a problem with a post, privately let them, or our staff, know about it with the **flag** button. + + You can also **share** a link to a post, or **bookmark** it for later reference on your user page. - For [standard Emoji](http://www.emoji-cheat-sheet.com/), just start typing `:` or the traditional smileys `:)` :smile: ## Who is talking to me? @@ -1323,7 +1328,7 @@ en: ## When are conversations new? - By default all conversations less than two days old are considered new, and any conversation you've participated in will automatically be tracked. + By default all conversations less than two days old are considered new, and any conversation you've participated in (replied to, created, or read for an extended period) will automatically be tracked. You will see the blue new and number indicators next to these topics: From 0eb367f9c3c3591a5998ca722f40a7cd2dd2363d Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Fri, 29 Aug 2014 15:57:13 -0700 Subject: [PATCH 10/12] UX: rename "Leader" to "Veteran" (first steps) --- config/locales/client.en.yml | 2 +- spec/fabricators/user_fabricator.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 6aa10ffd563..d9f5e440c86 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -1833,7 +1833,7 @@ en: newuser: 'Users at Trust Level 0 (New User)' basic: 'Users at Trust Level 1 (Basic User)' regular: 'Users at Trust Level 2 (Regular User)' - leader: 'Users at Trust Level 3 (Leader)' + leader: 'Users at Trust Level 3 (Veteran)' elder: 'Users at Trust Level 4 (Elder)' admins: 'Admin Users' moderators: 'Moderators' diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb index 3aab6184bcf..26b7ce4deeb 100644 --- a/spec/fabricators/user_fabricator.rb +++ b/spec/fabricators/user_fabricator.rb @@ -67,7 +67,7 @@ Fabricator(:active_user, from: :user) do end Fabricator(:leader, from: :user) do - name 'Leader McLeaderman' + name 'Veteran McVeteranish' username { sequence(:username) { |i| "leader#{i}" } } email { sequence(:email) { |i| "leader#{i}@leaderfun.com" } } trust_level TrustLevel.levels[:leader] From 68a3fd5ef067f72047ea45486a8a1bbacca6f488 Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 30 Aug 2014 09:07:17 +1000 Subject: [PATCH 11/12] FIX: developer emails not working on ruby 2.0 --- config/environments/development.rb | 2 +- config/environments/production.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 8ed39bf6de5..57c8b2a96ec 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -47,7 +47,7 @@ Discourse::Application.configure do require 'rbtrace' if emails = GlobalSetting.developer_emails - config.developer_emails = emails.split(",").map(&:strip!) + config.developer_emails = emails.split(",").map(&:strip) end end diff --git a/config/environments/production.rb b/config/environments/production.rb index 3a8b992a8ee..927bb8b60ee 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -61,7 +61,7 @@ Discourse::Application.configure do # developers have god like rights and may impersonate anyone in the system # normal admins may only impersonate other moderators (not admins) if emails = GlobalSetting.developer_emails - config.developer_emails = emails.split(",").map(&:strip!) + config.developer_emails = emails.split(",").map(&:strip) end end From 68e807f791a24512decea4c82b61abba16548142 Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 19:14:42 -0400 Subject: [PATCH 12/12] UX: Add keyboard binding for reply as new topic --- app/assets/javascripts/discourse/lib/keyboard_shortcuts.js | 3 ++- .../templates/modal/keyboard_shortcuts_help.js.handlebars | 1 + config/locales/client.en.yml | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js index 991879ba00e..619b81300f3 100644 --- a/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js +++ b/app/assets/javascripts/discourse/lib/keyboard_shortcuts.js @@ -22,7 +22,8 @@ Discourse.KeyboardShortcuts = Ember.Object.createWithMixins({ 'e': 'editPost', 'l': 'toggleLike', 'r': 'replyToPost', - '!': 'showFlags' + '!': 'showFlags', + 't': 'replyAsNewTopic' }, CLICK_BINDINGS: { diff --git a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars index 76617712dce..68aa8f2f28c 100644 --- a/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars +++ b/app/assets/javascripts/discourse/templates/modal/keyboard_shortcuts_help.js.handlebars @@ -36,6 +36,7 @@
  • {{{i18n keyboard_shortcuts_help.actions.star}}}
  • {{{i18n keyboard_shortcuts_help.actions.share_topic}}}
  • {{{i18n keyboard_shortcuts_help.actions.share_post}}}
  • +
  • {{{i18n keyboard_shortcuts_help.actions.reply_as_new_topic}}}
  • {{{i18n keyboard_shortcuts_help.actions.reply_topic}}}
  • {{{i18n keyboard_shortcuts_help.actions.reply_post}}}
  • {{{i18n keyboard_shortcuts_help.actions.quote_post}}}
  • diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 6aa10ffd563..a12017374ba 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -2063,6 +2063,7 @@ en: star: 'f Star topic' share_topic: 'shift s Share topic' share_post: 's Share post' + reply_as_new_topic: 't Reply as new topic' reply_topic: 'shift r Reply to topic' reply_post: 'r Reply to post' quote_post: 'q Quote post'