From fb1fa7e74fc2fb87d1cb17166dfe151406f9baea Mon Sep 17 00:00:00 2001 From: Chiamaka Nwolisa Date: Sat, 15 Dec 2018 07:57:21 +0000 Subject: [PATCH 1/8] Remove duplicate code --- src/components/fullscreenView/style.js | 1 - src/components/withCurrentUser/index.js | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/components/fullscreenView/style.js b/src/components/fullscreenView/style.js index f3596be6a5..5bbf8a98f3 100644 --- a/src/components/fullscreenView/style.js +++ b/src/components/fullscreenView/style.js @@ -16,7 +16,6 @@ export const FullscreenViewContainer = styled.div` align-items: center; justify-content: flex-start; flex-direction: column; - align-items: center; z-index: ${zIndex.fullscreen}; overflow-y: scroll; -webkit-transform: translate3d(0, 0, 0); diff --git a/src/components/withCurrentUser/index.js b/src/components/withCurrentUser/index.js index 44caf92579..ce4dbee103 100644 --- a/src/components/withCurrentUser/index.js +++ b/src/components/withCurrentUser/index.js @@ -54,21 +54,10 @@ export const withCurrentUser = ( return ( {({ currentUser, isLoading }) => { - if (!currentUser) { - return ( - - ); - } - return ( From 353de9c55a9de88678cb42a7fd52fa380ab20f48 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Sat, 15 Dec 2018 18:26:04 +0000 Subject: [PATCH 2/8] Update moment to version 2.23.0 --- api/package.json | 2 +- api/yarn.lock | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/api/package.json b/api/package.json index bfae5ea052..2791dfb2fc 100644 --- a/api/package.json +++ b/api/package.json @@ -74,7 +74,7 @@ "lodash.intersection": "^4.4.0", "longjohn": "^0.2.12", "markdown-draft-js": "^0.6.3", - "moment": "^2.22.2", + "moment": "^2.23.0", "node-env-file": "^0.1.8", "node-localstorage": "^1.3.1", "now-env": "^3.1.0", diff --git a/api/yarn.lock b/api/yarn.lock index 54990191a9..b76b33d700 100644 --- a/api/yarn.lock +++ b/api/yarn.lock @@ -6576,11 +6576,16 @@ moment-timezone@^0.5.23: dependencies: moment ">= 2.9.0" -"moment@>= 2.9.0", moment@^2.15.2, moment@^2.20.1, moment@^2.22.2: +"moment@>= 2.9.0", moment@^2.15.2, moment@^2.20.1: version "2.22.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" integrity sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y= +moment@^2.23.0: + version "2.23.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.23.0.tgz#759ea491ac97d54bac5ad776996e2a58cc1bc225" + integrity sha512-3IE39bHVqFbWWaPOMHZF98Q9c3LDKGTmypMiTM2QygGXXElkFWIH7GxfmlwmY2vwa+wmNsoYZmG2iusf1ZjJoA== + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" From 030e069fca135cd47a859a752d835e11a9e4008f Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Sat, 15 Dec 2018 19:10:50 +0000 Subject: [PATCH 3/8] Update nodemon to version 1.18.9 --- desktop/package.json | 2 +- desktop/yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/desktop/package.json b/desktop/package.json index 745d98e30d..3eea4a08bc 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -20,7 +20,7 @@ "devDependencies": { "electron": "^3.0.11", "electron-builder": "^20.38.3", - "nodemon": "^1.18.8", + "nodemon": "^1.18.9", "rimraf": "^2.6.2" }, "scripts": { diff --git a/desktop/yarn.lock b/desktop/yarn.lock index 1800ad50fe..daf82e8817 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -1919,16 +1919,16 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -nodemon@^1.18.8: - version "1.18.8" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.18.8.tgz#eb4c0052dc81395bdc503f3c8ae3cba86ca7146a" - integrity sha512-CgC/JdCf+CT7Z+K6wWaV30t8GU1DPtXpr/6PuXC1/LboXCmUQNKOaz0AEMjoWDTt2AdHOBFxgv41dyC0i79SbA== +nodemon@^1.18.9: + version "1.18.9" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.18.9.tgz#90b467efd3b3c81b9453380aeb2a2cba535d0ead" + integrity sha512-oj/eEVTEI47pzYAjGkpcNw0xYwTl4XSTUQv2NPQI6PpN3b75PhpuYk3Vb3U80xHCyM2Jm+1j68ULHXl4OR3Afw== dependencies: chokidar "^2.0.4" debug "^3.1.0" ignore-by-default "^1.0.1" minimatch "^3.0.4" - pstree.remy "^1.1.3" + pstree.remy "^1.1.6" semver "^5.5.0" supports-color "^5.2.0" touch "^3.1.0" @@ -2285,10 +2285,10 @@ psl@^1.1.24: resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== -pstree.remy@^1.1.3: - version "1.1.4" - resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.4.tgz#a03d5dbc06ba639fb6dd4874644c4bad9882ec21" - integrity sha512-3kSyTN/iTJMxtL87idnFgTyOp2vQ6B/49QcHUO26kh2M2qahlUivFI1zWJ9FRFPoB+KgcP820JMOuIhkBJAP3Q== +pstree.remy@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.6.tgz#73a55aad9e2d95814927131fbf4dc1b62d259f47" + integrity sha512-NdF35+QsqD7EgNEI5mkI/X+UwaxVEbQaz9f4IooEmMUv6ZPmlTQYGjBPJGgrlzNdjSvIy4MWMg6Q6vCgBO2K+w== punycode@^1.4.1: version "1.4.1" From 7850449ba1e60787d334f29614ea4883b0c648e2 Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Sat, 15 Dec 2018 12:29:03 -0800 Subject: [PATCH 4/8] Attempt to fix bug in dm view --- api/models/thread.js | 2 +- api/queries/directMessageThread/participants.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/models/thread.js b/api/models/thread.js index 980822088b..137e6d657a 100644 --- a/api/models/thread.js +++ b/api/models/thread.js @@ -325,7 +325,7 @@ export const getViewableParticipantThreadsByUser = async ( getParticipantCommunityIds, ]); - const participantThreadIds = participantChannelIds.map(c => c.threadId); + const participantThreadIds = participantChannelIds.map(c => c && c.threadId); const distinctParticipantChannelIds = participantChannelIds .map(c => c.channelId) .filter((x, i, a) => a.indexOf(x) === i); diff --git a/api/queries/directMessageThread/participants.js b/api/queries/directMessageThread/participants.js index c9deaac9de..ca4cd4d913 100644 --- a/api/queries/directMessageThread/participants.js +++ b/api/queries/directMessageThread/participants.js @@ -5,14 +5,14 @@ import { signUser } from 'shared/imgix'; export default async ({ id }: { id: string }, _: any, ctx: GraphQLContext) => { const { loaders, user } = ctx; - if (!user || !user.id) return null; + if (!user || !user.id) return []; const canViewThread = await canViewDMThread(user.id, id, loaders); - if (!canViewThread) return null; + if (!canViewThread) return []; return loaders.directMessageParticipants.load(id).then(results => { - if (!results || results.length === 0) return null; + if (!results || results.length === 0) return []; return results.reduction.map(user => { return signUser(user); }); From a6858ab8b49b6b91d0b306201da44959608354b4 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" Date: Sat, 15 Dec 2018 23:55:28 +0000 Subject: [PATCH 5/8] Update electron to version 3.0.12 --- desktop/package.json | 2 +- desktop/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/package.json b/desktop/package.json index 3eea4a08bc..dd5d4f510c 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -18,7 +18,7 @@ "electron-window-state": "^5.0.3" }, "devDependencies": { - "electron": "^3.0.11", + "electron": "^3.0.12", "electron-builder": "^20.38.3", "nodemon": "^1.18.9", "rimraf": "^2.6.2" diff --git a/desktop/yarn.lock b/desktop/yarn.lock index daf82e8817..778946e047 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -823,10 +823,10 @@ electron-window-state@^5.0.3: jsonfile "^4.0.0" mkdirp "^0.5.1" -electron@^3.0.11: - version "3.0.11" - resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.11.tgz#81e350db741fc0f2997ecb2fef5ed085ca42a723" - integrity sha512-galllxAMT3HLbHNR6i5WXrUXzsxzz0D1X6vu3uFMhofU9Wdbxv2w7BAD/BcYTT4c1bu4nZEgXO6AvHXjq0Sksw== +electron@^3.0.12: + version "3.0.12" + resolved "https://registry.yarnpkg.com/electron/-/electron-3.0.12.tgz#7486ff1c60e9c22d8aadaee620695c42c9ddb2ac" + integrity sha512-stvGbqYzWv5qHHtjZZgA7gET3NPGLuxs68IHTrJqsqujQfXGkhMOh8tstpXl86kBdRpzZn7GaDlTWcgeFSmsPw== dependencies: "@types/node" "^8.0.24" electron-download "^4.1.0" From e6ee67708cf3975ebab786b7c57b1d90cb62a845 Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Sun, 16 Dec 2018 09:34:26 -0800 Subject: [PATCH 6/8] Group messages in one hour increments --- shared/clients/group-messages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/clients/group-messages.js b/shared/clients/group-messages.js index daf92baf87..0e5da2dcc9 100644 --- a/shared/clients/group-messages.js +++ b/shared/clients/group-messages.js @@ -59,7 +59,7 @@ export const sortAndGroupMessages = (messages: Array) => { */ const c = new Date(current.timestamp).getTime(); const p = new Date(previous.timestamp).getTime(); - return c > p + 21600000; + return c > p + 3600000; // one hour; }; // if we are evaulating a bubble from the same user From baac1db837ced12df69fcc25bd88796af79c2129 Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Sun, 16 Dec 2018 09:34:33 -0800 Subject: [PATCH 7/8] Fix community list padding --- src/views/dashboard/style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/dashboard/style.js b/src/views/dashboard/style.js index 4d5b11e3a6..35b29a9516 100644 --- a/src/views/dashboard/style.js +++ b/src/views/dashboard/style.js @@ -183,7 +183,7 @@ export const CommunityListItem = styled.div` grid-auto-rows: 48px auto; grid-template-areas: 'icon title' 'menu menu'; min-height: 48px; - padding: 8px; + padding: 8px 16px; justify-items: start; align-items: center; cursor: pointer; From f8737dca02e77b37977c92917ec88486bc08c768 Mon Sep 17 00:00:00 2001 From: Brian Lovin Date: Sun, 16 Dec 2018 10:10:55 -0800 Subject: [PATCH 8/8] 2.5.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f1c5602934..c6e972e30f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Spectrum", - "version": "2.5.2", + "version": "2.5.3", "license": "BSD-3-Clause", "devDependencies": { "@babel/preset-flow": "^7.0.0",