-
-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
37152eb
to
6d0df5d
Compare
@byCedric Have you seen this? what do you think? |
Hi @johnanisere! I like it, thanks! I'll take care of some small code styling adjustments. I've also added 2 comments, it's nothing big 😄 Thanks a lot ❤️ FYI, I might move the highlight decorators to the |
src/molecules/user/user.js
Outdated
key={key} | ||
href={mentionLink(segment)} | ||
target="_blank" | ||
rel="noopener noreferrer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I always forget the rel
attributes on these things 😄 Thanks! I think the noopener
is a safe one, but I'm not sure about the noreferrer
. Do you have any thoughts in this one?
src/molecules/user/user.js
Outdated
"@": (segment, match, key) => ( | ||
<UserDescriptionHighlight | ||
key={key} | ||
href={mentionLink(segment)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must add a bit more documentation to the highlighter atom I think. In the mentionLink
you separate the special character @
from the text right? Luckily I thought about this use case when I built the highlighter, it's the match
parameter 😄 But again, this is fully my fault for lack of documentation.
TL;DR; The match
parameter is the value you can use here, without having to separate the character from text yourself 😄
The decorator is invoked with the segment, match and key. Take this text for example:
Something something @abc somehting @qwe
This will result in 2x method invocations with the @
decorator with the following arguments:
invocation | segment | match | key |
---|---|---|---|
# 0 | @abc |
abc |
0 |
# 1 | @qwe |
qwe |
1 |
The 600 weight matches GitHub's version.
Codecov Report
@@ Coverage Diff @@
## develop #65 +/- ##
========================================
Coverage 11.01% 11.01%
========================================
Files 22 22
Lines 118 118
Branches 12 12
========================================
Hits 13 13
Misses 95 95
Partials 10 10
|
# [0.4.0](0.3.1...0.4.0) (2018-12-01) ### Code refactors * move user description highlights to github user organism ([#68](#68)) ([2575cec](2575cec)) * remove superseded github mentions ([#84](#84)) ([5e9e513](5e9e513)) * upgrade now to version 12.0.0 ([#74](#74)) ([3878702](3878702)) * upgrade react-scripts to version 2.1.0 ([#73](#73)) ([74e8974](74e8974)) * user molecule layout to allow other content ([#63](#63)) ([d1ad708](d1ad708)) ### Documentation changes * add notice about deployments with now v2 ([#83](#83)) ([167a5f3](167a5f3)) ### New features * implement mention link in user molecule ([#65](#65)) ([0a0cb92](0a0cb92)) * prototype github mentions support as a component ([#56](#56)) ([1788b32](1788b32)) * upgrade to now version 2 ([#79](#79)) ([f97f7ab](f97f7ab)) ### Pipeline changes * escape stylelint file glob ([#64](#64)) ([0cc473f](0cc473f)) * limit node versions because of unexpected fetch behaviour ([#82](#82)) ([eb50a5f](eb50a5f)) * test full build in travis to detect feature issues with cra ([#85](#85)) ([5592f94](5592f94)) * upgrade travis with auto-release and security checks ([#81](#81)) ([da79f78](da79f78)) ### Testing updates * add extra tests to atom components ([#67](#67)) ([41d746c](41d746c)) * add extra tests to github provider ([#66](#66)) ([14d6efa](14d6efa)) * add unit tests for github user organism ([#70](#70)) ([4023dc1](4023dc1)) * add unit tests for user molecule ([#69](#69)) ([84eb513](84eb513)) * clean up dirty tests and add app page component test ([#71](#71)) ([addb123](addb123))
# [0.4.0](0.3.1...0.4.0) (2018-12-01) ### Code refactors * move user description highlights to github user organism ([#68](#68)) ([2575cec](2575cec)) * remove superseded github mentions ([#84](#84)) ([5e9e513](5e9e513)) * upgrade now to version 12.0.0 ([#74](#74)) ([3878702](3878702)) * upgrade react-scripts to version 2.1.0 ([#73](#73)) ([74e8974](74e8974)) * user molecule layout to allow other content ([#63](#63)) ([d1ad708](d1ad708)) ### Documentation changes * add notice about deployments with now v2 ([#83](#83)) ([167a5f3](167a5f3)) ### New features * implement mention link in user molecule ([#65](#65)) ([0a0cb92](0a0cb92)) * prototype github mentions support as a component ([#56](#56)) ([1788b32](1788b32)) * upgrade to now version 2 ([#79](#79)) ([f97f7ab](f97f7ab)) ### Pipeline changes * escape stylelint file glob ([#64](#64)) ([0cc473f](0cc473f)) * limit node versions because of unexpected fetch behaviour ([#82](#82)) ([eb50a5f](eb50a5f)) * test full build in travis to detect feature issues with cra ([#85](#85)) ([5592f94](5592f94)) * upgrade travis with auto-release and security checks ([#81](#81)) ([da79f78](da79f78)) ### Testing updates * add extra tests to atom components ([#67](#67)) ([41d746c](41d746c)) * add extra tests to github provider ([#66](#66)) ([14d6efa](14d6efa)) * add unit tests for github user organism ([#70](#70)) ([4023dc1](4023dc1)) * add unit tests for user molecule ([#69](#69)) ([84eb513](84eb513)) * clean up dirty tests and add app page component test ([#71](#71)) ([addb123](addb123))
Linked issue
User description's clickable GitHub mentions. As mentioned in issue #59.