Review on #231 On-boarding tutorial
The unit tests are extremely helpful when I read through the code. Thanks for providing the thorough tests cases! I have some comments regarding wording and how `replies` array can be constructed.
Comment on #231 On-boarding tutorial
Please replace `"send your message to our chatroom"` with `"Send messages to chats"` to match <https://github.com/cofacts/rumors-line-bot/issues/216#issuecomment-718374931|LINE UI> and also update the translate file key, thanks!
Comment on #231 On-boarding tutorial
It seems that `createPermissionSetupDialog` does not return a promise, thus no need to `await` here? Please check if all `await` in this method are necessary. If all of them are not, we may remove `async` for `tutorial()` as well :+1: Another thing is, no matter we need `await` or not, the construction of `replies` can be simplied using object spread operator: ``` replies = [ { type: 'text', text: replyProvidePermissionSetup, }, { ...await createPermissionSetupDialog(askForPermissionSetup), quickReply: {...} }, ] ``` The pattern above can be applied to all other `if` cases and replace all `replies.push()` invocation.
Comment on #231 On-boarding tutorial
Why does serve middleware not work for dev environment?
#4 Remove privacy information from reply reference
As title
Comment on #231 [wip] Cleanuptests
<https://coveralls.io/builds/34667833|Coverage Status> Coverage decreased (-0.03%) to 86.035% when pulling *<https://github.com/cofacts/rumors-api/commit/f4ec4b2c9d52c7fa56533a2a7ef27fb72e2bc441|f4ec4b2> on cleanuptests* into *<https://github.com/cofacts/rumors-api/commit/177693c345bcbbed7e442f1c71fec3bf3a075e0e|177693c> on backendUsers*.
Nit: seems that this file is no longer a graphql mutation and is more like a util function. Maybe we can consider moving it to `graphql/models/User`, or move to `util` (along with all utility functions under `graphql/models/User`). We may <https://github.com/magicmark/jest-how-do-i-mock-x/blob/master/src/function-in-same-module/README.md|need some work around to properly mock these utility in the same file>.
nit: `appUserId` here actually can be db user id or app user id. Maybe we can denote this in the doc string, or even choose to change argument name to `dbOrAppUserId` or just `userId`.
LGTM! Thanks for the fix! Added some nit-picking comments that should not be merge blockers. Feel free to adapt and merge anytime :)
nit: indent XD
It's looking great! Thanks for making the tests more robust!
Comment on #231 On-boarding tutorial
I don't know liff uses proxy to a webpack server for development, just copy and paste the `/liff` part to apply `/static` at that time.
Comment on #231 On-boarding tutorial
Text will ellipsis before assigning to altText, so the snapshot looks a little weird.
Review on #231 On-boarding tutorial
LGTM! Let's merge!
HackMD
Cofacts Toolkit ======= ### Introduction - [Cofacts Tutorial](<https://g0v.hackmd.io/Waz-B9sORSOPLp>
#233 Update tutorial wording and compress images
Details see : <https://g0v.hackmd.io/Sl_84QO8TQ6WKKI0bT4pYw#%E6%9C%AA%E7%AB%9F%E9%A0%85%E7%9B%AE|https://g0v.hackmd.io/Sl_84QO8TQ6WKKI0bT4pYw#%E6%9C%AA%E7%AB%9F%E9%A0%85%E7%9B%AE>
Comment on #233 Update tutorial wording and compress images
*Pull Request Test Coverage Report for <https://coveralls.io/builds/34710866|Build 1202>* • *0* of *0* changed or added relevant lines in *0* files are covered. • No unchanged relevant lines lost coverage. • Overall coverage remained the same at *85.94%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
Review on #233 Update tutorial wording and compress images
LGTM, thanks for the timely fix!
Fix wrong image order caused by commit `Compress tutorial images`. bug snapshot <https://user-images.githubusercontent.com/6376572/98199754-e855e280-1f66-11eb-8364-3d8e48cd7d4f.png|Screenshot_20201105-124700>
Comment on #234 Fix tutorial image order
*Pull Request Test Coverage Report for <https://coveralls.io/builds/34729643|Build 1207>* • *0* of *0* changed or added relevant lines in *0* files are covered. • No unchanged relevant lines lost coverage. • Overall coverage remained the same at *85.94%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
Review on #234 Fix tutorial image order
Thanks for the fix! If applicable, I suggest adding cache busting argument (like `${RUMORS_LINE_BOT_URL}/xxx.png?v=20201105`) to make sure users get the latest image after deploy.
Thanks for the refactor! Let's merge this. I will try deploy it to staging before wednesday, along with data migration.
數位時代
我們在網路的平台資本主義世界裡行走、生存,往往只看到樹木,看不到森林。
Comment on #234 Fix tutorial image order and handle the case RUMORS_LINE_BOT_URL undefined
I suggest we keep `VERSION` as a variable in `tutorial.js` because • If we change image in the future, it's natural that we go to tutorial.js and make changes there • Since image updates are under source control, so should its `VERSION`. The change of image file and the change of `VERSION` variable should be updated together in a PR.
Review on #234 Fix tutorial image order and handle the case RUMORS_LINE_BOT_URL undefined
Thanks for adding the cache-busting mechanism! I have some suggestion regarding where we put the cache busting variable.
Review on #234 Fix tutorial image order and handle the case RUMORS_LINE_BOT_URL undefined
Thanks for the fix! Let's <https://github.githubassets.com/images/icons/emoji/shipit.png|:shipit:>
Speaker Deck
LINE API Platform Update 202011
LINE API Platform Update 2020/11 by NiJia Lin @ Chatbot community #25 <https://chatbots.kktix.cc/events/meetup-025>
Stack impact was introduced to mitigate CPU issue: <https://github.com/cofacts/rumors-site/pull/189|#189> However after it's added, we did not get meaningful insight from it. On the other hand, it requires native extension when installing the project and hence stops some of our contributor in g0v hackathon from contributing. I suggest we remove stackimpact from rumors-site bundle.
Google Developers
Google Developers
Consolidate duplicate URLs | Google Search Central | Google Developers
Review on #354 Remove stackimpact
LGTM!
Google Developers
Managing multi-regional and multilingual sites | Google Search Central
#3 Apply data grid to thank-you editor
• Better appearance for the reply list page <https://cofacts.github.io/community-builder/#/editorworks|https://cofacts.github.io/community-builder/#/editorworks> • Add date filter <https://user-images.githubusercontent.com/108608/99219781-59738080-2818-11eb-8030-ffc33555f67e.png|image>
Fixes <https://github.com/cofacts/rumors-line-bot/issues/222|#222> dialogflow intent design <https://g0v.hackmd.io/kWuTnoC1TG-MONPhxp8rGQ#2020-Q4--2021-Q1-%E9%80%B2%E5%BA%A6%E7%A2%BA%E8%AA%8D|discussion>
Comment on #235 Feature/dialogflow
*Pull Request Test Coverage Report for <https://coveralls.io/builds/35015547|Build 1216>* • *21* of *21* *(100.0%)* changed or added relevant lines in *2* files are covered. • No unchanged relevant lines lost coverage. • Overall coverage increased (+*0.3%*) to *86.38%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
Comment on #233 ctx userId should be dbUserId
<https://coveralls.io/builds/35051417|Coverage Status> Coverage increased (+0.06%) to 86.003% when pulling *<https://github.com/cofacts/rumors-api/commit/d09fdf58809aabe60a5f86155b1c88ed3c43581b|d09fdf5> on ctxUserId* into *<https://github.com/cofacts/rumors-api/commit/2c0769ea2273fe96efee24006607e8f9bf934b95|2c0769e> on master*.
Review on #52 add slug & bio fields for user
Thanks for the update!
Comment on #52 add slug & bio fields for user
Thanks for updating the typo! I found that the text is a bit outdated as well. Suggested change
Comment on #232 [wip] user profile related api changes
<https://coveralls.io/builds/35067240|Coverage Status> Coverage increased (+0.4%) to 86.354% when pulling *<https://github.com/cofacts/rumors-api/commit/af2a790f0aff540478d4110defd2f4231fd91bd1|af2a790> on userProfile* into *<https://github.com/cofacts/rumors-api/commit/2c0769ea2273fe96efee24006607e8f9bf934b95|2c0769e> on master*.
g0v.hackmd.io
Review on #233 ctx userId should be dbUserId
Super thanks for spotting this issue! Let's get the fix out ASAP and see how we can migrate entities with `userId` being `U.{32}` .
Comment on #233 ctx userId should be dbUserId
The fix is tested on staging and deployed to production. After the fix is enrolled, the following query yields 1804 results: ``` curl -XPOST "<http://172.18.0.3:9200/_all/_search?pretty=true>" -H 'Content-Type: application/json' -d' { "query": { "regexp": { "userId": { "value": "U.{32}" } } } }' ``` Let's observe if the number stopps increasing after the fix.
Comment on #233 ctx userId should be dbUserId
Update: The number of documents w/ `U.{32}` `userId` stops at 1,804, so the API patch is successful :tada: The indexes that needs to be migrated: • `articles`: 296 documents • `replyrequests`: 499 documents • `articlereplyfeedbacks`: 1009 documents No documents in other index need migration.
Comment on #228 untangle test dependencies
It seems that <https://github.com/cofacts/rumors-api/pull/231|#231> has fixed this issue. May I close this? <https://github.com/ztsai|@ztsai>
From <https://g0v.hackmd.io/Ha-SMCxJQuGzqx6EnrKanA?both#%E5%8D%81%E5%82%91%E6%AA%A2%E8%A8%8E|20201118 meeting>, we should support new login method: Google. > 我們 passport 設定在這兒 > <https://github.com/cofacts/rumors-api/blob/master/src/auth.js|https://github.com/cofacts/rumors-api/blob/master/src/auth.js> > elasticsearch mapping 在 user index 下可能要增加一個記 google user id 的欄位 > <https://github.com/cofacts/rumors-db/blob/master/schema/users.js#L21|https://github.com/cofacts/rumors-db/blob/master/schema/users.js#L21>
Comment on #278 Hint editors on mobile to fill in references
From <https://g0v.hackmd.io/Ha-SMCxJQuGzqx6EnrKanA#%E6%89%8B%E6%A9%9F%E7%89%88%E5%AF%AB%E5%9B%9E%E6%87%89%E6%99%82%E6%B2%92%E6%9C%89%E6%93%8B%E3%80%8C%E6%B2%92%E5%AF%AB-reference%E3%80%8D%E7%9A%84%E7%8B%80%E6%B3%81|20201118 meeting> we should prevent user from submitting when reference is not provided on mobile UI.
Comment on #347 SEO for Mandarin content
Conclusion from <https://g0v.hackmd.io/Ha-SMCxJQuGzqx6EnrKanA#SEO-for-landing-page|20201118>: *所有頁面* 移除現有的 accept-language 偵測機制 *一般頁面* <http://cofacts.g0v.tw|cofacts.g0v.tw>, <http://zh.cofacts.org|zh.cofacts.org>, <http://en.cofacts.org|en.cofacts.org> --canonical–> <http://cofacts.org|cofacts.org> *Landing page* • <http://cofacts.g0v.tw|cofacts.g0v.tw>, <http://zh.cofacts.org|zh.cofacts.org> --canonical–> <http://cofacts.org|cofacts.org> • <http://cofacts.org|cofacts.org>: canonical self, --hreflang=en–> <http://en.cofacts.org|en.cofacts.org> • <http://en.cofacts.org|en.cofacts.org>: canonical self, --hreflang=zh–> <http://cofacts.org|cofacts.org> The change above should go to rumors-deploy instead, because only nginx settings are needed.
ListReplyRequest API • pagination args: first, after, before • filter args: userId, appId, articleId, createdAt • orderBy args: createdAt, vote
Comment on #235 List reply requests
<https://coveralls.io/builds/35169757|Coverage Status> Coverage increased (+0.1%) to 86.065% when pulling *<https://github.com/cofacts/rumors-api/commit/82255775d2f446b5c8ebd6bc6db5fb7376e6f936|8225577> on listReplyRequest* into *<https://github.com/cofacts/rumors-api/commit/aa7e7f89f84d9321f18d73ee3f505166a73ffdbb|aa7e7f8> on master*.
Comment on #284 Fix logout in mobile menu
I think this issue already be fixed
#355 fix reply time display bug
fix <https://github.com/cofacts/rumors-site/issues/265|#265> createdAt is property of reply, not articleReply
Comment on #355 fix reply time display bug
Hello <https://github.com/jojomango|@jojomango> thanks for taking a look at the issue! It turns out that `ArticleReply` actually have `createdAt` attribute on the <http://api.cofacts.org/|API>. ``` """The linkage between an Article and a Reply""" type ArticleReply { replyId: String reply: Reply # ...(omitted)... status: ArticleReplyStatusEnum createdAt: String updatedAt: String } ``` Seems that the root cause is that we forgot to include `articleReply`'s `createdAt` in our GraphQL queries. To be more specific, we forgot to include `createdAt` in <https://github.com/cofacts/rumors-site/blob/3a135df69172617599e0dc7ebee704040a88fcf5/components/ListPageDisplays/ReplyItem.js#L125-L131|ReplyItemArticleReplyData fragment>. Whatever field we use in `ListPageDisplays/ReplyItem` shall be included in the fragment, as we try to <https://www.apollographql.com/docs/react/data/fragments/#creating-colocated-fragments|colocate fragments and components> in this project. When an editor re-use other's written reply in another article, `articleReply.createdAt` will be different from `reply.createdAt`, thus I think it would be more adequate if we keep using `articleReply.createdAt`. Would you mind taking a look and giving it a try? Thanks!
Comment on #284 Fix logout in mobile menu
Confirmed on production. Seems that it's fixed in <https://github.com/cofacts/rumors-site/pull/352|#352>. Thanks for keeping our backlog clean!
Review on #355 fix reply time display bug
Fix confirmed on my localhost env. Thanks a million for taking a look at this issue and submit the concise yet powerful fix!
[WIP] wait for community response at <https://www.facebook.com/groups/cofacts/permalink/2866149510283526/?__cft__%5B0%5D=AZUx4iEfHMHCvEpOuvnUWnzQWrc1F5PyBeoRNlOIaRNFpP7tzpxTiPNwE4sG7tIaXdsmgSkQLIQ1ZAt5oA29HcBkKUJYeP-zqA1xhOI3uvkGiI8-VwrjyG38Y1BX6_JTx4zrrb879kV3OO-6trWuFrMGwchw5NjUjp7jEv74X1GWbN_nXEF9eoagBhpW5N_MJ2U&__tn__=%2CO%2CP-R|https://www.facebook.com/groups/cofacts/permalink/2866149510283526/?__cft__[0]=AZUx4iEfHMHCvEpOuvnUWnzQWrc1F5PyBeoRNlOIaRNFpP7tzpxTiPNwE4sG7tIaXdsmgSkQLIQ1ZAt5oA29HcBkKUJYeP-zqA1xhOI3uvkGiI8-VwrjyG38Y1BX6_JTx4zrrb879kV3OO-6trWuFrMGwchw5NjUjp7jEv74X1GWbN_nXEF9eoagBhpW5N_MJ2U&__tn__=%2CO%2CP-R>
Comment on #236 [WIP] Script to remove an article reply on production
<https://coveralls.io/builds/35237086|Coverage Status> Coverage increased (+0.02%) to 85.963% when pulling *<https://github.com/cofacts/rumors-api/commit/3169147d6f349f126f8afd831f4feb06728576b8|3169147> on delete-script* into *<https://github.com/cofacts/rumors-api/commit/aa7e7f89f84d9321f18d73ee3f505166a73ffdbb|aa7e7f8> on master*.
*Spec* figma: <https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=2760%3A463|https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=2760%3A463>
#5 need-to-check-list-generator V2
*Description* Update script for Cofacts meetup, details see <https://g0v.hackmd.io/naJGBDO0QFW4b4H4M9ElIw#%E5%B0%8F%E8%81%9A-rundown|discussion>. ``` npm start -- -p <number of people> -f <number of articles per person> -r <number of articles per person> -r, --rnumber Number of articles which has no replies. -f, --fnumber Number of articles which reply has no positive feedbacks. ``` *Screenshot* <https://user-images.githubusercontent.com/6376572/100360193-9408c480-3033-11eb-979d-94f2b0a6b55c.png|螢幕快照 2020-11-26 下午10 05 24>
Review on #5 need-to-check-list-generator V2
LGTM! Thanks for the change.
Comment on #232 user profile related api changes
If `UpdateUser` does not update the user, why would `updatedAt` exist here?
Comment on #232 user profile related api changes
nit: if only count is needed, we can use <https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#_count|`client.count`> instead
Comment on #232 user profile related api changes
Does this mean that each test case will receive different date? If we add new test case between existing test cases, does all subsequent test cases' `updatedAt` also change?
Review on #232 user profile related api changes
LGTM overall, thanks for the contribution! I have noted some questions regarding implementation detail.
Comment on #232 user profile related api changes
Seems that `updatedAt` is also written @@
Comment on #232 user profile related api changes
Looks like a typo lol Let's align the name with the file name. Suggested change
Comment on #232 user profile related api changes
nit: suggest adding description on `avatarData`, stating that it should be used only when `avatarType` is `OpenPeeps`
Review on #235 List reply requests
LGTM, let's ship this <https://github.githubassets.com/images/icons/emoji/shipit.png|:shipit:>