Skip to content

fix(compiler): exclude empty styles from emitted metadata#45459

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:31191/compiler-empty-styles
Closed

fix(compiler): exclude empty styles from emitted metadata#45459
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:31191/compiler-empty-styles

Conversation

@crisbeto
Copy link
Member

Excludes styles that resolve to empty strings from the emitted metadata so that they don't result in empty <style> tags at runtime.

Fixes #31191.

@crisbeto crisbeto force-pushed the 31191/compiler-empty-styles branch 3 times, most recently from 013b289 to 03036a3 Compare March 28, 2022 15:42
@crisbeto crisbeto marked this pull request as ready for review March 28, 2022 16:33
@pullapprove pullapprove bot requested a review from atscott March 28, 2022 16:33
@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release area: compiler Issues related to `ngc`, Angular's template compiler labels Mar 28, 2022
@ngbot ngbot bot modified the milestone: Backlog Mar 28, 2022
atscott
atscott previously approved these changes Mar 28, 2022
Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

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

reviewed-for: size-tracking

@pullapprove pullapprove bot requested a review from jelbourn March 28, 2022 16:52
jessicajaniuk
jessicajaniuk previously approved these changes Mar 28, 2022
Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

reviewed-for: size-tracking

@crisbeto crisbeto force-pushed the 31191/compiler-empty-styles branch 3 times, most recently from 6a165eb to d96b413 Compare March 29, 2022 04:16
@crisbeto crisbeto force-pushed the 31191/compiler-empty-styles branch 6 times, most recently from a3db212 to b017ff8 Compare March 29, 2022 07:06
@crisbeto crisbeto force-pushed the 31191/compiler-empty-styles branch from b017ff8 to 7fef191 Compare April 22, 2022 12:58
alxhub
alxhub previously approved these changes Apr 22, 2022
@dylhunn dylhunn dismissed stale reviews from jessicajaniuk and atscott via 7fef191 May 2, 2022 18:42
@crisbeto crisbeto force-pushed the 31191/compiler-empty-styles branch from 7fef191 to fac358e Compare May 3, 2022 07:16
Excludes styles that resolve to empty strings from the emitted metadata so that they don't result in empty `<style>` tags at runtime.

Fixes angular#31191.
@crisbeto crisbeto force-pushed the 31191/compiler-empty-styles branch from fac358e to 07ee054 Compare May 3, 2022 07:40
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels May 3, 2022
@crisbeto
Copy link
Member Author

crisbeto commented May 3, 2022

Merge assistance: this had all the necessary approvals, but they were reset after I rebased. I also had to change one of the size check files, because the size was reduced slightly.

Copy link
Contributor

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: global-approvers

@dylhunn dylhunn added target: minor This PR is targeted for the next minor release and removed target: patch This PR is targeted for the next patch release labels May 3, 2022
@dylhunn
Copy link
Contributor

dylhunn commented May 3, 2022

This PR was merged into the repository by commit bb8d709.

@dylhunn
Copy link
Contributor

dylhunn commented May 3, 2022

Due to conflicts with 13.3.x, I only merged this into main. Let me know if you want to do a patch port!

@dylhunn dylhunn closed this in bb8d709 May 3, 2022
@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 Jun 3, 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 merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty style tag when one or more components don't have styles

7 participants