From 4ae68b4bd3dbdae66c2ad418418e5892520fe7c9 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Thu, 20 Apr 2017 15:07:55 -0600 Subject: [PATCH 1/5] make the login pop-up scale on mobile --- views/embed/stream.ejs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/embed/stream.ejs b/views/embed/stream.ejs index 498090e32..d99d4bce1 100644 --- a/views/embed/stream.ejs +++ b/views/embed/stream.ejs @@ -1,6 +1,8 @@ + + From a2131c205aa7576a0ccbc6a4b99b83ae45b8c3fa Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Thu, 20 Apr 2017 15:14:15 -0600 Subject: [PATCH 2/5] make the viewport non-scalable on mobile. make input font-size bigger to prevent mobile zoom effect --- client/coral-sign-in/components/CreateUsernameDialog.js | 1 + client/coral-sign-in/components/ForgotContent.js | 1 + client/coral-sign-in/components/SignInContent.js | 2 ++ client/coral-sign-in/components/SignUpContent.js | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/client/coral-sign-in/components/CreateUsernameDialog.js b/client/coral-sign-in/components/CreateUsernameDialog.js index 38fe9dd83..b94b47c42 100644 --- a/client/coral-sign-in/components/CreateUsernameDialog.js +++ b/client/coral-sign-in/components/CreateUsernameDialog.js @@ -38,6 +38,7 @@ const CreateUsernameDialog = ({open, handleClose, formData, handleSubmitUsername
this.emailInput = input} type="text" + style={{fontSize: 16}} id="email" name="email" />
diff --git a/client/coral-sign-in/components/SignInContent.js b/client/coral-sign-in/components/SignInContent.js index b057e57bd..7460efb97 100644 --- a/client/coral-sign-in/components/SignInContent.js +++ b/client/coral-sign-in/components/SignInContent.js @@ -58,6 +58,7 @@ const SignInContent = ({ type="email" label={lang.t('signIn.email')} value={formData.email} + style={{fontSize: 16}} onChange={handleChange} />
diff --git a/client/coral-sign-in/components/SignUpContent.js b/client/coral-sign-in/components/SignUpContent.js index d127cc2c7..921f045be 100644 --- a/client/coral-sign-in/components/SignUpContent.js +++ b/client/coral-sign-in/components/SignUpContent.js @@ -83,6 +83,7 @@ class SignUpContent extends React.Component { type="email" label={lang.t('signIn.email')} value={formData.email} + style={{fontSize: 16}} showErrors={showErrors} errorMsg={errors.email} onChange={handleChange} @@ -93,6 +94,7 @@ class SignUpContent extends React.Component { label={lang.t('signIn.username')} value={formData.username} showErrors={showErrors} + style={{fontSize: 16}} errorMsg={errors.username} onChange={handleChange} /> @@ -102,6 +104,7 @@ class SignUpContent extends React.Component { label={lang.t('signIn.password')} value={formData.password} showErrors={showErrors} + style={{fontSize: 16}} errorMsg={errors.password} onChange={handleChange} minLength="8" @@ -112,6 +115,7 @@ class SignUpContent extends React.Component { type="password" label={lang.t('signIn.confirmPassword')} value={formData.confirmPassword} + style={{fontSize: 16}} showErrors={showErrors} errorMsg={errors.confirmPassword} onChange={handleChange} From bcf31e5fa98411b23225858e8074892d88484eda Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Thu, 20 Apr 2017 15:19:19 -0600 Subject: [PATCH 3/5] reporting a comment zooms the window --- client/coral-embed-stream/style/default.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/coral-embed-stream/style/default.css b/client/coral-embed-stream/style/default.css index b99b109ac..13a200690 100644 --- a/client/coral-embed-stream/style/default.css +++ b/client/coral-embed-stream/style/default.css @@ -396,6 +396,7 @@ button.comment__action-button[disabled], margin-left: 20px; margin-top: 5px; width: 75%; + font-size: 16px; } /* Close comments */ @@ -490,4 +491,4 @@ button.comment__action-button[disabled], .commentActionsLeft.comment__action-container .coral-plugin-replies-reply-button .coral-plugin-replies-icon { visibility: visible; } -} \ No newline at end of file +} From a58e15c4c8a079c29e49307af44c992343db0565 Mon Sep 17 00:00:00 2001 From: Riley Davis Date: Thu, 20 Apr 2017 18:00:06 -0600 Subject: [PATCH 4/5] let ApolloClient know which types are interfaces --- client/coral-admin/src/services/client.js | 2 ++ .../src/services/fragmentMatcher.js | 33 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 client/coral-admin/src/services/fragmentMatcher.js diff --git a/client/coral-admin/src/services/client.js b/client/coral-admin/src/services/client.js index 7f6a0567d..7d65f3f92 100644 --- a/client/coral-admin/src/services/client.js +++ b/client/coral-admin/src/services/client.js @@ -1,7 +1,9 @@ import ApolloClient, {addTypename} from 'apollo-client'; import getNetworkInterface from './transport'; +import fragmentMatcher from './fragmentMatcher'; export const client = new ApolloClient({ + fragmentMatcher, addTypename: true, queryTransformer: addTypename, dataIdFromObject: (result) => { diff --git a/client/coral-admin/src/services/fragmentMatcher.js b/client/coral-admin/src/services/fragmentMatcher.js new file mode 100644 index 000000000..daa01a538 --- /dev/null +++ b/client/coral-admin/src/services/fragmentMatcher.js @@ -0,0 +1,33 @@ +import {IntrospectionFragmentMatcher} from 'apollo-client'; + +// TODO this is a short-term fix +// we need to set up something to query the server for the schema before ApolloClient initialization +// https://github.com/apollographql/apollo-client/issues/1555#issuecomment-295834774 +const fm = new IntrospectionFragmentMatcher({ + introspectionQueryResultData: { + __schema: { + types: [ + { + kind: 'INTERFACE', + name: 'Action', + possibleTypes: [ + {name: 'FlagAction'}, + {name: 'LikeAction'}, + {name: 'DontAgreeAction'} + ], + }, + { + kind: 'INTERFACE', + name: 'ActionSummary', + possibleTypes: [ + {name: 'FlagActionSummary'}, + {name: 'LikeActionSummary'}, + {name: 'DontAgreeActionSummary'} + ], + } + ], + }, + } +}); + +export default fm; From 5048fbb7f0edd179decdb238328a3a87f31ba2e6 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Fri, 21 Apr 2017 12:47:21 -0600 Subject: [PATCH 5/5] Added fix for flag actions --- graph/resolvers/flag_action.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/graph/resolvers/flag_action.js b/graph/resolvers/flag_action.js index 80d1583ad..e4b30c408 100644 --- a/graph/resolvers/flag_action.js +++ b/graph/resolvers/flag_action.js @@ -8,7 +8,9 @@ const FlagAction = { return group_id; }, user({user_id}, _, {loaders: {Users}}) { - return Users.getByID.load(user_id); + if (user_id) { + return Users.getByID.load(user_id); + } }, };