Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): add spaces for camel case template names in preview #54

Merged

Conversation

co-sic
Copy link
Contributor

@co-sic co-sic commented Nov 5, 2023

Component / Package Name:

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

Currently in the preview sidebar the template names are displayed as one string with only the first letter uppercase. This does not work well for camelCase names, since you can't distinguish the words anymore. E.g.: NewCustomerWithNewAccount -> Newcustomerwithnewaccount which is hard to read.
With this fix it will display as: "New Customer With New Account".

@co-sic
Copy link
Contributor Author

co-sic commented Nov 5, 2023

@shellscape we could also remove the titleize dependency. It is only used in this place and the whole package is also just one regex replace. Not sure how you feel about such dependencies, but feels a little unecessary to use a package for that.

https://github.com/sindresorhus/titleize/blob/main/index.js

@shellscape
Copy link
Owner

shellscape commented Nov 5, 2023

I'm good to leave titleize in there for now. There's a refactor coming where the CLI will be bundled and it won't matter much.

thanks!

@shellscape shellscape merged commit 009bd69 into shellscape:main Nov 5, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants