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 comp: 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 Aug 9, 2022
@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 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 Sep 27, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch from e8250fc to 3046f95 Compare Oct 5, 2022
@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 Oct 5, 2022
atscott
atscott previously requested changes Oct 5, 2022
packages/language-service/src/ts_utils.ts Outdated Show resolved Hide resolved
packages/language-service/src/ts_utils.ts Outdated Show resolved Hide resolved
@dylhunn dylhunn force-pushed the auto-import-component branch 3 times, most recently from bd161ea to d198966 Compare Oct 6, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch 4 times, most recently from 1d09c07 to bd9b144 Compare Oct 6, 2022
@dylhunn dylhunn requested a review from alxhub Oct 6, 2022
@dylhunn dylhunn force-pushed the auto-import-component branch 4 times, most recently from ea053eb to 23c69d6 Compare Oct 6, 2022
alxhub
alxhub approved these changes Oct 7, 2022
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 Oct 10, 2022
@dylhunn dylhunn dismissed atscott’s stale review Oct 10, 2022

All suggestions applied.

@dylhunn dylhunn force-pushed the auto-import-component branch 2 times, most recently from ec90ac6 to 0e27ade Compare Oct 10, 2022
@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 force-pushed the auto-import-component branch from 0e27ade to 99fbd76 Compare Oct 10, 2022
@dylhunn dylhunn added action: merge PR author is ready for this to merge and removed action: review labels Oct 10, 2022
@jessicajaniuk
Copy link
Contributor

jessicajaniuk commented Oct 10, 2022

This PR was merged into the repository by commit bebef5f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge PR author is ready for this to merge comp: compiler comp: 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