Add Rename boards#73
Add Rename boards#73pavlochernovyy wants to merge 3 commits intoklaudiosinani:masterfrom pavlochernovyy:feature/rename-boards
Conversation
pavlochernovyy
commented
Aug 8, 2018
- Rename boards by specifying
lib/help.js
Outdated
| --priority, -p Update priority of task | ||
| --archive, -a Display archived items | ||
| --restore, -r Restore items from archive | ||
| --renameBoard -r Rename board; boards with spaces - specify via "_" symbol like My_Board |
There was a problem hiding this comment.
I feel like --rename-board would be more standard here :)
There was a problem hiding this comment.
Yes, --rename-board is more standard.
There was a problem hiding this comment.
Also it looks like your alias -r conflicts with the restore command, and you could use a comma after the full command name
| $ tb --list pending coding | ||
| $ tb --archive | ||
| $ tb --restore 4 | ||
| $ tb --rename-board My_Board Todo |
There was a problem hiding this comment.
Nitpick: But can we keep the stylizing of the board names consistent. Elsewhere, boards are referred to as all lower case, single words. Here, you've introduced a camel-case, "_" separated pattern that clashes a bit with the above examples
There was a problem hiding this comment.
Why not use quotes?
This would be the only place in the application where we need to replace spaces with underscores.
Why not:
tb --rename-board "My Board" Todo
?
|
|
||
| missingStorage() { | ||
| const prefix = '\n'; | ||
| const message = 'There are no any boards, please create some task at least to start'; |
There was a problem hiding this comment.
Can we change the copy to: "There are currently no boards"
|
|
||
| missingBoardName(name) { | ||
| const prefix = '\n'; | ||
| const message = `There are no any board with name: ${name}`; |
There was a problem hiding this comment.
Can we change the copy here to:
"There are no boards with the name: ${name}"
| return archive; | ||
| } | ||
|
|
||
| renameBoardsWithName(oldName, newName) { |
There was a problem hiding this comment.
I don't agree with this approach.
The task data manipulation is not done in the Storage class, this class is supposed to read and write the data, not perform logic like this.
You should move this logic to the TaskBoard class itself and just use the Storage to read and write data back.
| $ tb --list pending coding | ||
| $ tb --archive | ||
| $ tb --restore 4 | ||
| $ tb --rename-board My_Board Todo |
There was a problem hiding this comment.
Why not use quotes?
This would be the only place in the application where we need to replace spaces with underscores.
Why not:
tb --rename-board "My Board" Todo
?