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

feat(language-service): Quick fix to import a component when its selector is used #47088

Closed
wants to merge 1 commit into from

Conversation

dylhunn
Copy link
Contributor

@dylhunn dylhunn commented Aug 9, 2022

The language service can now generate an import corresponding to a selector. This includes both the TypeScript module import and the decorator import. This applies to both standalone components and components declared in NgModules.

Previous PRs in this sequence:
Language Service: #47181
Compiler: #47180, #47166, #47561, #47631

@dylhunn dylhunn added state: WIP area: language-service Issues related to Angular's VS Code language service target: minor This PR is targeted for the next minor release labels Aug 9, 2022
@ngbot ngbot bot modified the milestone: Backlog Aug 9, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch 4 times, most recently from 0fa7567 to 2eb969b Compare August 9, 2022 06:48
@dylhunn dylhunn modified the milestones: Backlog, v15-candidates Aug 19, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch 2 times, most recently from e854da9 to d383f22 Compare September 22, 2022 02:41
@dylhunn dylhunn added area: compiler Issues related to `ngc`, Angular's template compiler compiler: template type-checking cross-cutting: standalone Issues related to the NgModule-less world labels Sep 22, 2022
@dylhunn dylhunn changed the title feat(language-service): Quick fix to add imports for standalone components feat(language-service): Quick fix to import a component when its selector is used Sep 22, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch 3 times, most recently from 90853b7 to e8250fc Compare September 27, 2022 18:28
@angular-robot angular-robot bot added the feature Issue that requests a new feature label Oct 5, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch 5 times, most recently from beb4e2b to 35f6a9b Compare October 5, 2022 07:57
@dylhunn dylhunn added action: review The PR is still awaiting reviews from at least one requested reviewer and removed state: WIP labels Oct 6, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch 4 times, most recently from 1d09c07 to bd9b144 Compare October 6, 2022 19:45
@dylhunn dylhunn requested a review from alxhub October 6, 2022 19:45
@dylhunn dylhunn force-pushed the auto-import-component branch 4 times, most recently from ea053eb to 23c69d6 Compare October 6, 2022 23:13
packages/language-service/src/ts_utils.ts Outdated Show resolved Hide resolved
packages/language-service/src/ts_utils.ts Outdated Show resolved Hide resolved
packages/language-service/src/ts_utils.ts Show resolved Hide resolved
packages/language-service/src/ts_utils.ts Outdated Show resolved Hide resolved
packages/language-service/test/code_fixes_spec.ts Outdated Show resolved Hide resolved
@dylhunn dylhunn force-pushed the auto-import-component branch 3 times, most recently from 632065e to fd0fe22 Compare October 10, 2022 17:39
@dylhunn dylhunn dismissed atscott’s stale review October 10, 2022 20:03

All suggestions applied.

@dylhunn dylhunn force-pushed the auto-import-component branch 2 times, most recently from ec90ac6 to 0e27ade Compare October 10, 2022 20:30
@dylhunn
Copy link
Contributor Author

dylhunn commented Oct 10, 2022

@alxhub I have applied fixes for all your comments, thanks!

…ctor is used

The language service can now generate an import corresponding to a selector. This includes both the TypeScript module import and the decorator import. This applies to both standalone components and components declared in NgModules.
@dylhunn dylhunn added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 10, 2022
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit bebef5f.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler area: language-service Issues related to Angular's VS Code language service compiler: template type-checking cross-cutting: standalone Issues related to the NgModule-less world feature Issue that requests a new feature target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants