開始維護
#422 [ProfilePage] fix slug infinite redirect
Currently slugs with characters will trigger infinite page reload. This PR modifies the reload detection mechanism so that it handles URL encoded paths correctly.
#252 Validate slug and block invalid slug
This PR fixes <https://github.com/cofacts/rumors-api/issues/242|#242> . The definition of "invalid slug": matches any of the following • empty, or contains just space • has trailing or leading space • contains URL components like `:` or `/` • is already taken by another user This PR • adds a query API `ValidateSlug` for UI to check if a slug is valid • blocks invalid slug in `UpdateUser`
Comment on #252 Validate slug and block invalid slug
<https://coveralls.io/builds/38509947|Coverage Status> Coverage increased (+0.06%) to 86.406% when pulling *<https://github.com/cofacts/rumors-api/commit/81d5065a1755983413246effe9e3c9367696bf13|81d5065> on validate-slug* into *<https://github.com/cofacts/rumors-api/commit/0c42992c82eb25851433f3f275b663eef84defab|0c42992> on master*.
#253 Update rumors-db to latest
Will merge after CI pass.
Comment on #253 Update rumors-db to latest
<https://coveralls.io/builds/38510041|Coverage Status> Coverage decreased (-0.1%) to 86.207% when pulling *<https://github.com/cofacts/rumors-api/commit/1c61b1095b1f6f407f21f3e3d0899dd81fdf1adc|1c61b10> on update-schema* into *<https://github.com/cofacts/rumors-api/commit/0c42992c82eb25851433f3f275b663eef84defab|0c42992> on master*.
Comment on #234 Support Google sign-in
Signin with Apple Need $$$ <https://developer.apple.com/account/resources/|https://developer.apple.com/account/resources/> <https://user-images.githubusercontent.com/6376572/113502281-f03da100-955d-11eb-8872-1b8c94c7bc69.png|截圖 2021-04-04 下午3 53 04>
![]()
Fixes <https://github.com/cofacts/rumors-api/issues/234|#234> *<https://developers.google.com/identity/sign-in/web/sign-in|Google sign-in>* Use <https://github.com/jaredhanson/passport-google-oauth2|passport-google-oauth2> *To get google OAuth credential* 1. <https://console.cloud.google.com/apis/credentials|Create> OAuth Client ID credential 2. Edit `Web client` and add `PUBLIC_URL/callback/google` to `Authorized redirect URIs` 3. Paste `Client ID` and `Client secret` to env *<https://developers.facebook.com/docs/instagram-basic-display-api/getting-started/|Instagram sign-in>* Use <https://github.com/huynhsang/passport-instagram-graph|passport-instagram-graph>. (<https://github.com/jaredhanson/passport-instagram/pull/26|passport-instagram> is out-of-date.) *To get Instagram OAuth credential* 1. <https://developers.facebook.com/apps/|Create> Facebook login application 2. Setup Instagram Basic Display 3. Add `PUBLIC_URL/callback/instagram` to `Valid OAuth Redirect URIs` 4. Paste `Client ID` and `Client secret` to env Tester should approve invitation <https://www.instagram.com/accounts/manage_access/|here>. Should submit your app for App Review when you are ready to switch it to Live Mode.
Comment on #254 Add new signin methods
<https://coveralls.io/builds/38515751|Coverage Status> Coverage decreased (-0.5%) to 85.81% when pulling *<https://github.com/cofacts/rumors-api/commit/306587127848aa408c206ada130872b3b661fe3e|3065871> on new-login-methods* into *<https://github.com/cofacts/rumors-api/commit/0c42992c82eb25851433f3f275b663eef84defab|0c42992> on master*.
Review on #54 Add googleId and instagramId for new sign-in methods
Thanks for adding Google & IG!
Comment on #254 Add new signin methods
Suggested change
Review on #254 Add new signin methods
Thanks for supporting new signin methods! The setup instructions are super clear. I have also reloaded `users` index to `v1.2.0` on staging. I am concerned that when creating "Basic Display" IG API, Facebook says that my app review will be rejected if we use it to authenticate user. <https://user-images.githubusercontent.com/108608/113511479-91464f00-9592-11eb-8e0b-7ebe54170454.png|image> Can IG users login directly using FB?
![]()
Comment on #254 Add new signin methods
> Can IG users login directly using FB? Maybe no. They always ask user to link IG and FB account together. I think if a IG user doesn't link FB, (s)he can't use Facebook login. > Facebook says that my app review will be rejected if we use it to authenticate user. Then we should add share (article/reply) to Instagram function to pass the review :p
doc: <https://github.com/jaredhanson/passport-facebook/pull/234#issuecomment-456553856|jaredhanson/passport-facebook#234 (comment)> <https://user-images.githubusercontent.com/108608/113590908-d7201780-9665-11eb-85e0-77eb69ecd01a.png|image>
![]()
Comment on #255 Use FB Graph API v10
<https://coveralls.io/builds/38534990|Coverage Status> Coverage remained the same at 86.131% when pulling *<https://github.com/cofacts/rumors-api/commit/befb928e82d1e8a47572e7885fc70874a52e29ca|befb928> on upgrade-graph-api* into *<https://github.com/cofacts/rumors-api/commit/57958a2c1553fe250a8ab007987c1141affd49c4|57958a2> on master*.
Comment on #254 Add new signin methods
Deployed to staging. <https://dev-api.cofacts.org/callback/google|https://dev-api.cofacts.org/callback/google> should work.
Comment on #386 "The user does not exist" sometimes appears after updating username
As <https://github.com/cofacts/rumors-db/pull/53|cofacts/rumors-db#53> merges, this should be fixed. Close for now.
#423 Show error for EditProfileDialog
Show snack when edit profile dialog errors. <https://user-images.githubusercontent.com/108608/113817930-a77a2800-97a9-11eb-8a7a-20387cd61166.png|image>
![]()
Support Google sign-in. (IG temporarily hidden as it requires app review) <https://user-images.githubusercontent.com/108608/113865973-54bb6300-97df-11eb-82e2-67d2476a7399.png|image>
![]()
Comment on #256 Add email scope to google auth method
<https://coveralls.io/builds/38601875|Coverage Status> Coverage decreased (-0.05%) to 86.044% when pulling *<https://github.com/cofacts/rumors-api/commit/fbfd136b5a8c210832649c5045eae593eb76568a|fbfd136> on new-login-methods* into *<https://github.com/cofacts/rumors-api/commit/7e05f572452c9d00ce1df5ebcb78f28c972dadc1|7e05f57> on master*.
Review on #256 Add email scope to google auth method
Thanks! LGTM
Comment on #408 Sync UI english text and the tutorial
Fixed in <https://github.com/cofacts/rumors-site/pull/415|#415>, closing
Comment on #399 Using Mandarin in slug will break profile page
Fixed in <https://github.com/cofacts/rumors-db/pull/53|cofacts/rumors-db#53>, closing.
Comment on #390 Content too long and cause horizontal scroll on mobile
Seems fixed, kudos to <https://github.com/playpool513|@playpool513> !
Comment on #361 Provide better placeholder for editors
Fixed in <https://github.com/cofacts/rumors-site/pull/383|#383>, kudos to <https://github.com/ulayab|@ulayab> !
Comment on #283 Adjust avatar components
Closing this as it is fixed by <https://github.com/cofacts/rumors-site/pull/357|#357>
Comment on #279 Keyboard on Android is covering up editing area too much
Personally I am having no issue using editor form on my Pixel 2 ever since <https://github.com/cofacts/rumors-site/pull/344|#344> is merged. Closing.
#425 Show author of reply requests (article comments)
We should show author of reply requests, as depicted in ffigma.
#426 iOS safari 13 does not have Intl.RelativeTimeFormat
iOS safari 14 works fine. However in v13: <https://user-images.githubusercontent.com/108608/114293260-3bf4cb00-9ac7-11eb-98f7-56ad82d16e5b.png|image> <https://user-images.githubusercontent.com/108608/114293288-79595880-9ac7-11eb-83b2-9344e4d26b17.png|image> *Solutions* <https://formatjs.io/docs/polyfills/intl-relativetimeformat/|https://formatjs.io/docs/polyfills/intl-relativetimeformat/> or other polyfill
![]()
Review on #6 Update sheet urls and api to new domain
LGTM! Thanks for the update
HackMD
# 跳起來!g0v 坑主工作坊 簡介 在 2020/02/02 g0v 揪松團邀請 g0v 社群比較長期的專案坑主,一起來分享討論,彼此專案遇到的問題,以及是否有哪些解法。而今年,我們將再次舉辦坑
#427 Recolor Google sign-in button
Google's requirement: <https://developers.google.com/identity/branding-guidelines|https://developers.google.com/identity/branding-guidelines> Figma TBD
#257 Should allow clearing slug (UpdateUser with empty slug)
*As-is* Currently if the user does not provide slug when editing profile (for example, just changing display names), the operation will be rejected. *To-be* Change `UpdateUser` • When slug is exactly an empty string, clear the slug (For edit name dialog) • When slug argument is not provided at all, leave it as-is. (For avatar dialog)
#426 Chrome < 71, iOS safari 13 does not have Intl.RelativeTimeFormat
iOS safari 14 works fine. However in v13: <https://user-images.githubusercontent.com/108608/114293260-3bf4cb00-9ac7-11eb-98f7-56ad82d16e5b.png|image> <https://user-images.githubusercontent.com/108608/114293288-79595880-9ac7-11eb-83b2-9344e4d26b17.png|image> Also for Chrome < 70: <https://user-images.githubusercontent.com/108608/114813175-21329700-9de4-11eb-9bcd-336f7bbb06e4.png|image> *Analysis* <https://docs.google.com/spreadsheets/d/121Jql1JIF-fC8-uIgcLlK-PyofC2GMnqu6W1EO_dJ0o/edit|Cofacts browser statistics (Cofacts chatbot LIFF stats, conducted in April 2020)> *<https://caniuse.com/?search=Intl.RelativeTimeFormat|`Intl.RelativeTimeFormat`>* <https://user-images.githubusercontent.com/108608/114813682-30feab00-9de5-11eb-9755-f30f9a7db375.png|image> Supporting Chrome >= 71 only covers 90% of Android user session; and iOS does not have v14 in 2020 (when this analysis is conducted). Therefore, we should handle the case when `Intl.RelativeTimeFormat` is not supported. *<https://caniuse.com/?search=Intl.DateTimeFormat|`Intl.DateTimeFormat`>* <https://user-images.githubusercontent.com/108608/114813608-14627300-9de5-11eb-8d51-db5c3413d116.png|image> In Cofacts, 100% of android sessions and 99% iOS sessions have `Intl.DateTimeFormat`. We can safely assume `Intl.DateTimeFormat` always exists. *Solutions* Choose one from the following: 1. <https://formatjs.io/docs/polyfills/intl-relativetimeformat/|https://formatjs.io/docs/polyfills/intl-relativetimeformat/> 2. Change back to date-fns 3. other polyfill
![]()
#428 Fix when Intl.RelativeTimeFormat is not available
Fixes <https://github.com/cofacts/rumors-site/issues/426|#426> *Chrome 70* <https://user-images.githubusercontent.com/108608/114820470-9c4e7a00-9df1-11eb-9ef8-9a6e4db80575.png|image> *Safari 13* <https://user-images.githubusercontent.com/108608/114820686-f8190300-9df1-11eb-9931-0a96f5e3e220.png|image>
![]()
Opensource.com
What motivates open source software contributors?
The reasons people contribute to free and open source (FOSS) projects has been a topic of much interest. However, the research on this topic dates back 10 or more years, and much has changed in the world since then. This article shares seven insights from a recent research study that revisited old motivation studies and asked open source contributors what motivates them today.
g0v.hackmd.io
![]()
TODOs ☐ Cross resolve article ☐ Change codegen directory to somewhere outside `src` so that it works after build
*Pull Request Test Coverage Report for <https://coveralls.io/builds/38905924|Build 1302>* • *9* of *10* *(90.0%)* changed or added relevant lines in *4* files are covered. • No unchanged relevant lines lost coverage. • Overall coverage decreased (*-0.1%*) to *86.712%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
#429 Bump ssri from 6.0.1 to 6.0.2
Bumps <https://github.com/npm/ssri|ssri> from 6.0.1 to 6.0.2. Changelog _Sourced from <https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md|ssri's changelog>._ > *<https://github.com/zkat/ssri/compare/v6.0.1...v6.0.2|6.0.2> (2021-04-07)* > *Bug Fixes* > > • backport regex change from 8.0.1 (<https://github.com/zkat/ssri/commit/b30dfdb|b30dfdb>), closes <https://github-redirect.dependabot.com/zkat/ssri/issues/19|#19> Commits • <https://github.com/npm/ssri/commit/b7c8c7c61db89aeb9fbf7596c0ef17071bc216ef|`b7c8c7c`> chore(release): 6.0.2 • <https://github.com/npm/ssri/commit/b30dfdb00bb94ddc49a25a85a18fb27afafdfbb1|`b30dfdb`> fix: backport regex change from 8.0.1 • See full diff in <https://github.com/npm/ssri/compare/v6.0.1...v6.0.2|compare view> Maintainer changes This version was pushed to npm by <https://www.npmjs.com/~nlf|nlf>, a new releaser for ssri since your current version. <https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores|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-site/network/alerts|Security Alerts page>.
#430 Put Call to Donation Information on website
We should put donation information on the index, article pages. Reference: <https://donate.wikimedia.org/|https://donate.wikimedia.org/>
#249 Put donation information in the last card of search result
We need to show our donation information when users query suspicious messages.
Comment on #430 Put Call to Donation Information on website
I think one of the doable item is to add <http://cofacts.tw/impact|Cofacts impact page> at the footer area, which will guide user through a series of information and then goes to donation page. Another thing would be that we can replace or adjust the current footer image so that user can be redirected to either chatbot or donation page.
OCF Lab 開放實驗室
2020 年,Linux 基金會 & 哈佛創新科學實驗室針對自由及開放原始碼軟體 (free and open source software; FOSS) 開發者進行調查,並公布調查結果。
This PR implements an article & reply LIFF (<https://g0v.hackmd.io/0RX4MsjRRJmBqJSKVilWMA#article-amp-reply-LIFF|Previous proposal>) that functionally supports: • Show the article by `articleId` in URL param • If no reply, allow users to submit reply requests • Lists all replies or show only the reply specified by `replyId` in URL param • Upvote & downvote article replies • setup userArticleLink so that users can be notified via Cofacts chatbot when new replies are available • implements `setViewed` mutation in LINE bot GraphQL to support this • sends GA events
Comment on #250 Aritcle LIFF scaffold
*Pull Request Test Coverage Report for <https://coveralls.io/builds/39053067|Build 1311>* • *3* of *3* *(100.0%)* changed or added relevant lines in *1* file are covered. • No unchanged relevant lines lost coverage. • Overall coverage increased (+*0.02%*) to *86.629%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
Figma
About Figma’s new Starter plan
Changes to our Starter plan
![]()
g0v.hackmd.io
![]()
Figma
Cofacts website (MrOrz's copy)
Created with Figma
![]()