Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.
Merged

v2.7.0 #4627

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
6082049
Debounce communities search query on front page instead of throttling
raunofreiberg Dec 4, 2018
74e02d3
Add missing 3rd parameter to debounce
raunofreiberg Dec 4, 2018
be43fe4
[WIP] Move thread editor to plaintext
Jan 23, 2019
9d55b1c
Fix composer padding
Jan 23, 2019
cc0a9a1
Start working on client-side image uploads
Jan 24, 2019
9d7211b
WIP: threadcomposer refactor first iteration
ThomasRoest Jan 24, 2019
76166c8
set styles based on isOpen prop
ThomasRoest Jan 25, 2019
7c442ab
update inserter icon design
ThomasRoest Jan 28, 2019
c37ec6c
Update draft-js-import-markdown to fix link swallowing
brianlovin Jan 29, 2019
abff49c
Merge pull request #4597 from withspectrum/fix-double-links
mxstbr Jan 29, 2019
8f8c505
Fix dev:api:s3 script to not show logging
brianlovin Jan 29, 2019
0790a7b
Fix file uploads
brianlovin Jan 29, 2019
34c9326
Merge branch 'alpha' into plaintext-thread-editor
Jan 30, 2019
d0ed008
Nice client-side image uploads
Jan 30, 2019
4d10e89
Fix flow
Jan 30, 2019
97d3f97
Remove console.log
Jan 30, 2019
b5741a3
Only add newline on file drop if required
Jan 30, 2019
bfad38b
Add parseEmbedsFromText util to API
Jan 30, 2019
5e2e03b
Automatically add embeds to published threads
Jan 30, 2019
c6a69fc
Handle embeds in thread editing
Jan 30, 2019
2d9eb27
Add empty block below embed atomic block to make editing work
Jan 30, 2019
2b066cf
Only do automatic embeds from plain text
Jan 30, 2019
14b6163
Update draft-js-import-markdown to version 1.3.0
depfu[bot] Jan 31, 2019
f97347b
Merge pull request #4598 from withspectrum/depfu/update/api/yarn/draf…
brianlovin Jan 31, 2019
81095ec
Update highlight.js to version 9.14.1
depfu[bot] Jan 31, 2019
af355be
add/update composer toggle in inbox view
ThomasRoest Jan 31, 2019
7406b39
add composer toggle / placeholder to channel view
ThomasRoest Jan 31, 2019
cfde19f
update toggle / composer in empty threadfeed component / upsell
ThomasRoest Jan 31, 2019
dfa5558
Abstract draftjs auto embed parsing
Jan 31, 2019
50d9f65
Move thread body processing to shared/
Jan 31, 2019
ca398f2
Add preview tab to new plaintext editor
Jan 31, 2019
426da06
Add mention suggestions to thread composer
Jan 31, 2019
98f0a4a
Fix building web frontend
Jan 31, 2019
3d55eaa
Remove server Raven import from shared code
Jan 31, 2019
df3dfa6
Add data-cy to new composer
Jan 31, 2019
175524b
Fix /new/thread e2e tests
Jan 31, 2019
37724dd
Update graphql-rate-limit to version 1.2.3
depfu[bot] Jan 31, 2019
6f2ab27
Styling polish and markdown hint in thread composer
brianlovin Jan 31, 2019
f893617
Merge pull request #4600 from withspectrum/depfu/update/api/yarn/grap…
brianlovin Jan 31, 2019
0a6c9e7
Merge pull request #4599 from withspectrum/depfu/update/api/yarn/high…
brianlovin Jan 31, 2019
def7374
Fix flow
brianlovin Jan 31, 2019
445c22f
Update aws-sdk to version 2.395.0
depfu[bot] Jan 31, 2019
3fa968e
Update aws-sdk to version 2.395.0
depfu[bot] Feb 1, 2019
a017c2a
Update aws-sdk to version 2.395.0
depfu[bot] Feb 1, 2019
b44e6d0
Update slate to version 0.44.10
depfu[bot] Feb 1, 2019
4d6d992
fix upsell for community view
ThomasRoest Feb 1, 2019
2a3690d
Merge pull request #4602 from withspectrum/depfu/update/analytics/yar…
brianlovin Feb 1, 2019
3315510
Merge pull request #4604 from withspectrum/depfu/update/chronos/yarn/…
brianlovin Feb 1, 2019
7d393b0
Merge pull request #4606 from withspectrum/depfu/update/vulcan/yarn/a…
brianlovin Feb 1, 2019
e454b60
Merge pull request #4607 from withspectrum/depfu/update/api/yarn/slat…
brianlovin Feb 1, 2019
1120775
Update highlight.js to version 9.14.2
depfu[bot] Feb 2, 2019
fd5a295
Resolve unknown prop warning
mxstbr Feb 4, 2019
a6caaeb
Support rendering alt for images in threads
mxstbr Feb 4, 2019
2e02893
Potentially work around draftjs plugins issue in preview
mxstbr Feb 4, 2019
8e569ec
Fix flow typings
mxstbr Feb 4, 2019
cf75b15
Merge pull request #4608 from withspectrum/depfu/update/api/yarn/high…
brianlovin Feb 4, 2019
8f21a0f
Upgrade draft-js-import-markdown
mxstbr Feb 6, 2019
2ac0117
Fix image previews in thread content
mxstbr Feb 6, 2019
ebd97e6
Fix persisting drafts to localstorage
mxstbr Feb 6, 2019
c2e3637
Insert client-side uploaded images at cursor position
mxstbr Feb 6, 2019
e16e71d
Add "Drop image to upload" overlay to thread composer
mxstbr Feb 6, 2019
b594ef4
Fix e2e test with new data-cy attr
mxstbr Feb 6, 2019
ef9cd69
Merge branch 'alpha' into plaintext-thread-editor
mxstbr Feb 6, 2019
1727de2
Clean up drop image overlay styling
mxstbr Feb 6, 2019
d2cfe3f
Fix code block styling
mxstbr Feb 6, 2019
5a15944
Make code syntax highlighting work from markdown
mxstbr Feb 6, 2019
3e7743d
Add flow type annotations to customStyleFn
mxstbr Feb 6, 2019
3488b3d
Update draft-js-import-markdown to version 1.3.1
depfu[bot] Feb 6, 2019
8293dae
Merge pull request #4613 from withspectrum/depfu/update/api/yarn/draf…
brianlovin Feb 7, 2019
145041b
Add "Upload Image" button to plaintext thread editor
mxstbr Feb 7, 2019
338310c
add updated composer to community index view
ThomasRoest Feb 7, 2019
6e62dee
Merge branch 'alpha' into plaintext-thread-editor
Feb 7, 2019
28ad82c
add updated composer slider to inbox / dashboard view
ThomasRoest Feb 7, 2019
521ae30
Clean up mobile upload image button placement
Feb 7, 2019
c51add4
add updated composer to channel view
ThomasRoest Feb 8, 2019
319d225
Downgrade to apollo-server@2.3
Feb 8, 2019
f9b22b1
Merge branch 'feature/refactor-threadcomposer' into plaintext-thread-…
Feb 8, 2019
cc72707
Fix layout on /new/thread
Feb 8, 2019
c5f85a3
Fix thread-composer data-cy attribute
Feb 8, 2019
e0d0d6e
Monitor server instance memory to DataDog
Feb 8, 2019
a3979c5
Fix e2e tests
Feb 8, 2019
9172f1a
Delete unused composer
Feb 8, 2019
6fd1a45
Fix actions padding
brianlovin Feb 8, 2019
a424337
Change placeholders
brianlovin Feb 8, 2019
9e769c2
Return signed images so image previews work
brianlovin Feb 8, 2019
4354c08
Preserve redirectPath prop for join token routes
brianlovin Feb 8, 2019
71a400a
Merge pull request #4616 from withspectrum/fix-join-link-redirects
mxstbr Feb 9, 2019
557189d
Merge pull request #4615 from withspectrum/monitor-memory-usage-node
mxstbr Feb 9, 2019
a03f4b8
remove active overlay / focus state from image in composer
ThomasRoest Feb 10, 2019
e966920
Merge pull request #4619 from ThomasRoest/plaintext-thread-editor
mxstbr Feb 11, 2019
979034a
Add support for link entites to links decorator
Feb 11, 2019
c2ba637
Fix markdown links in thread bodies
Feb 11, 2019
aaefe6f
Fix rendering messages
Feb 11, 2019
a659241
Merge branch 'alpha' into debounce-communities-search
Feb 11, 2019
2999b94
Clean up debounce homepage community search
Feb 11, 2019
cf1cb23
Cleanup new user onboarding community search
Feb 11, 2019
057da28
Fix DM thread creation user search UX
Feb 11, 2019
a3aa4f1
Fix editing plain text messages
Feb 11, 2019
c0f005a
Merge pull request #4623 from withspectrum/edit-text-message
mxstbr Feb 11, 2019
650c10a
Break words while editing messages on mobile
brianlovin Feb 12, 2019
f080fd5
Merge pull request #4408 from raunofreiberg/debounce-communities-search
mxstbr Feb 12, 2019
9bad727
Merge pull request #4625 from withspectrum/mobile-text-overflow
mxstbr Feb 12, 2019
8e903bc
Merge pull request #4564 from withspectrum/plaintext-thread-editor
mxstbr Feb 12, 2019
b8d2798
Fix mentions in plaintext thread composer
Feb 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"amplitude": "^3.5.0",
"aws-sdk": "^2.383.0",
"aws-sdk": "^2.395.0",
"bull": "3.3.10",
"datadog-metrics": "^0.8.1",
"debug": "^4.1.1",
Expand Down
15 changes: 5 additions & 10 deletions analytics/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ asynckit@^0.4.0:
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=

aws-sdk@^2.383.0:
version "2.383.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.383.0.tgz#86045c0a4a4898dca84a4877cbe765b7dc0f8bba"
integrity sha512-PN+s+NTABtBloS46c7C2dvoEzrdY2NZ5nsfljL3xDX2rvjJEQxdchS2jcCpyc5ZNudFwta66wY4EGBZqf4Attw==
aws-sdk@^2.395.0:
version "2.395.0"
resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.395.0.tgz#637e5fa06d69bfb923b17bde24a8bd2a74dedab3"
integrity sha512-ldTTjctniZT4E2lq2z3D8Y2u+vpkp+laoEnDkXgjKXTKbiJ0QEtfWsUdx/IQ7awCt8stoxyqZK47DJOxIbRNoA==
dependencies:
buffer "4.9.1"
events "1.1.1"
Expand All @@ -26,7 +26,7 @@ aws-sdk@^2.383.0:
querystring "0.2.0"
sax "1.2.1"
url "0.10.3"
uuid "3.1.0"
uuid "3.3.2"
xml2js "0.4.19"

base64-js@^1.0.2:
Expand Down Expand Up @@ -713,11 +713,6 @@ util-deprecate@~1.0.1:
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=

uuid@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
integrity sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==

uuid@3.3.2, uuid@^3.1.0:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
Expand Down
8 changes: 8 additions & 0 deletions api/mutations/files/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// @flow
import uploadImage from './uploadImage';

module.exports = {
Mutation: {
uploadImage,
},
};
23 changes: 23 additions & 0 deletions api/mutations/files/uploadImage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// @flow
import { isAuthedResolver } from '../../utils/permissions';
import { uploadImage } from '../../utils/file-storage';
import type { EntityTypes } from 'shared/types';
import type { GraphQLContext } from '../../';
import type { FileUpload } from 'shared/types';
import { signImageUrl } from 'shared/imgix';

type Args = {
input: {
image: FileUpload,
type: EntityTypes,
id?: string,
},
};

export default isAuthedResolver(
async (_: void, { input }: Args, { loaders }: GraphQLContext) => {
const { image, type, id } = input;
const url = await uploadImage(image, type, id || 'draft');
return await signImageUrl(url);
}
);
25 changes: 10 additions & 15 deletions api/mutations/thread/publishThread.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
// @flow
const debug = require('debug')('api:mutations:thread:publish-thread');
import stringSimilarity from 'string-similarity';
import { convertToRaw } from 'draft-js';
import {
convertToRaw,
convertFromRaw,
EditorState,
SelectionState,
} from 'draft-js';
import { stateFromMarkdown } from 'draft-js-import-markdown';
import type { GraphQLContext } from '../../';
import UserError from '../../utils/UserError';
import { uploadImage } from '../../utils/file-storage';
import processThreadContent from 'shared/draft-utils/process-thread-content';
import {
publishThread,
editThread,
Expand Down Expand Up @@ -68,22 +74,11 @@ export default requireAuth(
);
}

if (type === 'TEXT') {
type = 'DRAFTJS';
if (thread.content.body) {
thread.content.body = JSON.stringify(
convertToRaw(
stateFromMarkdown(thread.content.body, {
parserOptions: {
breaks: true,
},
})
)
);
}
if (thread.content.body) {
thread.content.body = processThreadContent(type, thread.content.body);
}

thread.type = type;
thread.type = 'DRAFTJS';

const [
currentUserChannelPermissions,
Expand Down
10 changes: 5 additions & 5 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"dependencies": {
"algoliasearch": "^3.32.0",
"apollo-local-query": "^0.3.1",
"apollo-server-express": "2.4.0-alpha.0",
"apollo-server-express": "^2.4.0",
"apollo-upload-client": "^9.1.0",
"aws-sdk": "2.200.0",
"axios": "^0.16.2",
Expand Down Expand Up @@ -35,7 +35,7 @@
"draft-js-embed-plugin": "^1.2.0",
"draft-js-focus-plugin": "2.0.0-rc2",
"draft-js-image-plugin": "2.0.0-rc8",
"draft-js-import-markdown": "^1.2.3",
"draft-js-import-markdown": "^1.3.1",
"draft-js-linkify-plugin": "^2.0.0-beta1",
"draft-js-markdown-plugin": "^1.4.4",
"draft-js-plugins-editor": "^2.1.1",
Expand All @@ -54,10 +54,10 @@
"graphql-date": "^1.0.3",
"graphql-depth-limit": "^1.1.0",
"graphql-log": "^0.1.3",
"graphql-rate-limit": "^1.2.2",
"graphql-rate-limit": "^1.2.3",
"graphql-tools": "^4.0.4",
"helmet": "^3.15.0",
"highlight.js": "^9.13.1",
"highlight.js": "^9.14.2",
"history": "^4.6.1",
"hoist-non-react-statics": "^2.5.5",
"host-validation": "^1.2.0",
Expand Down Expand Up @@ -121,7 +121,7 @@
"sanitize-filename": "^1.6.1",
"serialize-javascript": "^1.6.1",
"session-rethinkdb": "^2.0.0",
"slate": "^0.44.9",
"slate": "^0.44.10",
"slate-markdown": "0.1.0",
"slugg": "^1.1.0",
"string-replace-to-array": "^1.0.3",
Expand Down
2 changes: 2 additions & 0 deletions api/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const notificationMutations = require('./mutations/notification');
const userMutations = require('./mutations/user');
const metaMutations = require('./mutations/meta');
const communityMemberMutations = require('./mutations/communityMember');
const fileMutations = require('./mutations/files');

const messageSubscriptions = require('./subscriptions/message');
const notificationSubscriptions = require('./subscriptions/notification');
Expand Down Expand Up @@ -125,6 +126,7 @@ const resolvers = merge(
userMutations,
metaMutations,
communityMemberMutations,
fileMutations,
// subscriptions
messageSubscriptions,
notificationSubscriptions,
Expand Down
18 changes: 18 additions & 0 deletions api/types/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,24 @@ const general = /* GraphQL */ `
createdAt: String
status: String
}

enum EntityTypes {
communities
channels
users
threads
}

input UploadImageInput {
image: Upload!
type: EntityTypes!
id: String
}

extend type Mutation {
uploadImage(input: UploadImageInput!): String
@rateLimit(max: 20, window: "20m")
}
`;

module.exports = general;
Loading