sentynel / talk Goto Github PK
View Code? Open in Web Editor NEWThis project forked from coralproject/talk
A better commenting experience from Vox Media
Home Page: https://coralproject.net
License: Other
This project forked from coralproject/talk
A better commenting experience from Vox Media
Home Page: https://coralproject.net
License: Other
This isn't a custom feature, it was included by default in the previous version and is now gone. They've talked about a more generic tagging system getting added at some point, but I don't have an ETA. I don't really have a good feel for how useful people find the off topic tag in practice - I liked the idea but haven't really used it very much; I'll probably raise this as a discussion point with the wider group, but I'm personally inclined to just bin it for the time being and add it back if generic tagging shows up at some point.
User report:
On https://www.angrymetalguy.com/stuck-in-the-filter-julys-angry-misses/ the comments section completely disappears if "Sort by" is anything other than the default "Newest" (I have it set to "Oldest"). You'll see the comments section loading, then it just vanishes. If I set it back to sorting by Newest, then the comments load normally again.
As far as I can tell it only happens on that particular post, all of the others I've tried (including the other Stuck in the filter post) work. It happens on both Firefox (my main browser) and (Chromium-based) Edge, so it doesn't appear to be browser bug. Doesn't matter if I'm logged in or not. It's... weird.
User report:
Just signed in for the first time with Google, added my email address and then for the following error
Aug 09 00:01:24 server08.angrymetalguy.com node[3113493]: {"name":"coral","hostname":"server08.angrymetalguy.com","pid":3113493,"context":"graph","contextID":"ef6f5cf0-f8a4-11eb-9ab4-b1e6997fbc9c","tenantID":"2dcaf8c0-2167-4de
a-a85e-adf5b70c892b","level":30,"responseTime":31,"authenticated":true,"userID":"117217442628201367191","persistedQueryID":"488b568f6362f3f1e1a23b6698a5fc61","persistedQueryBundle":"stream","persistedQueryVersion":"6.13.1","op
eration":"query","operationName":"AllCommentsTabQuery","msg":"graphql query","time":"2021-08-09T00:01:24.067Z","src":{"file":"/opt/coral/talk-6.13.1/src/core/server/graph/plugins/logger.ts","line":95,"func":"logQuery"},"v":0}
Aug 09 00:01:24 server08.angrymetalguy.com node[3113493]: {"name":"coral","hostname":"server08.angrymetalguy.com","pid":3113493,"context":"graph","contextID":"ef6f5cf0-f8a4-11eb-9ab4-b1e6997fbc9c","tenantID":"2dcaf8c0-2167-4de
a-a85e-adf5b70c892b","level":50,"err":{"message":"INTERNAL_ERROR: Cannot return null for non-nullable field User.id.","name":"WrappedInternalError","stack":"Object.getWrappedOriginalError (src/core/server/graph/plugins/helpers
.ts:155:10)\nlogAndReportError (src/core/server/graph/plugins/logger.ts:21:15)\nforEach (src/core/server/graph/plugins/logger.ts:118:44)\nArray.forEach (<anonymous>)\nObject.willSendResponse (src/core/server/graph/plugins/logg
er.ts:118:27)\nnode_modules/apollo-server-core/src/utils/dispatcher.ts:20:23\nArray.map (<anonymous>)\nDispatcher.callTargets (node_modules/apollo-server-core/src/utils/dispatcher.ts:17:20)\nDispatcher.<anonymous> (node_module
s/apollo-server-core/src/utils/dispatcher.ts:30:12)\nGenerator.next (<anonymous>)\nnode_modules/apollo-server-core/dist/utils/dispatcher.js:8:71\nnew Promise (<anonymous>)\n__awaiter (node_modules/apollo-server-core/dist/utils
/dispatcher.js:4:12)\nDispatcher.invokeHookAsync (node_modules/apollo-server-core/dist/utils/dispatcher.js:26:16)\nnode_modules/apollo-server-core/src/requestPipeline.ts:566:22\nGenerator.next (<anonymous>)\n","id":"ef752950-f
8a4-11eb-9ab4-b1e6997fbc9c","context":{"pub":{},"pvt":{"reason":"wrapped internal error"}},"originalError":{"message":"Cannot return null for non-nullable field User.id.","name":"Error","stack":"completeValue (node_modules/gra
phql/execution/execute.js:560:13)\ncompleteValueCatchingError (node_modules/graphql/execution/execute.js:495:19)\nresolveField (node_modules/graphql/execution/execute.js:435:10)\nexecuteFields (node_modules/graphql/execution/e
xecute.js:275:18)\ncollectAndExecuteSubfields (node_modules/graphql/execution/execute.js:713:10)\ncompleteObjectValue (node_modules/graphql/execution/execute.js:703:10)\ncompleteValue (node_modules/graphql/execution/execute.js
:591:12)\ncompleteValue (node_modules/graphql/execution/execute.js:557:21)\ncompleteValueCatchingError (node_modules/graphql/execution/execute.js:495:19)\nnode_modules/graphql/execution/execute.js:618:25\nArray.forEach (<anony
mous>)\nforEach (node_modules/iterall/index.js:83:25)\ncompleteListValue (node_modules/graphql/execution/execute.js:614:24)\ncompleteValue (node_modules/graphql/execution/execute.js:573:12)\ncompleteValue (node_modules/graphql
/execution/execute.js:557:21)\nnode_modules/graphql/execution/execute.js:492:16\n"}},"report":null,"msg":"graphql query error","time":"2021-08-09T00:01:24.070Z","src":{"file":"/opt/coral/talk-6.13.1/src/core/server/graph/plugi
ns/logger.ts","line":25,"func":"logAndReportError"},"v":0}
It's now gained support for Giphy, YouTube and Twitter embeds natively, so I would be inclined to piggyback off that for a generic image embed and/or an Imgur specific embed.
If it's easy to add additional embed hooks, supporting Bandcamp would be very cool.
A public tool for doing this has been "coming soon" all year, and it's the main reason I haven't done any of this already, but my patience is becoming somewhat limited and I already wrote one importer when we moved over from Disqus and it wasn't really that bad. I need to poke around the database now I've got it up and running and eyeball how much trouble this will really be.
I'm working on this at the moment - it seems fairly tractable. Some weird corner cases, which I'm using a validation library to catch.
Not setting a property somewhere:
"originalError": {
"message": "Cannot read property 'ACTIVE' of undefined",
"name": "TypeError",
"stack": "statusFilter (src/core/server/graph/loaders/Users.ts:42:32)\nObject.connection (src/core/server/graph/loaders/Users.ts:131:14)\nusers (src/core/server/graph/resolvers/Query.ts:17:51)\ndist/schema/src/attachDirectiveResolvers.js:21:44\nnew Promise (<anonymous>)\ndist/schema/src/attachDirectiveResolvers.js:20:47\nauth (src/core/server/graph/directives/auth.ts:176:14)\ndefault_1.newFieldConfig.resolve (dist/schema/src/attachDirectiveResolvers.js:20:32)\ndetails.field.resolve (src/core/server/graph/directives/constraint.ts:50:31)\nfield.resolve (node_modules/graphql-extensions/src/index.ts:274:18)\nfield.resolve (node_modules/apollo-server-core/src/utils/schemaInstrumentation.ts:103:18)\nresolveFieldValueOrError (node_modules/graphql/execution/execute.js:467:18)\nresolveField (node_modules/graphql/execution/execute.js:434:16)\nexecuteFields (node_modules/graphql/execution/execute.js:275:18)\nexecuteOperation (node_modules/graphql/execution/execute.js:219:122)\nexecuteImpl (node_modules/graphql/execution/execute.js:104:14)\n"
}
This should be reasonably easy I think - there's partial support for avatars in there already and we ought to be able to crib from the user bio that's in there now to get the UI widgets/API routes/etc to edit your own avatar. My current implementation just does a very basic validation that the supplied thing looks vaguely like an image URL, which has been fine.
You need to add "featureFlags": ["AVATARS"]
to the tenant object in the database to turn on the built-in avatar support. There's code that does this but it's not exposed in the interface at all as far as I can see; running db.tenants.update({}, {$addToSet: {featureFlags: "AVATARS"}})
from the Mongo shell is sufficient (with the server stopped). It pulls avatars from SSO services (Google/Facebook) automatically. This will need some CSS tweaks (at least) on the display side and a UI exposing to set your avatar directly.
Right now we allow people to have an account with only a Google or Facebook login. This isn't ideal, because you need an email address to turn on notifications, and there's not a way of adding one at the moment. The current version of Coral grabs the email address from your Google/Facebook SSO. However, it also insists you set a password, which I'm not particularly fond of (I don't see why we should need to make people set passwords when they're using SSO and it's an additional barrier to registration which will put people off). Sub-questions here:
How easy is it to get it to not force setting a password for SSO accounts?
(Related to #5) How does it handle imported SSO accounts which do not currently have an email address set? Does it do something sensible already?
Some stories have Unicode in their URLs:
https://www.angrymetalguy.com/medico-peste-%D7%91-the-black-bile-review/
You would expect this to be treated consistently by browsers, but it's not! Most use this representation, but some lowercase the percent escapes, and some just hand over the unicode directly. (I don't know which, annoyingly - I can just see the database entries the scraper has created for all three.)
Needs testing on latest and reporting upstream if it exists there.
It would be nice to update the custom CSS to get font/size etc to match the rest of the site a bit better. Probably doesn't need to be any more thorough than that.
I'm getting either two copies of the same notification in the same email, or two separate notifications in two subsequent (hourly window) notification emails. This seems fairly consistent. I don't think I've done anything which should break this so it might be an upstream issue. Will need to figure out how to turn on emails or email debugging in the debug build.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.