From 8b349b43a52583b2f935ae1ea1dd9f6fa6d0ea6d Mon Sep 17 00:00:00 2001 From: cpradio Date: Fri, 29 Aug 2014 20:10:34 -0400 Subject: [PATCH 1/5] UX: Add keyboard binding for reply as new topic Removed extra translation in the keyboard shortcut modal window --- .../templates/modal/keyboard_shortcuts_help.js.handlebars | 1 - 1 file changed, 1 deletion(-) 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 24bd4169350..ec367c29ec1 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,7 +28,6 @@
  • {{{i18n keyboard_shortcuts_help.application.user_profile_menu}}}
  • {{{i18n keyboard_shortcuts_help.application.show_incoming_updated_topics}}}
  • {{{i18n keyboard_shortcuts_help.application.search}}}
  • -
  • {{{i18n keyboard_shortcuts_help.application.show_incoming_updated}}}
  • {{{i18n keyboard_shortcuts_help.application.help}}}
  • {{{i18n keyboard_shortcuts_help.application.dismiss_new_posts}}}
  • {{{i18n keyboard_shortcuts_help.application.dismiss_topics}}}
  • From 4281b16616b6740d3b9812979c0b7d7615481b88 Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Fri, 29 Aug 2014 22:54:07 -0700 Subject: [PATCH 2/5] UX: dim the new and unread education --- .../discourse/templates/discovery/topics.js.handlebars | 8 ++++++-- app/assets/stylesheets/common/base/_topic-list.scss | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars index bd7b9a847ad..baeae36f733 100644 --- a/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars +++ b/app/assets/javascripts/discourse/templates/discovery/topics.js.handlebars @@ -95,7 +95,9 @@ {{/if}} {{#if latest}} - {{{footerEducation}}} +
    + {{{footerEducation}}} +

    {{footerMessage}} {{#if can_create_topic}}{{i18n topic.suggest_create_topic}}{{/if}} @@ -106,7 +108,9 @@ {{#link-to "discovery.categories"}}{{i18n topic.browse_all_categories}}{{/link-to}}, {{#link-to 'discovery.latest'}}{{i18n topic.view_latest_topics}}{{/link-to}} {{i18n or}} {{i18n filters.top.other_periods}} {{top-period-buttons period=period}} {{else}} - {{{footerEducation}}} +
    + {{{footerEducation}}} +

    {{footerMessage}}{{#link-to "discovery.categories"}} {{i18n topic.browse_all_categories}}{{/link-to}} {{i18n or}} {{#link-to 'discovery.latest'}}{{i18n topic.view_latest_topics}}{{/link-to}}

    diff --git a/app/assets/stylesheets/common/base/_topic-list.scss b/app/assets/stylesheets/common/base/_topic-list.scss index 8735702a160..0de120eea6b 100644 --- a/app/assets/stylesheets/common/base/_topic-list.scss +++ b/app/assets/stylesheets/common/base/_topic-list.scss @@ -308,3 +308,7 @@ ol.category-breadcrumb { .top-title-buttons { display: inline; } + +div.education { + color: scale-color($primary, $lightness: 50%); +} \ No newline at end of file From 70dbad16dcc29fa68776189cd4ee9bbb44d559fb Mon Sep 17 00:00:00 2001 From: Jeff Atwood Date: Fri, 29 Aug 2014 22:59:39 -0700 Subject: [PATCH 3/5] UX: simplify copy for summarize topic mode --- config/locales/client.en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index d4bc9579c1e..3080aa2a60c 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -544,7 +544,7 @@ en: last_post_lowercase: last post summary: - enabled_description: "You're viewing a summary of this topic: just the most interesting posts as determined by the community. To see all posts again, click below." + enabled_description: "You're viewing a summary of this topic: the most interesting posts as determined by the community." description: "There are {{count}} replies." description_time: "There are {{count}} replies with an estimated read time of {{readingTime}} minutes." enable: 'Summarize This Topic' From 3c005557e67bb88f9786d4a2e3dc9cef74efa477 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Sat, 30 Aug 2014 11:34:33 +0530 Subject: [PATCH 4/5] FIX: use short date format for post navigator --- .../javascripts/discourse/controllers/topic-entrance.js.es6 | 4 ++-- config/locales/client.en.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/topic-entrance.js.es6 b/app/assets/javascripts/discourse/controllers/topic-entrance.js.es6 index 074d856b95e..8e47064411c 100644 --- a/app/assets/javascripts/discourse/controllers/topic-entrance.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic-entrance.js.es6 @@ -8,12 +8,12 @@ function entranceDate(dt, showTime) { if (dt.getYear() === today.getYear()) { // No year return moment(dt).format( - showTime ? I18n.t("dates.long_no_year") : I18n.t("dates.long_no_year_no_time") + showTime ? I18n.t("dates.long_date_without_year") : I18n.t("dates.long_no_year_no_time") ); } return moment(dt).format( - showTime ? I18n.t('dates.long_with_year') : I18n.t('dates.long_with_year_no_time') + showTime ? I18n.t('dates.long_date_with_year') : I18n.t('dates.long_date_with_year_without_time') ); } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index d4bc9579c1e..18bbbb6cbff 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -37,6 +37,7 @@ en: long_with_year_no_time: "MMM D, YYYY" long_date_with_year: "MMM D, 'YY LT" long_date_without_year: "MMM D, LT" + long_date_with_year_without_time: "MMM D, 'YY" tiny: half_a_minute: "< 1m" less_than_x_seconds: From 289d9e4fe1b3cfcf5ce32a0750809a498249f729 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Sat, 30 Aug 2014 11:54:47 +0530 Subject: [PATCH 5/5] FIX: use short date format for topic summary --- config/locales/client.en.yml | 4 ++-- test/javascripts/lib/formatter-test.js.es6 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index bd5dc27b774..cabf4a8c3ec 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -67,7 +67,7 @@ en: almost_x_years: one: "1y" other: "%{count}y" - date_month: "D MMM" + date_month: "MMM D" date_year: "MMM 'YY" medium: x_minutes: @@ -79,7 +79,7 @@ en: x_days: one: "1 day" other: "%{count} days" - date_year: "D MMM YYYY" + date_year: "MMM D, 'YY" medium_with_ago: x_minutes: one: "1 min ago" diff --git a/test/javascripts/lib/formatter-test.js.es6 b/test/javascripts/lib/formatter-test.js.es6 index 0bcd609f067..74a163aaa68 100644 --- a/test/javascripts/lib/formatter-test.js.es6 +++ b/test/javascripts/lib/formatter-test.js.es6 @@ -29,7 +29,7 @@ var formatDays = function(days) { }; var shortDate = function(days){ - return moment().subtract(days, 'days').format('D MMM'); + return moment().subtract(days, 'days').format('MMM D'); }; test("formating medium length dates", function() { @@ -40,7 +40,7 @@ test("formating medium length dates", function() { }; var shortDateYear = function(days){ - return moment().subtract(days, 'days').format('D MMM YYYY'); + return moment().subtract(days, 'days').format("MMM D, 'YY"); }; leaveAgo = true;