Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Replace comments configuration with commentOptions#104

Merged
liamnichols merged 6 commits intomainCreateAPI/CreateAPI:mainfrom
ln/simple-comment-optionsCreateAPI/CreateAPI:ln/simple-comment-optionsCopy head branch name to clipboard
Aug 5, 2022
Merged

Replace comments configuration with commentOptions#104
liamnichols merged 6 commits intomainCreateAPI/CreateAPI:mainfrom
ln/simple-comment-optionsCreateAPI/CreateAPI:ln/simple-comment-optionsCopy head branch name to clipboard

Conversation

@liamnichols
Copy link
Member

Prior to this change, we had a whole object dedicated to configuration flags relating to generating comments. While this was the default, it looked somewhat like this when used:

Disabling Comments

comments:
  isEnabled: false

Generating Title and Description Only

comments:
  isAddingExamples: false
  isAddingExternalLinks: false
  isCapitalizationEnabled: false

Generate everything without auto-capitalisation:

comments:
  isCapitalizationEnabled: false

It's relatively straightforward to use, but since I needed to rename all of the properties (#99), I thought it might be nicer to simplify it into an options set instead since its more expressive for what you are actually getting. For example:

Disabling Comments

commentOptions: []

Generating Title and Description Only

commentOptions: [title, description, capitalized]

Generate everything without auto-capitalisation:

commentOptions:
- title
- description
- example
- externalLinks

As with other 0.1 changes, I've removed the old options and marked commentOptions as replacing comments to help produce a nicer warning when migrating.

@liamnichols liamnichols self-assigned this Aug 4, 2022
@liamnichols liamnichols added this to the 0.1.0 milestone Aug 4, 2022
@liamnichols liamnichols force-pushed the ln/simple-comment-options branch from efa0d23 to fcf2b94 Compare August 5, 2022 09:43
@liamnichols liamnichols merged commit cb7918b into main Aug 5, 2022
@liamnichols liamnichols deleted the ln/simple-comment-options branch August 13, 2022 16:09
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.

Simplify comments configuration

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.