Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

display percentage of achievement of todo in markdown#557

Merged
kazup01 merged 7 commits into
masterfrom
feature-todo-percentage
May 20, 2017
Merged

display percentage of achievement of todo in markdown#557
kazup01 merged 7 commits into
masterfrom
feature-todo-percentage

Conversation

@sosukesuzuki

Copy link
Copy Markdown
Contributor

I heard that There are people who using Boostnote as todo list. So, I made percentage of achievement it visible.

todolist

@LetItRock

Copy link
Copy Markdown
Contributor

Hello @sosukesuzuki,
I have a question - maybe it would be better to show something like this: "2 of 6 tasks complete" instead of percentage progress, like the same way as Github does?

@sosukesuzuki

Copy link
Copy Markdown
Contributor Author

Thank you for commenting @LetItRock ! That might be nice! I will discuss it.

@asmsuechan asmsuechan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I commented 🖊️


for (let i = 0; i < splitted.length; i++) {
let trimmedLine = splitted[i].trim()
if (trimmedLine.match(/^- \[\s|x\] ./)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add + and * as statements.

+

screen shot 2017-05-06 at 08 20 40

*

screen shot 2017-05-06 at 08 22 05

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for telling me. Oh... I had overlooked + and *. I'll add these operator.

let numberOfTodo = 0
let numberOfCompletedTodo = 0

for (let i = 0; i < splitted.length; i++) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume forEach is better than for in this case.

@sosukesuzuki sosukesuzuki May 10, 2017

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for commenting! Surely, It's long to using for than using foreach. So, I'll fix it.

return title
}

getPercentageOfCompleteTodo (value) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer the name of the argument is noteContent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for commenting ! Surely it is difficult to understand it mean. I'll fix it.

}) => (
<div styleName='percentageBar' style={{display: isNaN(percentageOfTodo) ? 'none' : ''}}>
<div styleName='progressBar' style={{width: percentageOfTodo + '%'}}>
<p styleName='percentageText'>{percentageOfTodo + '%'}</p>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use string literal 😄

@kazup01 kazup01 requested a review from asmsuechan May 10, 2017 06:18
@kazup01

kazup01 commented May 14, 2017

Copy link
Copy Markdown
Member

I will fix this UI at sometime soon🎨

@kazup01 kazup01 added the awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. label May 17, 2017
@kazup01 kazup01 self-assigned this May 18, 2017
@kazup01 kazup01 added the UI label May 18, 2017
@kazup01 kazup01 merged commit e52b74b into master May 20, 2017
@kazup01 kazup01 added Next Release and removed UI awaiting changes 🖊️ Pull request has been reviewed, but contributor needs to make changes. labels May 20, 2017
@kazup01 kazup01 deleted the feature-todo-percentage branch May 20, 2017 06:21
@kohei-takata kohei-takata mentioned this pull request Jun 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

5 participants