*Pull Request Test Coverage Report for <https://coveralls.io/builds/43227581|Build 1297709786>* • *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 *87.333%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
``` Move categories that has been added to the front Then list out categories that is also marked in similar articles Then the rest of the categories. ``` how to find the `Then list out categories that is also marked in similar articles` ? <https://github.com/MrOrz|@MrOrz>
Hi <https://github.com/kelvin2go|@kelvin2go> , Thanks for taking a look! It can be retrieved by modifying the <https://github.com/cofacts/rumors-site/blob/master/pages/article/%5Bid%5D.js#L131|current GraphQL query> to include categories in `similarArticles`. ``` query LoadArticlePage($id: String!) { GetArticle(id: $id) { # ... Other fields ... similarArticles: relatedArticles { edges { node { # ... Other fields for the similar article ... articleCategories { categoryId } } } } # ... Other fields ... } } ``` <https://user-images.githubusercontent.com/108608/135952661-4a730cf3-f499-4c50-bb6c-3fb4f953cab9.png|image>
<https://github.com/cofacts/rumors-site/pull/452|#452 397 add sorted category for articles>
it seem my prettier a bit different than the original project @_@
<https://github.com/cofacts/rumors-site/issues/397|#397>
g0v.hackmd.io
> it seem my prettier a bit different than the original project @_@ <https://github.com/kelvin2go|@kelvin2go> You can run `npm run lint:fix`.
<https://coveralls.io/builds/43285251|Coverage Status> Coverage remained the same at 75.261% when pulling *<https://github.com/cofacts/rumors-site/commit/c438ace8003e1cc84cd27b693eeefda8ca4a449f|c438ace> on kelvin2go:feature/397-reorder-caterogries* into *<https://github.com/cofacts/rumors-site/commit/7ed37f817d534ed683848a46763a248442310f99|7ed37f8> on cofacts:master*.
Review on #452 397 add sorted category for articles
LGTM! Thanks for implementing this!
Closed via <https://github.com/cofacts/rumors-site/pull/452|#452> . Kudos to <https://github.com/kelvin2go|@kelvin2go> :raised_hands:
HackMD
# Cofacts 會議記錄 ## 2021 - [20211006 會議記錄](/zlWWCpDTQ5iADHNw7Thpog) - [20210929 會議記錄](/5VRwpbcJSlSP
:schmusekatze::point_right: <https://g0v-jothon.kktix.cc/events/g0v-hackath46n>
<https://github.com/cofacts/rumors-site/issues/413|#413> • math.ceil for 1,2 • add github contribution graph like css <https://user-images.githubusercontent.com/2888757/136179050-87baa028-a0ca-44ae-8429-7076f1e578a3.gif|screen-capture (1)>
:white_check_mark: No checks have passed
封禁,又称封锁或查封,是管理员阻止用户参与维基百科编辑的手段。封禁的目的只有一個,就是防止维基百科遭到持续或严重破坏,而绝非惩罚用户。 用户可以在当前的破坏页面或者本文提及的其他页面中提议封禁,提议的同时亦应提供充分的证据,但管理员有权拒绝执行被提议的封禁,并可以进行独立的调查。如果您认为某一个封禁不合理,请在使用者討論頁使用{{Unblock}}或向管理员发電子郵件讨论。
``` adaptive max contribution max(10, max(user_contribution)) 作為 contribution graph 的 max scale ``` for this, should it changes max scale to 10 ? <https://github.com/cofacts/rumors-site/pull/453/files#diff-b170cff4fb01eac4d00fe240d828301e6e8900a7ae3443ad833eeff2a6d64d8fR13|https://github.com/cofacts/rumors-site/pull/453/files#diff-b170cff4fb01eac4d00fe240d828301e6e8900a7ae3443ad833eeff2a6d64d8fR13> and for test part should i update the story snapshot after implement?
Sorry for the late reply, and thanks for taking this issue! • Current coloring of attribution is fixed at 5 contributions per level (`SCALING_FACTOR`). Therefore, daily contribution must exceed 23 (`23 / SCALING_FACTOR = 4.6 ~= 5`) to be painted to deepest color. • The _adaptive max contribution proposal_ wants that max scale to adapt to each user. For example, if the max contribution count of the user is 16 for the past 365 days, we should color the contribution count 1 ~ 4 with light color, 5 ~ 8 with deeper color, 9 ~ 12 with 2nd deeper color, and 13 ~ 16 with deepest color. • However, if the max contribution count of the user for the past 365 days is lower than 10, it would be a bit unfair for other contributors if we also paint those contribution as deepest color. Therefore, in the proposal we added a max-contribution lower-bound: if the max contribution count of the user for the past 365 days is lower than 10, we will use 10 when calculating the color scale. If we put it in code, • `MAX_SCALE` remains 4, as available `colorCofactsN` still ranges from `colorCofacts0` to `colorCofacts4`. • `SCALING_FACTOR` (number of contributions needed to go to the deeper color) should no longer be a constant across different users. If max contribution in `data` is below 10, the scaling factor is `10/MAX_SCALE = 2.5`; otherwise, it is `max contribution / MAX_SCALE`. • The logic of `scaleColor` is `Math.max(Math.min(Math.ceil(count / varingScalingFactor), MAX_SCALE), 0)`. The inner-most `Math.ceil` is identical to your current PR :+1: And yes, the storyshot should be updated and attached to the PR, so that we can know there are DOM changes in the PR :eyes:
View details in Rollbar: <https://rollbar.com/mrorz/rumors-line-bot/items/539/|https://rollbar.com/mrorz/rumors-line-bot/items/539/> ``` TypeError: Cannot destructure property 'articleReplies' of 'e' as it is null. File "<https://line-bot.cofacts.tw/liff/index.f45801dc3131a2f90145.js>", line 1, in [anonymous] File "<https://line-bot.cofacts.tw/liff/index.f45801dc3131a2f90145.js>", line 1, in wr File "<https://line-bot.cofacts.tw/liff/index.f45801dc3131a2f90145.js>", line 1, in i ``` Can be reproduced: <https://user-images.githubusercontent.com/108608/136896754-60e0a7b6-ba03-440f-8f9f-0185bb7ce81e.png|image> Root cause: the `articleId` is malformed and thus `GetArticle` field returns null. Proposed fix: gracefully fallback to an error text
*Pull Request Test Coverage Report for <https://coveralls.io/builds/43431587|Build 1331940430>* • *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 *87.333%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
g0v.hackmd.io
<https://github.com/MrOrz|@MrOrz> I updated varingScalingFactor and the snapshot. Can you check it ? but snapshot test seem fail on other component. ``` modified: components/AppLayout/AppHeader.js modified: components/AppLayout/AppSidebar.js modified: components/AppLayout/__snapshots__/UpgradeDialog.stories.storyshot modified: components/ArticleCategories/CategoryOption.js modified: components/ArticleReplyFeedbackControl/__snapshots__/ArticleReplyFeedbackControl.stories.storyshot modified: components/Infos/__snapshots__/Infos.stories.storyshot modified: components/ListPageControls/__snapshots__/BaseSortInput.stories.storyshot modified: components/ListPageControls/__snapshots__/BaseTimeRange.stories.storyshot modified: components/ListPageControls/__snapshots__/Filters.stories.storyshot modified: components/ListPageControls/__snapshots__/LoadMore.stories.storyshot modified: components/ProfilePage/UserPageHeader.js modified: components/ReportPage/__snapshots__/ActionButton.stories.storyshot modified: components/__snapshots__/Hyperlinks.stories.storyshot modified: components/__snapshots__/TrendPlot.stories.storyshot modified: components/__snapshots__/icons.stories.storyshot ```
<https://github.com/kelvin2go|@kelvin2go> It seems that your local material-ui version is different from this project. You can try the command writing in <https://github.com/cofacts/rumors-site#storybook|README.md> : ``` # install the same npm package as this project npm install # run test and update snapshot npm test -- -u ```
> <https://github.com/kelvin2go|@kelvin2go> It seems that your local material-ui version is different from this project. > > You can try the command writing in <https://github.com/cofacts/rumors-site#storybook|README.md> : > > ``` > # install the same npm package as this project > npm install > > # run test and update snapshot > npm test -- -u > > ``` hi <https://github.com/nonumpa|@nonumpa>, i only changed components/ContributionChart.js so i update only components/*snapshots*/ContributionChart.stories.storyshot or when i run `test -- -u` it changed other files as below. shoud i updated it to branch as well? ``` modified: components/AppLayout/__snapshots__/UpgradeDialog.stories.storyshot modified: components/ArticleReplyFeedbackControl/__snapshots__/ArticleReplyFeedbackControl.stories.storyshot modified: components/Infos/__snapshots__/Infos.stories.storyshot modified: components/ListPageControls/__snapshots__/BaseSortInput.stories.storyshot modified: components/ListPageControls/__snapshots__/BaseTimeRange.stories.storyshot modified: components/ListPageControls/__snapshots__/Filters.stories.storyshot modified: components/ListPageControls/__snapshots__/LoadMore.stories.storyshot modified: components/ReportPage/__snapshots__/ActionButton.stories.storyshot modified: components/__snapshots__/Hyperlinks.stories.storyshot modified: components/__snapshots__/TrendPlot.stories.storyshot modified: components/__snapshots__/icons.stories.storyshot ```
It's abnormal, and I guess other .storyshot files also change `className="makeStyles-tooltipText-311"` to `className="makeStyles-tooltipText-74"`. Maybe you can google the keyword "npm local vs global package" to solve this problem. * * * Explanation of why I guess your local material-ui version is different from this project and why it should not have `className="makeStyles-tooltipText-*"` change : First, we take a look at the .storyshot change <https://user-images.githubusercontent.com/6376572/137577194-cab342b0-5ae3-476c-aae8-a34754e39afa.png|snapshot> And then look what <https://github.com/cofacts/rumors-site/runs/3903371438|CI test> result says > line 35 and 36 means > It should be `aria-hidden="true"` not `aria-hidden={true}` > line 48 and 49 means > It should be `className="makeStyles-tooltipText-311"` not `className="makeStyles-tooltipText-74"` That means only `className="makeStyles-colorCofacts*"` is the right change. This makes sense because you only change the function `scaleColor` which only affects `colorCofacts*`.
No worries, I think I can make a commit that tries to fix CI :muscle:
hi <https://github.com/MrOrz|@MrOrz> , after test with <https://github.com/nonumpa|@nonumpa> look like "@material-ui/core": "^4.9.7", 4.9.9 can pass the test. not sure, which version is CI using @@'
<https://coveralls.io/builds/43552123|Coverage Status> Coverage increased (+0.03%) to 75.295% when pulling *<https://github.com/cofacts/rumors-site/commit/c650642af23d91000f74a9beb89ae511c711990d|c650642> on kelvin2go:feature/413-contribution-graph-enhancements* into *<https://github.com/cofacts/rumors-site/commit/8c26bbb82ca329429f6be3b2aa4163e4327b4dbd|8c26bbb> on cofacts:master*.
`varingScalingFactor` should vary according to _max contribution count_; `count` is the contribution count of the current cell and should not be used when calculating `varingScalingFactor`. The current logic will make any contribution count >= 10 colored in the deepest color (because in this case, `count / varingScalingFactor` = `count / (count / MAX_SCALE)` = `MAX_SCALE`); however, what we want in the <https://github.com/cofacts/rumors-site/pull/453#issuecomment-939410341|comment> is that the `varingScalingFactor` scales according to _max contribution count_ instead of `count`. We will need to calculate the max contribution count in a place that is accessible to such data (such as in `ContributionChart`. There is already a `total` const being calculated there, max contribution count should be calculated in a similar fashion) and passed to `scaleColor` as a new argument.
Review on #453 add github like contribution graph css and ceil for 1,2 report count
Thanks for trying to fix this issue! An implementation detail of color scale is attached below.
Should be Suggested change Current logic will cause `count` < 10 to have deeper color than `count` > 10. <https://user-images.githubusercontent.com/64118746/138030035-33831f87-3124-4c54-b1c3-75ece6e718e1.gif|8-10>
Review on #453 add github like contribution graph css and ceil for 1,2 report count
I will make a commit that fix the bug below
Review on #453 add github like contribution graph css and ceil for 1,2 report count
Now the new color system and mobile style is working as expected. Thank you for the fix!
HackMD
# Cofacts 會議記錄 ## 2021 - [20211020 會議記錄](/wNhf1vDGQd6J2Plp4u4Ebg) - [20211013 會議記錄](/0Cv5hmmAQYyW
<https://github.com/cofacts/rumors-site/pull/454|#454 Adjust ContributionChart coloring>
Adjust coloring again to make contributions obvious for both low contribution and high contribution users. • For users with max contribution >= 20, it takes 5 contribution to advance to next color. • This is the same as before <https://github.com/cofacts/rumors-site/pull/453|#453> is merged • For users with max contribution <= 8, it only takes 2 contribution to advance to next color. • So that new users in editor's meetup can see their color deepen faster • For users with max contribution in between, the coloring step scales propotionally. *Screenshots* In the screenshots below, the maximum daily contribution is `29`. *Before <https://github.com/cofacts/rumors-site/pull/453|#453>* • Takes 5 contribution to advance to next level • However, coloring is rounded (`Math.round(count / 5)`) so that there is no color for count = 1 or 2. <https://user-images.githubusercontent.com/108608/138272171-995a85c3-7e34-497b-ae8b-ad9b1e6d00fa.png|image> *Current production (<https://github.com/cofacts/rumors-site/pull/453|#453> )* • days with contribution 1, 2 lights up (by `Math.ceil` in <https://github.com/cofacts/rumors-site/pull/453|#453>) • However, some cell's contribution color become lighter because maximum color is scaled to 29. <https://user-images.githubusercontent.com/108608/138271901-646dfc0c-5da9-4cd6-87d7-15d59b6edfe2.png|image> *This PR* • As max contribution > 29, it is colored as if max contribution is 20. • Advance to next color every 5 contributions. • Any contribution >= 16 will be colored in deepest color. • As a result, the color of many cells are deepened. <https://user-images.githubusercontent.com/108608/138272024-d5eee79c-86ad-4476-af48-9ee421dacfe2.png|image> *Users with fewer contribution or no contributions* <https://user-images.githubusercontent.com/108608/138276349-22bb512f-82e2-4dab-8099-b622df95c411.png|image> <https://user-images.githubusercontent.com/108608/138276412-6dd02866-fc39-4018-a6b3-7ebfb148865b.png|image>
:white_check_mark: All checks have passed
<https://coveralls.io/builds/43668031|Coverage Status> Coverage increased (+0.07%) to 75.363% when pulling *<https://github.com/cofacts/rumors-site/commit/d808d14593823bcb51d7dcdba4bec1d9f21ba219|d808d14> on adjust-contrib-chart* into *<https://github.com/cofacts/rumors-site/commit/3b5ad977ad3278f8c7abd8df3b86cc86b69abd5b|3b5ad97> on master*.
Dailymotion
国際報道2021「台湾 “シビックハッカー”たちの社会革命」 0310 202106010139 - 動画 Dailymotion
国際報道2021「台湾 “シビックハッカー”たちの社会革命」 0310 202106010139を見る - Dailymotionでyk4tvを視聴
<https://github.com/cofacts/rumors-line-bot/pull/296|#296 Add Korean translation>
:white_check_mark: All checks have passed
*Pull Request Test Coverage Report for <https://coveralls.io/builds/43716770|Build 1374844925>* • *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 *87.333%* * * * * * * *:yellow_heart: - <https://coveralls.io|Coveralls>*
<https://github.com/cofacts/rumors-site/pull/455|#455 Add Korean translation>
:white_check_mark: All checks have passed
<https://coveralls.io/builds/43717184|Coverage Status> Coverage remained the same at 75.363% when pulling *<https://github.com/cofacts/rumors-site/commit/557ba7b1156b3a5e9d4f507518cdc1848d9f791b|557ba7b> on ko* into *<https://github.com/cofacts/rumors-site/commit/9a68c273d1fa0199fc8c39f6426117b3ad3fce2e|9a68c27> on master*.
<https://coveralls.io/builds/43725250|Coverage Status> Coverage increased (+0.09%) to 86.137% when pulling *<https://github.com/cofacts/rumors-api/commit/2a03a7195fa914c4db671d9a0a48a158b086ad0a|2a03a71> on mutation-adds-status* into *<https://github.com/cofacts/rumors-api/commit/5e1fbd126ffc46a0f6b0e54009599b6321e81ab7|5e1fbd1> on master*.
g0v.hackmd.io