cofacts

Month: 2020-09

2020-09-01

github 12:36:47

#216 API can determine its concurrency using WEB_CONCURRENCY env var

*As-is* PM2 always spins up 2 instances of rumors-api *To-be* PM2 will respect `WEB_CONCURRENCY` env var to determine its concurrency. This can be helpful if we want to scale up / down API servers on production server.

github 12:48:39

Comment on #216 API can determine its concurrency using WEB_CONCURRENCY env var

<https://coveralls.io/builds/33134389|Coverage Status> Coverage remained the same at 88.582% when pulling *<https://github.com/cofacts/rumors-api/commit/784d6dcc70a4ed08f11c0f533a211c48163ec004|784d6dc> on web-concurrency* into *<https://github.com/cofacts/rumors-api/commit/a9a68b9d1d5a3b75a32b021c8b799dd58c1fb01c|a9a68b9> on master*.

mrorz 15:06:16
我已經完全不知道怎麼重現了,但這個卡著未來都不用 release⋯⋯
mrorz 18:19:05
看起來 open data 有新的運用實例囉 ~
> 資策會的「快篩平台」已於近日上線。該平台目前搜集台灣事實查核中心、MyGoPen與Co-Facts等三組織的謠言舉報資料,透過「異質資料擴增比對暨叢集技術」,可以將相同內容、但不同類型的謠言(如文字、連結、影片)歸類,並進一步擴大比對社群平台資料庫的資料,並整理出各謠言的舉報數與查核情況。
>
https://tfc-taiwan.org.tw/articles/4398|https://tfc-taiwan.org.tw/articles/4398

台灣事實查核中心

台灣事實查核發展大躍進! AI不實訊息快篩平台上線

記者何蕙安/報導

2020-09-02

mrorz 01:09:32
我要來再在 production 做一次實驗
這次測試的版本是 test-apollo3 這個 branch,具體來說有這些變更
https://github.com/cofacts/rumors-site/compare/release/20200731...test-apollo3
也就是不含 `ArticleReplyFeedbackControl` 的部分
這樣來看看會不會爆量

下圖是今天(正常)的流量
image.png
carol 02:44:33
看了一下我想 loadArticlePage 應該是我(舉手)我想說為了減少一點 cofacts db 的負擔,就從 Articles 和 Replies 把資料 cache 下來,這樣未來群組使用者只要打到美玉姨這邊就可以
carol 02:46:11
現在 articles 資料大概四萬多筆,理想上我第一次緩存的時候一個 batch 一千筆大概爬 40 頁,如果 cursor 是可以相信的話,在那之後只要更新新的資料(by 上一次的 cursor)就可以了,然後剩下的 query 都是美玉姨這邊來處理,可以有效減輕 cofacts 這邊 query 的負擔
carol 02:47:57
沒有注意到 @mrorz 居然有發現我在實驗 XD
不過 staging 的部分就不是我了,我不知道 staging 的 endpoint
mrorz 09:15:33
感謝美玉姨持續的更新~~

但 `LoadArticlePage` operation 的大量增加應該不是美玉姨的問題 XD
(`LoadArticlePage` 這個是開發者寫在 GraphQL query 的 operation name,是這幾個月加到 rumors-site 的 query 上來方便觀測的。如果 GraphQL query 的 `query` 這個字後面直接接 `(` 的話,就屬於無名的 operation。 )
我這裏 deploy 不同版本 image 會顯著影響 request per minute,已經滿確定是我升級 Apollo client 3 的 foot gun 惹。
github 13:05:10

Comment on #213 Feature highlight searched text

I have some problem in highlighting hyperlink, details updated in the PR description.

mrorz 13:29:45
這是這幾天 0831 release 的分析。在 production release 不同版本的 image 後比對 nginx log / apollo studio 的 API 流量,可以確定問題是發生在 upgrade apollo-client 3 的 https://github.com/cofacts/rumors-site/pull/312|pull request ( 不聽 @lucien 言吃虧在眼前 :sob: ),但詳細原因仍然不明。

目前想要把 apollo-client 3 降級回 2,不知道大家有沒有什麼其他想法。

處理報告:https://g0v.hackmd.io/qinBlfq0QQG1U_rWOpGAWQ

g0v.hackmd.io

20200831 release thrashing issue - HackMD

github 13:49:18

Comment on #315 Initial implementation of LineChart

Actually I am not sure if `test()` is called first, or if `MockDate.reset()` is called first. Depends on how `initStoryshots` calls `test()`. Judging from `Info`'s snapshot change (`over 30 years` -&gt; `about 31 years`) I suspect that the mock is not in effect.

github 17:48:14

Comment on #315 Initial implementation of LineChart

you're right, I didn't think it through lol I've modified the test accordingly.

github 21:17:21

Comment on #315 Initial implementation of LineChart

This can be omitted because of the existence of `position: absolute`

mrorz 21:37:33
@stbb1025 @lucien 文章的 chart 這樣呈現如何呢~?
https://github.com/cofacts/rumors-site/pull/315#issuecomment-683414172

Comment on #315 Initial implementation of LineChart

<https://user-images.githubusercontent.com/1817638/91658891-a344a880-eafe-11ea-9526-dc81860cb3ce.png|Screen Shot 2020-08-30 at 8 18 31 PM> <https://user-images.githubusercontent.com/1817638/91658894-a50e6c00-eafe-11ea-83d2-d158a22bf5be.png|Screen Shot 2020-08-30 at 8 18 52 PM> <https://user-images.githubusercontent.com/1817638/91658892-a475d580-eafe-11ea-9811-d21892d15af3.png|Screen Shot 2020-08-30 at 8 18 43 PM> <https://user-images.githubusercontent.com/1817638/91658895-a5a70280-eafe-11ea-8a23-e3cd296bfe4d.png|Screen Shot 2020-08-30 at 8 21 08 PM>

github 22:42:57

Comment on #315 Initial implementation of LineChart

Seems that `15` is the only place that implies `dataset` length in this component. How about using `dataset.length / 2` here?

github 22:42:57

Comment on #315 Initial implementation of LineChart

If we use absolute positioning for tooltip as well, we can use `left` or `right` to position `.tooltip.left` and `.tooltip.right` as well. In this way both `.tooltip.left` and `.tooltip.right` do not need to rely on actual tooltip width / height.

github 22:42:57

Comment on #315 Initial implementation of LineChart

Since `totalWebVisits` is not storing JSX elements, we can directly use <https://ttag.js.org/docs/tag-gettext.html|`t`> here, instead of <https://ttag.js.org/docs/jsx-gettext.html|`jt`>. The same goes to occurrences of `jt` below.

github 22:42:58

Comment on #315 Initial implementation of LineChart

Since we may change tooltip content in the future and its size may vary in different languages, I think we can should avoid fixed width / height here and rely on its content's size. We can add paddings to further adjust space around the text.

github 22:42:58

Comment on #315 Initial implementation of LineChart

It's pretty rare to see line-height smaller than font size :thinking_face: What would happen if we remove this line and let it inherit from `.tooltip` ?

github 22:42:58

Review on #315 Initial implementation of LineChart

The chart is looking pretty good! I have added some comments regarding some details of CSS and i18n.

github 22:42:58

Comment on #315 Initial implementation of LineChart

We can use <https://ttag.js.org/docs/ngettext.html|ngettext> to handle plural form. ``` c('LineChart').ngettext(msgid`${num} time`, `${num} times`, num) ```

lucien 23:28:22
@stbb1025 https://www.figma.com/file/ajFwwef2wqv5z4ydl0PgTZ/%5BWireframe%5D-Pages?node-id=717%3A670
每一個步驟的圖跟文字準備好了

Figma

[Wireframe] Pages

Created with Figma

2020-09-03

github 00:46:16

#13 Bump googleapis from 32.0.0 to 39.1.0

Bumps <https://github.com/googleapis/google-api-nodejs-client|googleapis> from 32.0.0 to 39.1.0. Release notes _Sourced from <https://github.com/googleapis/google-api-nodejs-client/releases|googleapis's releases>._ &gt; *v39.1.0* &gt; &gt; 03-28-2019 16:17 PDT &gt; &gt; *This release has security fixes.*. Versions 36.0.0 =&gt; 39.0.0 have a potential <https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1594|vulnerability> where the scope of auth objects may be shared across different clients. This was addressed in <https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1660|#1660>, and is part of this minor release. All clients should be updated to the latest version. &gt; &gt; *Bug Fixes* &gt; &gt; • fix: move context from namespace to class scope (<https://github-redirect.dependabot.com/google/google-api-nodejs-client/pull/1660|#1660>) &gt; &gt; *New Features* &gt; &gt; • feat: run the generator (<https://github-redirect.dependabot.com/google/google-api-nodejs-client/pull/1659|#1659>) &gt; &gt; *Internal / Testing Changes* &gt; &gt; • fix: README should not be generated (<https://github-redirect.dependabot.com/google/google-api-nodejs-client/pull/1657|#1657>) &gt; &gt; *v39.0.0* &gt; &gt; 03-26-2019 22:05 PDT &gt; &gt; *This release had breaking changes*. There have been a variety of TypeScript type changes. There have also been a variety of changes to the Google Plus API, and the OAuth2 API. Please take care! &gt; &gt; There are also some sweet new APIs: &gt; &gt; • cloudasset_v1 &gt; • cloudtasks_v2 &gt; • factchecktools_v1alpha1 &gt; • servicenetworking_v1 &gt; • websecurityscanner_v1beta &gt; &gt; *New Features* &gt; &gt; • feat: run the generator (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1653|#1653>) &gt; • feat: run the generator (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1644|#1644>) &gt; &gt; *Documentation* &gt; &gt; • docs: remove the plus samples (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1654|#1654>) &gt; • docs: Update typo in README.md (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1640|#1640>) &gt; • docs: fix typos in README files (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1642|#1642>) &gt; &gt; *Internal / Testing Changes* &gt; &gt; • chore(deps): update dependency tmp to ^0.1.0 (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1652|#1652>) &gt; • chore: publish to npm using wombat (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1645|#1645>) &gt; • build: update npm token (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1641|#1641>) &gt; • chore(deps): update dependency hard-rejection to v2 (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1643|#1643>) &gt; • build: use per-repo publish token (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1638|#1638>) &gt; &gt; *v38.0.0* &gt; &gt; 03-12-2019 14:00 PDT &gt; &gt; Greetings y'all! This release has some new APIs, says goodbye to a few older ones, and fixes a bunch of doc issues. Enjoy! &gt; &gt; _BREAKING CHANGES_: The following APIs have been _deleted_: &gt; &gt; • appengine_v1beta4 &gt; • appengine_v1beta5 Changelog _Sourced from <https://github.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md|googleapis's changelog>._ &gt; *v39.1.0* &gt; &gt; 03-28-2019 16:17 PDT &gt; &gt; *This release has security fixes.*. Versions 36.0.0 =&gt; 39.0.0 have a potential <https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1594|vulnerability> where the scope of auth objects may be shared across different clients. This was addressed in <https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1660|#1660>, and is part of this minor release. All clients should be updated to the latest version. &gt; &gt; *Bug Fixes* &gt; &gt; • fix: move context from namespace to class scope (<https://github-redirect.dependabot.com/google/google-api-nodejs-client/pull/1660|#1660>) &gt; &gt; *New Features* &gt; &gt; • feat: run the generator (<https://github-redirect.dependabot.com/google/google-api-nodejs-client/pull/1659|#1659>) &gt; &gt; *Internal / Testing Changes* &gt; &gt; • fix: README should not be generated (<https://github-redirect.dependabot.com/google/google-api-nodejs-client/pull/1657|#1657>) &gt; &gt; *v39.0.0* &gt; &gt; 03-26-2019 22:05 PDT &gt; &gt; *This release had breaking changes*. There have been a variety of TypeScript type changes. There have also been a variety of changes to the Google Plus API, and the OAuth2 API. Please take care! &gt; &gt; There are also some sweet new APIs: &gt; &gt; • cloudasset_v1 &gt; • cloudtasks_v2 &gt; • factchecktools_v1alpha1 &gt; • servicenetworking_v1 &gt; • websecurityscanner_v1beta &gt; &gt; *New Features* &gt; &gt; • feat: run the generator (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1653|#1653>) &gt; • feat: run the generator (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1644|#1644>) &gt; &gt; *Documentation* &gt; &gt; • docs: remove the plus samples (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1654|#1654>) &gt; • docs: Update typo in README.md (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1640|#1640>) &gt; • docs: fix typos in README files (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1642|#1642>) &gt; &gt; *Internal / Testing Changes* &gt; &gt; • chore(deps): update dependency tmp to ^0.1.0 (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1652|#1652>) &gt; • chore: publish to npm using wombat (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1645|#1645>) &gt; • build: update npm token (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1641|#1641>) &gt; • chore(deps): update dependency hard-rejection to v2 (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1643|#1643>) &gt; • build: use per-repo publish token (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/pull/1638|#1638>) &gt; &gt; *v38.0.0* &gt; &gt; 03-12-2019 14:00 PDT &gt; &gt; Greetings y'all! This release has some new APIs, says goodbye to a few older ones, and fixes a bunch of doc issues. Enjoy! Commits • <https://github.com/googleapis/google-api-nodejs-client/commit/f29dfd0495eb6b940f27eb3d043278cb756d2ceb|`f29dfd0`> Release v39.1.0 (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1661|#1661>) • <https://github.com/googleapis/google-api-nodejs-client/commit/db5e0f25c64db76cb87c96b9515205b79e7e775e|`db5e0f2`> fix: move context from namespace to class scope (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1660|#1660>) • <https://github.com/googleapis/google-api-nodejs-client/commit/73eab9b6f20c1fba536b9ab2917eb56822d212b6|`73eab9b`> feat: run the generator (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1659|#1659>) • <https://github.com/googleapis/google-api-nodejs-client/commit/d69c92070e83ffb74550bd37f1c939b428c74ee1|`d69c920`> fix: README should not be generated (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1657|#1657>) • <https://github.com/googleapis/google-api-nodejs-client/commit/32279b5f6c89dd383146b0a9c9671cc4a26374be|`32279b5`> Release v39.0.0 (<https://github-redirect.dependabot.com/googleapis/google-api-nodejs-client/issues/1655|#1655>) • <https://github.com/googleapis/google-api-nodejs-…

github 14:00:13

#9 README refinement

*To be added* • environment variables • Deployment guide

github 14:06:48

#327 Rollback apollo-client to 2.X

As discussed in <https://g0v.hackmd.io/c5wpuEPaQLWwM_5vxuo_Yw?both#-Released-to-production|meeting> we are rolling back apollo-client to 2.X to fix SSR thrashing issue.

mrorz 15:29:39
0831 的 release 範圍,在把 apollo-client 退回 2、修正 request 問題之後,已經 deploy 到 staging 囉,請大家測測看:

http://dev.cofacts.org/

功能方面應該要跟我們在 8/26 時測試的完全一致(8/26 測到的待改進項目也還沒處理):
https://g0v.hackmd.io/PQf7jdWBTSiw376UMm-2Xg#-Staging

dev.cofacts.org

Cofacts - Connecting facts and instant messages

Cofacts is a collaborative system connecting instant messages and fact-check reports or different opinions together. It’s a grass-root effort fighting mis/disinformation in Taiwan.

g0v.hackmd.io

20200826 會議記錄 - HackMD

2020-09-04

github 09:15:27

#14 Bump lodash.merge from 4.6.1 to 4.6.2

Bumps <https://github.com/lodash/lodash|lodash.merge> from 4.6.1 to 4.6.2. Commits • See full diff in <https://github.com/lodash/lodash/commits|compare view> <https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates|Dependabot compatibility score> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. * * * Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: • `@dependabot rebase` will rebase this PR • `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it • `@dependabot merge` will merge this PR after your CI passes on it • `@dependabot squash and merge` will squash and merge this PR after your CI passes on it • `@dependabot cancel merge` will cancel a previously requested merge and block automerging • `@dependabot reopen` will reopen this PR if it is closed • `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually • `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) • `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) • `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) • `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language • `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language • `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language • `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the <https://github.com/cofacts/rumors-fb-bot/network/alerts|Security Alerts page>.

Daisuke Ishii 22:24:59
@dai has joined the channel

2020-09-05

github 19:26:40

#15 Bump handlebars from 4.5.1 to 4.7.6

Bumps <https://github.com/wycats/handlebars.js|handlebars> from 4.5.1 to 4.7.6. Changelog _Sourced from <https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md|handlebars's changelog>._ &gt; *v4.7.6 - April 3rd, 2020* &gt; &gt; Chore/Housekeeping: &gt; &gt; • <https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1672|#1672> - Switch cmd parser to latest minimist (<https://api.github.com/users/dougwilson|@dougwilson> &gt; &gt; Compatibility notes: &gt; &gt; • Restored Node.js compatibility &gt; &gt; <https://github.com/wycats/handlebars.js/compare/v4.7.5...v4.7.6|Commits> &gt; &gt; *v4.7.5 - April 2nd, 2020* &gt; &gt; Chore/Housekeeping: &gt; &gt; • ~Node.js version support has been changed to v6+~ Reverted in 4.7.6 &gt; &gt; Compatibility notes: &gt; &gt; • ~Node.js &lt; v6 is no longer supported~ Reverted in 4.7.6 &gt; &gt; <https://github.com/wycats/handlebars.js/compare/v4.7.4...v4.7.5|Commits> &gt; &gt; *v4.7.4 - April 1st, 2020* &gt; &gt; Chore/Housekeeping: &gt; &gt; • <https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1666|#1666> - Replaced minimist with yargs for handlebars CLI (<https://api.github.com/users/aorinevo|@aorinevo>, <https://api.github.com/users/AviVahl|@AviVahl> &amp; <https://api.github.com/users/fabb|@fabb>) &gt; &gt; Compatibility notes: &gt; &gt; • No incompatibilities are to be expected &gt; &gt; <https://github.com/wycats/handlebars.js/compare/v4.7.3...v4.7.4|Commits> &gt; &gt; *v4.7.3 - February 5th, 2020* &gt; &gt; Chore/Housekeeping: &gt; &gt; • <https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1644|#1644> - Download links to aws broken on <http://handlebarsjs.com|handlebarsjs.com> - access denied (<https://api.github.com/users/Tea56|@Tea56>) &gt; • Fix spelling and punctuation in changelog - d78cc73 &gt; &gt; Bugfixes: &gt; &gt; • Add Type Definition for Handlebars.VERSION, Fixes <https://github-redirect.dependabot.com/wycats/handlebars.js/issues/1647|#1647> - 4de51fe &gt; • Include Type Definition for runtime.js in Package - a32d05f &gt; &gt; Compatibility notes: Commits • <https://github.com/handlebars-lang/handlebars.js/commit/e6ad93ea01bcde1f8ddaa4b4ebe572dd616abfaa|`e6ad93e`> v4.7.6 • <https://github.com/handlebars-lang/handlebars.js/commit/2bf4fc6fd3ae3d8f076d628653f284d85faebeb4|`2bf4fc6`> Update release notes • <https://github.com/handlebars-lang/handlebars.js/commit/b64202bc9197307bd785a58693e3820eb9bb41a8|`b64202b`> Update release-notes.md • <https://github.com/handlebars-lang/handlebars.js/commit/c2f1e6203178918569f085e12afdb762cae17fb0|`c2f1e62`> Switch cmd parser to latest minimist • <https://github.com/handlebars-lang/handlebars.js/commit/08e9a11a34c3ad8387a0b85b1334f97cab85191a|`08e9a11`> Revert "chore: set Node.js compatibility to v6+" • <https://github.com/handlebars-lang/handlebars.js/commit/1fd2edee2a12fb228061fcde807905c6b14339c4|`1fd2ede`> v4.7.5 • <https://github.com/handlebars-lang/handlebars.js/commit/3c9c2f5cf29cf10f54d5fe4daca6b24b65f0adcf|`3c9c2f5`> Update release notes • <https://github.com/handlebars-lang/handlebars.js/commit/16487a088e13f4d52c6fd6610b9ec71c4a51be8a|`16487a0`> chore: downgrade yargs to v14 • <https://github.com/handlebars-lang/handlebars.js/commit/309d2b49a11628d2a8f052c5587e7459968cd705|`309d2b4`> chore: set Node.js compatibility to v6+ • <https://github.com/handlebars-lang/handlebars.js/commit/645ac73844918668f9a2f41e49b7cb18ce5abf36|`645ac73`> test: fix integration tests • Additional commits viewable in <https://github.com/wycats/handlebars.js/compare/v4.5.1...v4.7.6|compare view> Maintainer changes This version was pushed to npm by <https://www.npmjs.com/~erisds|erisds>, a new releaser for handlebars since your current version. <https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates|Dependabot compatibility score> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. * * * Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: • `@dependabot rebase` will rebase this PR • `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it • `@dependabot merge` will merge this PR after your CI passes on it • `@dependabot squash and merge` will squash and merge this PR after your CI passes on it • `@dependabot cancel merge` will cancel a previously requested merge and block automerging • `@dependabot reopen` will reopen this PR if it is closed • `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually • `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) • `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) • `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) • `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language • `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language • `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language • `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the <https://github.com/cofacts/rumors-fb-bot/network/alerts|Security Alerts page>.

2020-09-06

github 16:09:59

Comment on #315 Initial implementation of LineChart

`right: 40px` should have similar effect, but using `right` could have no dependency on tooltip actual width.

github 16:09:59

Review on #315 Initial implementation of LineChart

I found that currently the red cursor will not align with the x-axis: <https://user-images.githubusercontent.com/108608/92321119-fcaa5b80-f059-11ea-90b8-cd01cef9806c.png|image> To make them aligned, there should be 11 x-axis ticks for 31 days. For example, for 9/6 the ticks should be: &gt; 8/7 8/10 8/13 8/16 8/19 8/22 8/25 8/28 8/31 9/3 9/6

github 20:47:03

Review on #213 Feature highlight searched text

LGTM overall, thanks for adding highlight function that we long wanted!

github 20:47:04

Comment on #213 Feature highlight searched text

This makes me notice that we <https://github.com/cofacts/rumors-db/blob/master/schema/replies.js#L8|forgot to use `cjk_url_email` analyzer> for `reference` field...... This is a bug that will affect reply search. I am adding a ticket for this.

github 20:47:04

Comment on #213 Feature highlight searched text

What would happen if we use the original setup?

github 20:49:12

#46 Reply reference field should use cjk_url_email analyzer

Current setting will mess up with reply search functionality. Modifying analyzer will need reindexing.

mrorz 20:52:13
推銷一下這個小 PR 求 review
主要是讓 rumors-api 能像 rumors-site 一樣可以用 env var 來控制 pm2 要開幾個 instance 這樣
原本是因應 0831 release 導致 API server loading 暴增做的變更
在 rollback apollo client 之後似乎沒有急迫的需求,但我覺得這個設定還是可以進
https://github.com/cofacts/rumors-api/pull/216/files
github 23:30:20

Comment on #213 Feature highlight searched text

Let's see the test case `ListReplies filters by moreLikeThis and given text, find replies with the said URL's content`: The original fixture `moreLikeThis2`(reference:barbar) should match, but it only matches `userFoo` and `rumor`.

2020-09-07

mrorz 00:08:26
放了一個月的 PR 終於可以 review 啦~

這是接續過去 article list page 的 refactor,將過於萬能的 `ArticleItem` 拆成比較好重用的小 component
github 14:04:17

Comment on #315 Initial implementation of LineChart

Recently I have rolled back apollo client to version 2. Please also rebase the PR and change apollo-client 3 dependencies accordingly. More specifically, • `import { gql } from '@apollo/client'` should be `import gql from 'graphql-tag'` • `import { useQuery } from '@apollo/client'` should be `import { useQuery } from '@apollo/react-hooks'`

mrorz 14:16:12
Rich menu 在 production 上線囉,大家可以試試看 ~~
感謝 @stbb1025
Screenshot_20200907-140548.png

2020-09-08

github 02:44:28

Review on #315 Initial implementation of LineChart

LGTM now :) Thanks for the fix and let's <https://github.githubassets.com/images/icons/emoji/shipit.png|:shipit:>

github 02:51:41

Comment on #213 Feature highlight searched text

I see, very interesting. Seems that using `fields: ['text', 'reference']` would concat the two field into one, which may cause `not being selected as representative terms [in` more_like_this` process](<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html#_how_it_works|https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-mlt-query.html#_how_it_works>). Splitting into separate more_like_this should indeed fix this.

mrorz 11:40:57
@acerxp511 這個 PR 是關於 article item 如何實作,會與 highlight 如何實作習習相關唷
https://github.com/cofacts/rumors-site/pull/288

#288 Replace &lt;ArticleItem&gt; with more reusable card components

List items part of the 2nd planned PR for <https://g0v.hackmd.io/h8rP0TOGTh2Clxi_Oi_QKw?view|`ArticleListPage` component revamp> <https://github.com/cofacts/rumors-site/issues/286|#286> . Originally, `&lt;ArticleItem&gt;` component is shared across all list pages including `/articles` , `/hoax-for-you`, `/replies` and `/search`; however, in each of these lists, the item looks different in mockup (see below). Original implementation adds a lot of props to `&lt;ArticleItem&gt;` and is not accurately reflecting to all these different visuals. This PR replaces monolithic `&lt;ArticleItem&gt;` with atomic, reusable components of these components. *Spec in Figma* *In <https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=428%3A37|`/articles`>, <https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=428%3A37|`/hoax-for-you`> and <https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=585%3A273|searching articles in `/search`>* <https://user-images.githubusercontent.com/108608/92329007-38afe180-f097-11ea-81f4-8367c7a850e4.png|image> *In <https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=79%3A9|`/replies`>* <https://user-images.githubusercontent.com/108608/92329021-511ffc00-f097-11ea-8068-fb13aa4c409c.png|image> *<https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=432%3A2727|Searching replies in `/replies`>* <https://user-images.githubusercontent.com/108608/92329078-bd9afb00-f097-11ea-9580-a567d1b11b68.png|image> *<https://www.figma.com/file/zpD45j8nqDB2XfA6m2QskO/Cofacts-website?node-id=585%3A524|The "articles also used this reply" dialog>* <https://user-images.githubusercontent.com/108608/92329092-cbe91700-f097-11ea-9b62-a6317d47879b.png|image> *Refactor* • decompose `components/ListPageDisplays/ArticleItem` into `ListPageCards`, `ListPageCard` and original `ReplyItem` • `ListPageCards`: the list container for all card items • `ListPageCard`: basic card look, with RWD paddings matching the mockup <https://user-images.githubusercontent.com/108608/92329404-dc01f600-f099-11ea-89b0-10cf0d97ec75.png|image> • `ArticleCard`: the article card shared across `/articles`, `/hoax-for-you` and `/search`, built upon `ListPageCard` <https://user-images.githubusercontent.com/108608/92329418-ef14c600-f099-11ea-83df-2f06fb875a88.png|image> • `ReplyItem`: article reply item within each article card in `/replies` page. This component already exists, but its props are simplified in this PR. <https://user-images.githubusercontent.com/108608/92329441-0ce22b00-f09a-11ea-89cf-621c42f7d041.png|image> • adding `page` prop to `ArticlePageLayout` • The ultimate goal is to split `ArticlePageLayout` into each page components like `/articles`, `/hoax-for-you` and `/search` • However, this PR has already collected too much changes, removing `ArticlePageLayout` in this PR will be very difficult to review. • Therefore I added `page` prop to differentiate pages in `ArticlePageLayout`. This will help us splitting logic into respective pages in the future PR. • Introduce `&lt;ReplyCountInfo&gt;` for reply info with reply stats • It's only used in 2 places. However its calculation is a bit complicated, thus we are turning it into a component. *Others* • Lists 25 items per page (fixes <https://github.com/cofacts/rumors-site/issues/307|#307>)

mrorz 13:53:31
因為最近資料庫有 user ID revamp 以及 reference analyzer 的問題,明天開會我想討論一下 rumors-db 的 versioning 怎麼做。

目前的版本是所有 index 要一起前進,但只改一兩個 index 就全部都要 reindex 似乎不太合理 @@ 想要改成個別管理這樣。

https://g0v.hackmd.io/5JMzChJOQPqKe_CX_wbRmg?view#Versioning-rumors-db-schema

大家對於 elasticsearch mapping 管理有什麼想法呢?

g0v.hackmd.io

20200909 會議記錄 - HackMD

github 15:27:16

Comment on #315 Initial implementation of LineChart

`tick` could be a `number` or a `date`, `-0` remains the same if it's a number and converts `date` into epoch seconds otherwise. it's not necessary, just makes the `key` look cleaner

github 16:52:34

Comment on #315 Initial implementation of LineChart

I see. We could use <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Unary_plus|unary `+`> to convert things to number, it's shorter ;)

github 18:08:54

Comment on #47 update analytics and users' schema &amp; write a migration to update mappings

<https://github.com/cofacts/rumors-api/issues/185|cofacts/rumors-api#185>

2020-09-09

github 12:30:18

Comment on #47 update analytics and users' schema &amp; write a migration to update mappings

I think we can use `keyword`. 1. Previously we use `keyword` to store `url`: <https://github.com/cofacts/rumors-db/blob/master/schema/urls.js#L3|https://github.com/cofacts/rumors-db/blob/master/schema/urls.js#L3> 2. For longer data, we still use `keyword` but add `doc_values: false` also. <https://github.com/cofacts/rumors-db/blob/master/schema/urls.js#L11|https://github.com/cofacts/rumors-db/blob/master/schema/urls.js#L11>

mrorz 13:24:59
Cofacts open data 加入每日 LINE bot / website 個別訊息的瀏覽量資訊囉!
https://github.com/cofacts/opendata#analyticscsv

• 資料範圍:網站為 2017 年 3 月起,LINE bot 為 2018 年 4 月起;兩者都有包含 2018 與 2020 大選前後期間
• 資料來源同 http://cofacts.org/analytics|cofacts.org/analytics ,但是是以 CSV 形式放在同一個檔案,無需在 analytics 頁面單次下載
• 有將相同對象、不同 URL的瀏覽量 (如帶有 fbclid 的版本) 合併計算

cofacts/opendata

Open data of Cofacts collaborative fact-checking database

github 13:57:07

#217 Ask user to turn on notification after submission

In <https://g0v.hackmd.io/eitM7s0bSSeS3kg-MAcpDw#20200812-%E6%9C%83%E8%AD%B0%E8%A8%98%E9%8C%84|20200812 meeting note>: &gt; 如果預設都關閉,我們都準備好之後再發個推播說有這個選項可以設定 &gt; 想說預設開啟的話,使用者可能會不知道如何關閉,就把我們封鎖了 &gt; [name=mrorz] &gt; 商業產品的話我會考慮預設開啟,但調整推播頻率 &gt; 我們這裡可以預設關閉,然後如果使用者送新訊息進來後,沒有得到回應,使用者又沒有開啟推播的話,可以多問一句要不要開啟 &gt; [name=lucien] Therefore we can • add a sentence after they successfully send a message asking the user to turn on notification if their notification setting is off. • If their notification setting is turned on, also states that they will receive notification after the message being replied.

mrorz 14:23:48
本週會議記錄
小聚、RSS 教學與 rich menu 各功能介紹需要有人幫忙處理~~
https://g0v.hackmd.io/@mrorz/cofacts-meeting-notes/%2F5JMzChJOQPqKe_CX_wbRmg
github 14:26:54

#218 Feature highlight searched text

Highlight searched text using <https://github.com/cofacts/rumors-api/pull/213|cofacts/rumors-api#213> *Need to discuss* Highlight hyperlink.title and hyperlink.summary or not? Currently line bot doesn't show hyperlink.title and hyperlink.summary, but search-API may highlight them and return a null text field if the original message is a URL.

github 21:56:29

Comment on #218 Feature highlight searched text

若為 hyperlink.summary,一樣顯示 summary 的 highlight,但前面用稍小的灰字加上: `(Words found in the hyperlink)` 或 `(網址裡找到的字)` <https://user-images.githubusercontent.com/108608/92607845-422f8880-f2e7-11ea-91ee-a5983071da8e.png|image> Color palatte: <https://www.figma.com/file/Xr80rEWwCrNks1uFIrGCG4/Cofacts-Colors?node-id=22%3A76|https://www.figma.com/file/Xr80rEWwCrNks1uFIrGCG4/Cofacts-Colors?node-id=22%3A76>

mrorz 22:35:42
請問手機版 Google Chrome 是不是打不開下面這一頁?
https://dev.cofacts.org/article/1qdrhpprhoozr

2020-09-10

mrorz 02:09:19
@zoetwca 實作的新版圖表上線囉,感謝 Zoe m(_ _)m
https://cofacts.org/article/14zqfxe1p1ml1

網站因為大家 google 就會進來,瀏覽量真的跟 LINE 有不少的差距呢,能一次呈現真是太好了
github 02:10:44

Comment on #211 Entering article page from article list takes 2 back to go back to list page

Confirmed that it's fixed via <https://github.com/cofacts/rumors-site/issues/314|#314>.

zoe 09:28:57
我之前有測一些手機尺寸,殊不知我自己的手機是edge case xDDD
Image from iOS
mrorz 11:20:04
我覺得與其顯示 visit 數,換成顯示 user 數好像比較好

以這篇為例,我自己下去闢謠的時候本身就會瀏覽這個網頁數次
https://cofacts.org/article/1t9ab4bz71dwy

圖表上看起來好像有 15 web visit 很多、跟前一天比看起來「變熱門了」,但實際上只有 5 user,前一天的 8 user 才是高峰。
image.png
github 17:51:02

Comment on #218 Feature highlight searched text

*Pull Request Test Coverage Report for <https://coveralls.io/builds/33357881|Build 1109>* • *27* of *27* *(100.0%)* changed or added relevant lines in *1* file are covered. • No unchanged relevant lines lost coverage. • Overall coverage increased (+*0.6%*) to *84.691%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*

eopXD 23:37:11
@yueh.ting.chen has joined the channel

2020-09-11

github 11:42:34

#16 Bump node-fetch from 2.2.0 to 2.6.1

Bumps <https://github.com/bitinn/node-fetch|node-fetch> from 2.2.0 to 2.6.1. Release notes _Sourced from <https://github.com/bitinn/node-fetch/releases|node-fetch's releases>._ &gt; *v2.6.1* &gt; &gt; *This is an important security release. It is strongly recommended to update as soon as possible.* &gt; &gt; See <https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md#v261|CHANGELOG> for details. &gt; &gt; *v2.6.0* &gt; &gt; See <https://github.com/bitinn/node-fetch/blob/v2.6.0/CHANGELOG.md#v260|CHANGELOG>. &gt; &gt; *v2.5.0* &gt; &gt; See <https://github.com/bitinn/node-fetch/blob/v2.5.0/CHANGELOG.md#v250|CHANGELOG>. &gt; &gt; *v2.4.1* &gt; &gt; See <https://github.com/bitinn/node-fetch/blob/v2.4.1/CHANGELOG.md#v241|CHANGELOG>. &gt; &gt; *v2.4.0* &gt; &gt; See <https://github.com/bitinn/node-fetch/blob/v2.4.0/CHANGELOG.md#v240|CHANGELOG>. &gt; &gt; *v2.3.0* &gt; &gt; See <https://github.com/bitinn/node-fetch/blob/v2.3.0/CHANGELOG.md#v230|CHANGELOG>. &gt; &gt; *v2.2.1* &gt; &gt; See <https://github.com/bitinn/node-fetch/blob/v2.2.1/CHANGELOG.md#v221|CHANGELOG>. Changelog _Sourced from <https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md|node-fetch's changelog>._ &gt; *v2.6.1* &gt; &gt; *This is an important security release. It is strongly recommended to update as soon as possible.* &gt; &gt; • Fix: honor the `size` option after following a redirect. &gt; &gt; *v2.6.0* &gt; &gt; • Enhance: `options.agent`, it now accepts a function that returns custom http(s).Agent instance based on current URL, see readme for more information. &gt; • Fix: incorrect `Content-Length` was returned for stream body in 2.5.0 release; note that `node-fetch` doesn't calculate content length for stream body. &gt; • Fix: `Response.url` should return empty string instead of `null` by default. &gt; &gt; *v2.5.0* &gt; &gt; • Enhance: `Response` object now includes `redirected` property. &gt; • Enhance: `fetch()` now accepts third-party `Blob` implementation as body. &gt; • Other: disable `package-lock.json` generation as we never commit them. &gt; • Other: dev dependency update. &gt; • Other: readme update. &gt; &gt; *v2.4.1* &gt; &gt; • Fix: `Blob` import rule for node &lt; 10, as `Readable` isn't a named export. &gt; &gt; *v2.4.0* &gt; &gt; • Enhance: added `Brotli` compression support (using node's zlib). &gt; • Enhance: updated `Blob` implementation per spec. &gt; • Fix: set content type automatically for `URLSearchParams`. &gt; • Fix: `Headers` now reject empty header names. &gt; • Fix: test cases, as node 12+ no longer accepts invalid header response. &gt; &gt; *v2.3.0* &gt; &gt; • Enhance: added `AbortSignal` support, with README example. &gt; • Enhance: handle invalid `Location` header during redirect by rejecting them explicitly with `FetchError`. &gt; • Fix: update `browser.js` to support react-native environment, where `self` isn't available globally. &gt; &gt; *v2.2.1* &gt; &gt; • Fix: `compress` flag shouldn't overwrite existing `Accept-Encoding` header. &gt; • Fix: multiple `import` rules, where `PassThrough` etc. doesn't have a named export when using node &lt;10 and `--experimental-modules` flag. &gt; • Other: Better README. Commits • <https://github.com/node-fetch/node-fetch/commit/b5e2e41b2b50bf2997720d6125accaf0dd68c0ab|`b5e2e41`> update version number • <https://github.com/node-fetch/node-fetch/commit/2358a6c2563d1730a0cdaccc197c611949f6a334|`2358a6c`> Honor the `size` option after following a redirect and revert data uri support • <https://github.com/node-fetch/node-fetch/commit/8c197f8982a238b3c345c64b17bfa92e16b4f7c4|`8c197f8`> docs: Fix typos and grammatical errors in README.md (<https://github-redirect.dependabot.com/bitinn/node-fetch/issues/686|#686>) • <https://github.com/node-fetch/node-fetch/commit/1e99050f944ac435fce26a9549eadcc2419a968a|`1e99050`> fix: Change error message thrown with redirect mode set to error (<https://github-redirect.dependabot.com/bitinn/node-fetch/issues/653|#653>) • <https://github.com/node-fetch/node-fetch/commit/244e6f63d42025465796e3ca4ce813bf2c31fc5b|`244e6f6`> docs: Show backers in README • <https://github.com/node-fetch/node-fetch/commit/6a5d192034a0f438551dffb6d2d8df2c00921d16|`6a5d192`> fix: Properly parse meta tag when parameters are reversed (<https://github-redirect.dependabot.com/bitinn/node-fetch/issues/682|#682>) • <https://github.com/node-fetch/node-fetch/commit/47a24a03eb49a49d81b768892aee10074ed54a91|`47a24a0`> chore: Add opencollective badge • <https://github.com/node-fetch/node-fetch/commit/7b136627c537cb24430b0310638c9177a85acee1|`7b13662`> chore: Add funding link • <https://github.com/node-fetch/node-fetch/commit/5535c2ed478d418969ecfd60c16453462de2a53f|`5535c2e`> fix: Check for global.fetch before binding it (<https://github-redirect.dependabot.com/bitinn/node-fetch/issues/674|#674>) • <https://github.com/node-fetch/node-fetch/commit/1d5778ad0d910dbd1584fb407a186f5a0bc1ea22|`1d5778a`> docs: Add Discord badge • Additional commits viewable in <https://github.com/bitinn/node-fetch/compare/v2.2.0...v2.6.1|compare view> Maintainer changes This version was pushed to npm by <https://www.npmjs.com/~akepinski|akepinski>, a new releaser for node-fetch since your current version. <https://docs.github.com/en/github/managing-security-vulnerabilities/configuring-github-dependabot-security-updates|Dependabot compatibility score> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. * * * Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: • `@dependabot rebase` will rebase this PR • `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it • `@dependabot merge` will merge this PR after your CI passes on it • `@dependabot squash and merge` will squash and merge this PR after your CI passes on it • `@dependabot cancel merge` will cancel a previously requested merge and block automerging • `@dependabot reopen` will reopen this PR if it is closed • `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually • `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) • `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) • `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) • `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language • `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language • `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language • `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the <https://github.com/cofacts/rumors-fb-bot/network/alerts|Security Alerts page>.

2020-09-12