Conversation
…ge from Markdown to Snippet BoostIO#2810
|
Can you fix the conflict? And also check if the wakatime-cli is installed on the user system? Maybe display a small alert saying, the wakatime-cli is not found, please install it. |
|
Sure, I will do this weekend. |
|
@LuisReinoso ping:) Do you still interested in this PR? |
|
Oh oh oh.. I was forgot it.. Yes |
|
Haha no worries, glad you can contribute this feature 👍 |
|
@LuisReinoso ping |
|
@LuisReinoso ping! |
|
@LuisReinoso The CI fetch the original repo first the check out to the branch that contain your PR: I tried to checkout to your PR and my lint also result same as on CI Which is very strange, have you run lint on the right branch? or try updating lint by delete |
|
Thanks! I will tried again. Maybe some cache. |
|
I'm back I removed node_modules and installed again via yarn and it works.. Thanks..! |
|
Please review my changes. ;) |
ZeroX-DG
left a comment
There was a problem hiding this comment.
Can you fix your code and also provide i18n for this please?
| @@ -1,6 +1,5 @@ | |||
| { | |||
| "trailingComma": "es5", | |||
| "tabWidth": 2, | |||
There was a problem hiding this comment.
any reason why you changed this setting?
There was a problem hiding this comment.
Do you remember that I had an issue on CI step.?
Now it has the same as master branch:
https://github.com/BoostIO/Boostnote/blob/master/.prettierrc
{
"singleQuote": true,
"semi": false,
"jsxSingleQuote": true
}
| } | ||
|
|
||
| checkPluginsRequirements() { | ||
| this.checkWakatimePluginRequirement() |
There was a problem hiding this comment.
This method online call one method, why can't we directly call checkWakatimePluginRequirement?
There was a problem hiding this comment.
I was thinking on this page is named plugins so on future new user could use this function to check if their developed plugins has all requirements. But I will remove it.
| isWrite, | ||
| hasFileChanges, | ||
| isFileChange | ||
| ) { |
There was a problem hiding this comment.
The last 3 variable is all booleans. I suggest we change to object type for more clarification. For example, if we change this function to:
function sendWakatimeHeartBeat(storagePath, noteKey, storageName, {isWrite, hasFileChanges, isFileChange}) {
...
}We can keep the code inside the same but when we call this function, we will call it like this:
sendWakatimeHeartBeat(
storagePath,
noteKey,
storageName,
{ isWrite: true, hasFileChanges: false, isFileChange: true}
)
browser/components/CodeEditor.js
Outdated
| false, | ||
| false, | ||
| false | ||
| ) |
There was a problem hiding this comment.
This part seem to be a bit repeative. Surely we can improve the quality of this code by doing something similar to this:
if (this.props.onChange) {
this.props.onChange(editor)
}
const isWrite = !!this.props.onChange;
const hasFileChanges = isWrite;
if (storage) {
sendWakatimeHeartBeat(
storage.path,
noteKey,
storage.name,
isWrite,
hasFileChanges,
false
)
}There was a problem hiding this comment.
DONE, It was very old code XD
|
Please review my new changes. |
ZeroX-DG
left a comment
There was a problem hiding this comment.
Can you change your code and also add support translation for other languages too?
|
|
||
| checkWakatimePluginRequirement() { | ||
| const { wakatime } = this.state.config | ||
| if (wakatime.isActive && !commandExists('wakatime-cli')) { |
There was a problem hiding this comment.
This is wrong command name 😄 Should be like this:
| if (wakatime.isActive && !commandExists('wakatime-cli')) { | |
| if (wakatime.isActive && !commandExists('wakatime')) { |
| <div styleName='root'> | ||
| <div styleName='group'> | ||
| <div styleName='group-header'>{i18n.__('Plugins')}</div> | ||
| <div styleName='group-section'> |
There was a problem hiding this comment.
I think Wakatime isn't the only plugin that we support so it's better to create a section for Wakatime in this plugin setting page. Just a simple section with title Wakatime and bellow is a check box saying enable wakatime? and below it is the text box for wakatime key. If we plan to only have 1 plugin then this plugin page should change the name to Wakatime which I think will be worst cus harder to change when we want to support more plugins
|
@LuisReinoso ping |
NOTE: Just a simple section with title Wakatime and bellow is a check box saying enable wakatime? and below it is the text box for wakatime key.
|
Please review my new changes :D |
ZeroX-DG
left a comment
There was a problem hiding this comment.
VERY COOL! I'll approve this. Thanks for this PR 😄





Description
Add Wakatime support to track time spend writing in Boostnote.


Result on wakatime.
Issue fixed
#2810
Type of changes
Checklist: