Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@willbicks
Copy link
Contributor

This feature improves the comments generated for entities by improving the impact of the .Comment("") method on fields and edges. The details and justification are described in #2580.

The following changes are implemented:

  • If a comment is specified on a field schema with the .Comment("") method, that comment now replaces the default comment instead of being appended to it.
  • If a comment is specified on an edge schema with the .Comment("") method, that comment replaces the default comment instead of being ignored.
  • Documentation of the .Comment("") method is added to the getting started guide, and the field and edge schema docs.

Closes #2580

@willbicks
Copy link
Contributor Author

@a8m just wanted to flag this for your review in case you hadn't seen it, would love to know if you have any input!

@a8m
Copy link
Member

a8m commented Jun 12, 2022

Thanks for the contribution @willbicks 🙏

I'll review this later today. The CI is red - you need to run go generate ./... from the root of the project.

@willbicks willbicks force-pushed the feat/improve-generated-comments branch from fb1d416 to 58fba3c Compare June 12, 2022 16:19
@willbicks
Copy link
Contributor Author

@a8m Thanks for the tip, I updated the relevant integration schemas to reflect this change and regenerated all the generated files.

Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

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

Amazing job!

I added a few small comments. Please address them and I'll merge it. Thanks <3

* replace default field comment with user comment if defined
* use comments defined on edges in generated entities
* add docs for comment method on edges and fields
* update integration to reflect above changes
@willbicks willbicks force-pushed the feat/improve-generated-comments branch from 58fba3c to cb67632 Compare June 12, 2022 20:20
@willbicks
Copy link
Contributor Author

@a8m, I was able to push a new version that addressed your suggestions.

I have a few more places where I think the comment generation functionality could be improved, so I'll be looking into those and submit some requests when I have something.

Thanks for all your work in maintaining this project!

Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

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

Excellent job 🚀

@a8m a8m merged commit cd1afb2 into ent:master Jun 13, 2022
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.

Improve generated comments with user defined .Comment("")

2 participants