You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like this idea. Unfortunately it might be difficult to accomplish. We'd likely need to find a way to use the node-color-readline package with Inquirer.js. If we could find that out, then it might be possible. Even then, we'd need the individual commitizen adapters to adopt this feature.
@sarbbottam Technically we just pass the adapter an instance of Inquirer, so you can ignore that instance and use something completely separate for prompts. If that thing you uses works with node-color-readline then everything should work. Currently most adapters take advantage of Inquirer because it is so simple to implement and covers a high percentage of use cases. I am open to having these changes in the cz-conventional-changelog if you'd like to put in a PR.
Sure thing. I'm happy to answer any questions, review code, or point you in
the right direction.
On Mon, Apr 4, 2016 at 4:06 PM Sarbbottam Bandyopadhyay < notifications@github.com> wrote:
I think it would be a very valuable enhancement to cz-cli to change the color after 50 characters for a "recommended" length and to change it again or prevent typing at the point the short description would be truncated.
My team has been surprised many times where their messages are truncated when reading through previous logs since there is currently no feedback when constructing the commit.
it looks like i never updated this thread with progress that i was able to make. i was able to get the change discussed above accepted into inquirer in SBoudrias/Inquirer.js#359 (pr was SBoudrias/Inquirer.js#642), but i havent found time to leverage that ability to make the contribution back to commitizen to finish this up.
if someone happens to want to pick that up before i can get to it, the documentation to use the formatter/transformer can be found here (under transformer).
Thanks for the update and the work to get that into Inquirer @travi! Seems like it would be a good one for someone to pick up. I will leave this open as a todo.
Activity
jimthedev commentedon Apr 4, 2016
Hi @sarbbottam,
I like this idea. Unfortunately it might be difficult to accomplish. We'd likely need to find a way to use the node-color-readline package with Inquirer.js. If we could find that out, then it might be possible. Even then, we'd need the individual commitizen adapters to adopt this feature.
Thanks!
sarbbottam commentedon Apr 4, 2016
Thanks @jimthedev, wondering if this should be implemented at Inquirer.js, since Inquirer.js owns/handles the prompt.
jimthedev commentedon Apr 4, 2016
@sarbbottam Technically we just pass the adapter an instance of Inquirer, so you can ignore that instance and use something completely separate for prompts. If that thing you uses works with node-color-readline then everything should work. Currently most adapters take advantage of Inquirer because it is so simple to implement and covers a high percentage of use cases. I am open to having these changes in the cz-conventional-changelog if you'd like to put in a PR.
sarbbottam commentedon Apr 4, 2016
@jimthedev let me take a look, will be more than happy to raise a PR, I might need a little guidance.
I guess I should have raised the issue in cz-conventional-changelog.
jimthedev commentedon Apr 4, 2016
Sure thing. I'm happy to answer any questions, review code, or point you in
the right direction.
On Mon, Apr 4, 2016 at 4:06 PM Sarbbottam Bandyopadhyay <
notifications@github.com> wrote:
sarbbottam commentedon Apr 4, 2016
Hi @jimthedev,
I guess cz-conventional-changelog/index.js#L67-L71 can pass a
transformer function
toInquirer.js
and
Inquirer.js/lib/prompts/input.js#L55-L70 can invoke this
transformer function
Let me know your thoughts.
jimthedev commentedon Aug 14, 2016
@sarbbottam Seems like a good idea. I'm open to it. If you can get a PR landed in Inquirer then I'd be open to this.
travi commentedon Mar 13, 2017
@sarbbottam are you still planning to put a PR together for SBoudrias/Inquirer.js#359 to enable this?
I think it would be a very valuable enhancement to
cz-cli
to change the color after 50 characters for a "recommended" length and to change it again or prevent typing at the point the short description would be truncated.My team has been surprised many times where their messages are truncated when reading through previous logs since there is currently no feedback when constructing the commit.
sarbbottam commentedon Mar 14, 2017
@travi I have been busy, feel free to take it up.
travi commentedon Mar 14, 2017
thanks for the update. i'm not sure when i will get a chance to do it, but i will keep it in mind. please feel free if you get a chance before me.
travi commentedon May 24, 2018
it looks like i never updated this thread with progress that i was able to make. i was able to get the change discussed above accepted into inquirer in SBoudrias/Inquirer.js#359 (pr was SBoudrias/Inquirer.js#642), but i havent found time to leverage that ability to make the contribution back to commitizen to finish this up.
if someone happens to want to pick that up before i can get to it, the documentation to use the formatter/transformer can be found here (under
transformer
).jimthedev commentedon May 24, 2018
Thanks for the update and the work to get that into Inquirer @travi! Seems like it would be a good one for someone to pick up. I will leave this open as a todo.