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(angular-output-target): escape kebab-case event names #307

Merged
merged 2 commits into from
Nov 28, 2022

Conversation

sean-perkins
Copy link
Collaborator

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally for affected output targets
  • Tests (npm test) were run locally and passed
  • Prettier (npm run prettier) was run locally and passed

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Kebab-case event names do not generate proxies correctly.

Issue URL: #212

What is the new behavior?

  • Kebab-case event names are escaped, allowing the angular output target to correctly generate the component proxies.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Copy link
Member

@tanner-reits tanner-reits left a comment

Choose a reason for hiding this comment

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

This looks fine, but is there any harm in just wrapping these in strings by default?

@sean-perkins
Copy link
Collaborator Author

@tanner-reits there would be no harm in always escaping the type name in the interface declaration. I think a reason we wouldn't always escape is to align closer to how a developer would write an interface manually. Formatters such as prettier remove quotes around type declarations that do not require escaping.

If we landed on wanting to always escape, we would likely want to get larger team exposure, as it would change the generated output of existing projects using the Angular output target.

Co-authored-by: Ryan Waskiewicz <ryanwaskiewicz@gmail.com>
@Trendy
Copy link

Trendy commented Nov 8, 2022

@tanner-reits there would be no harm in always escaping the type name in the interface declaration. I think a reason we wouldn't always escape is to align closer to how a developer would write an interface manually. Formatters such as prettier remove quotes around type declarations that do not require escaping.

If we landed on wanting to always escape, we would likely want to get larger team exposure, as it would change the generated output of existing projects using the Angular output target.

Would it make more sense to merge this to fix the existing issue, and consider escaping all the definitions as a potential enhancement further down the road?

@iron2414mw
Copy link

Any updates on this? If not, could you guys merge this please?

@Trendy
Copy link

Trendy commented Nov 24, 2022

Any updates on this? If not, could you guys merge this please?

I'll second this. Currently, we're manually applying this patch to our repositories to get around the issue with kebab case event names.

@sean-perkins sean-perkins merged commit c42cc9f into main Nov 28, 2022
@sean-perkins sean-perkins deleted the fix/angular-kebab-case-events branch November 28, 2022 16:22
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

6 participants