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

Move helper disambiguation to a flag that is off by default #515

Merged
merged 6 commits into from
Feb 14, 2024

Conversation

lolmaus
Copy link
Contributor

@lolmaus lolmaus commented Feb 6, 2024

Fixes #514. Fixes #504.

@lolmaus lolmaus force-pushed the opt-in-for-unambiguous-helpers branch from e427175 to 9c5ab2b Compare February 6, 2024 12:03
@lolmaus lolmaus force-pushed the opt-in-for-unambiguous-helpers branch from 9c5ab2b to 882c956 Compare February 6, 2024 12:05
@lolmaus lolmaus requested a review from mansona February 6, 2024 12:14
@lolmaus
Copy link
Contributor Author

lolmaus commented Feb 6, 2024

@mansona There's a failing integration test that I struggle with.

I've used the pre-unambiguous input and actual output (obtainedvia a unit test). Not sure what's wrong.

As for the covergate decrease, it may be caused by your decision to have only one test with flag enabled, so not all code paths are executed.

Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

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

some small changes, for the actual logic I'm happy to fully rely on the tests to see if it's doing the right thing

@@ -3,15 +3,15 @@
<h3 class="sr-only">
Components
</h3>
{{#bs-nav type="pills" stacked=true as |nav|}}
<BsNav @type="pills" @stacked={{true}} as |nav|>
Copy link
Member

Choose a reason for hiding this comment

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

This probably needs to go back to curly invocation for the input

@@ -1,2 +1,2 @@
<div>this template has no js </div>
{{#bs-button type="primary"}}Primary{{/bs-button}}
<BsButton @type="primary">Primary</BsButton>
Copy link
Member

Choose a reason for hiding this comment

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

same as above - curly invocation

@@ -1,9 +1,9 @@
{{site-header user=this.user class=(if this.user.isAdmin "admin")}}
<SiteHeader @user={{this.user}} @class={{if this.user.isAdmin "admin"}} />
Copy link
Member

Choose a reason for hiding this comment

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

same as above - curly invocation

tagName.includes &&
(tagName.includes('/') || (tagName.includes('-') && tagName.includes('.')))
);
function isNestedComponentTagName(tagName, unambiguousHelpers = false) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't quite understand the need for this function to change, if we do need it then we should probably add a comment to leave some help for future us 😂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted.

@lolmaus lolmaus force-pushed the opt-in-for-unambiguous-helpers branch from 0d0518e to 7629558 Compare February 14, 2024 15:21
@lolmaus lolmaus force-pushed the opt-in-for-unambiguous-helpers branch from 7629558 to ab2a93c Compare February 14, 2024 15:44
@lolmaus lolmaus requested a review from mansona February 14, 2024 15:45
Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mansona mansona added the bug Something isn't working label Feb 14, 2024
@mansona mansona merged commit a715623 into ember-codemods:master Feb 14, 2024
3 of 5 checks passed
@github-actions github-actions bot mentioned this pull request Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants