From 2b1027db6d08ddd79b3301d0778a4c8341d5b189 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Tue, 30 Jun 2020 17:13:19 -0400 Subject: [PATCH 1/5] Upgrading to mongo 3.4 requires dropping old indexes with types attributes. Will need downtime to accomplish. --- utils/upgrade_mongo_3.4.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 utils/upgrade_mongo_3.4.sh diff --git a/utils/upgrade_mongo_3.4.sh b/utils/upgrade_mongo_3.4.sh new file mode 100644 index 000000000..5adba0f02 --- /dev/null +++ b/utils/upgrade_mongo_3.4.sh @@ -0,0 +1,5 @@ +db.notifications.dropIndex('user_id_1_feed_id_1') +db.notification_tokens.dropIndex('user_id_1') +db.email_unsubscribes.dropIndex('user_id_1_email_type_1') +db.stories.dropIndex('story_hash_1') +db.saved_searches.dropIndex('user_id_1_feed_id_1_query_1') From 154e5b864a8a68c9232dc1acf7e7b441c25abd74 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Tue, 30 Jun 2020 17:26:36 -0400 Subject: [PATCH 2/5] Upgrading httplib2. --- config/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/requirements.txt b/config/requirements.txt index c57dcc35e..585d1aa3c 100755 --- a/config/requirements.txt +++ b/config/requirements.txt @@ -23,7 +23,7 @@ dnspython==1.15.0 Fabric==1.14.0 gunicorn==19.7 hiredis==0.2.0 -httplib2==0.17.4 +httplib2==0.18.1 image==1.5.27 isodate==0.5.4 lxml==3.6.4 From 4b7549f10590d53b4e11632f95e37092b4eb9804 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Fri, 26 Jun 2020 16:40:45 -0400 Subject: [PATCH 3/5] Adding cookies to path inspector. --- utils/request_introspection_middleware.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/request_introspection_middleware.py b/utils/request_introspection_middleware.py index 2e16ec102..c42d27cf0 100644 --- a/utils/request_introspection_middleware.py +++ b/utils/request_introspection_middleware.py @@ -6,4 +6,4 @@ class DumpRequestMiddleware: if settings.DEBUG: request_items = request.REQUEST.items() if request_items: - logging.debug(" ---> ~FC%s ~SN~FC%s ~SN~BC~FK%s" % (request.method, request.path, dict(request_items))) \ No newline at end of file + logging.debug(" ---> ~FC%s ~SN~FC%s ~SN~BC~FK%s~BK~FC %s" % (request.method, request.path, dict(request_items), request.COOKIES)) \ No newline at end of file From f7d3c5d3e6ff9373a7434ee1e2289f1c74e07a01 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 6 Jul 2020 18:14:03 -0400 Subject: [PATCH 4/5] Fixing login rotation. --- media/js/newsblur/welcome/welcome.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/media/js/newsblur/welcome/welcome.js b/media/js/newsblur/welcome/welcome.js index 038c6aa66..fd931173f 100644 --- a/media/js/newsblur/welcome/welcome.js +++ b/media/js/newsblur/welcome/welcome.js @@ -15,7 +15,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({ initialize: function() { this.start_rotation(); - this.debug_password_autocomplete(); + // this.debug_password_autocomplete(); NEWSBLUR.reader.$s.$layout.hide(); }, @@ -57,9 +57,14 @@ NEWSBLUR.Welcome = Backbone.View.extend({ if (this.$('.NB-welcome-header-account').hasClass('NB-active')) { this.show_signin_form(); } - this.$('.NB-welcome-header-image img').eq(0).on('load', _.bind(function() { - setInterval(_.bind(this.rotate_screenshots, this), 3000); - }, this)); + var $first_img = this.$('.NB-welcome-header-image img').eq(0); + if ($first_img[0].complete) { + setInterval(_.bind(this.rotate_screenshots, this), 3000); + } else { + $first_img.on('load', _.bind(function() { + setInterval(_.bind(this.rotate_screenshots, this), 3000); + }, this)); + } }, rotate_screenshots: function(force, callback) { From d66537bd0fdbbed1b1dadd477a9848c31236ffa5 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Mon, 6 Jul 2020 19:57:30 -0400 Subject: [PATCH 5/5] Refactoring welcome screen to fix input alignment issue. --- media/css/welcome.css | 21 ++++++- media/js/newsblur/welcome/welcome.js | 39 +++++++++---- templates/reader/welcome.xhtml | 85 ++++++++++++++-------------- 3 files changed, 90 insertions(+), 55 deletions(-) diff --git a/media/css/welcome.css b/media/css/welcome.css index 4ec0eb878..674cd047c 100644 --- a/media/css/welcome.css +++ b/media/css/welcome.css @@ -52,6 +52,18 @@ position: relative; height: 100%; } +.NB-welcome .NB-inner-account { + width: 960px; + margin: 0 auto; + overflow: hidden; + position: absolute; + top: 0; + height: 100%; + margin-right: -50%; + left: 50%; + transform: translate(-50%, 0); + pointer-events: none; +} .NB-button { border: 1px solid #07360F; font-size: 12px; @@ -81,6 +93,7 @@ /* ========== */ .NB-welcome-header { + position: relative; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#3F5354), to(#1B2424)); background: -moz-linear-gradient(center top , #3F5354 0%, #1B2424 100%) repeat scroll 0 0 transparent; height: 420px; @@ -100,7 +113,7 @@ } .NB-welcome-header .NB-welcome-header-logo img { opacity: .9; - -webkit-transition: all .15s ease-in-out; + -webkit-transition: all .15s ease-in-out; -moz-transition: all .15s ease-in-out; -o-transition: all .15s ease-in-out; -ms-transition: all .15s ease-in-out; @@ -274,17 +287,19 @@ /* ================== */ .NB-welcome-header-account { + pointer-events: all; position: absolute; + transition: bottom 1s ease-in-out; bottom: -350px; right: 12px; width: 400px; border-top-left-radius: 8px; border-top-right-radius: 8px; background-color: rgba(245, 245, 245, 0.4); - padding: 36px 36px 12px; + padding: 36px 36px 12px; } .NB-welcome-header-account.NB-active { - bottom: 0; + bottom: 0px; } .NB-welcome-header-account .NB-module-header-login { width: 142px; diff --git a/media/js/newsblur/welcome/welcome.js b/media/js/newsblur/welcome/welcome.js index fd931173f..aab481fb9 100644 --- a/media/js/newsblur/welcome/welcome.js +++ b/media/js/newsblur/welcome/welcome.js @@ -15,14 +15,28 @@ NEWSBLUR.Welcome = Backbone.View.extend({ initialize: function() { this.start_rotation(); - // this.debug_password_autocomplete(); + _.delay(_.bind(function() { + // this.debug_password_autocomplete(); + }, this), 500); NEWSBLUR.reader.$s.$layout.hide(); }, + debug_password_autocomplete: function() { + console.log(['Triggering focus']); + this.$("input[name=login-username]").trigger('focus'); + }, + // ========== // = Header = // ========== + fix_misalignment: function(e) { + console.log(['Fixing misalignment', e]); + + this.flags.on_signin = true; + this.show_signin_form(); + }, + click_header_caption: function(e) { this.flags.on_signin = false; this.enter_header_caption(e); @@ -55,7 +69,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({ start_rotation: function() { if (this.$('.NB-welcome-header-account').hasClass('NB-active')) { - this.show_signin_form(); + this.stop_rotation(); } var $first_img = this.$('.NB-welcome-header-image img').eq(0); if ($first_img[0].complete) { @@ -87,7 +101,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({ var $out_img = $images.not($in_img); var $in_caption = $captions.eq(r); var $out_caption = $captions.not($in_caption); - + console.log(['Rotate screenshots', force]); $out_img.removeClass('NB-active'); $in_img.addClass('NB-active'); @@ -108,6 +122,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({ }, stop_rotation: function() { + console.log(['stop_rotation']); this.flags.on_signin = true; }, @@ -127,7 +142,13 @@ NEWSBLUR.Welcome = Backbone.View.extend({ _.delay(_.bind(function() { this.rotate_screenshots(4, _.bind(function() { - this.$('input[name=login-username]').focus(); + _.delay(_.bind(function() { + if (this.$("input:focus").length) { + console.log(['Already focused']); + return; + } + this.$('input[name=login-username]').focus(); + }), 50); }, this)); }, this), open ? 560 : 0); @@ -143,7 +164,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({ } var open = NEWSBLUR.reader.toggle_sidebar(); - this.$('.NB-inner').animate({ + this.$('.NB-inner,.NB-inner-account').animate({ paddingLeft: open ? 240 : 0 }, { queue: false, @@ -159,7 +180,7 @@ NEWSBLUR.Welcome = Backbone.View.extend({ NEWSBLUR.reader.close_sidebar(); - this.$('.NB-inner').animate({ + this.$('.NB-inner,.NB-inner-account').animate({ paddingLeft: 0 }, { queue: false, @@ -168,10 +189,6 @@ NEWSBLUR.Welcome = Backbone.View.extend({ }); this.$('.NB-welcome-container').removeClass('NB-welcome-tryout'); - }, - - debug_password_autocomplete: function() { - this.$("input[name=login-username]").focus(); } - + }); \ No newline at end of file diff --git a/templates/reader/welcome.xhtml b/templates/reader/welcome.xhtml index 7ae29ae7a..c59a8d034 100644 --- a/templates/reader/welcome.xhtml +++ b/templates/reader/welcome.xhtml @@ -28,45 +28,49 @@
-
- -
- NewsBlur is a personal news reader
bringing people together to talk about the world -
-
-
Web
-
iPad & iPhone
-
Android
- -
-
-
-
First
-
- - Try out NewsBlur -
-
-
-
Then
- -
-
-
- -
-
- -
-
- -
+
+ +
+ NewsBlur is a personal news reader
bringing people together to talk about the world +
+
+
Web
+
iPad & iPhone
+
Android
+ +
+
+
+
First
+
+ + Try out NewsBlur +
+
+
+
Then
+ +
+
+
+ +
+
+ +
+
+ +
+ +
+ + +