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(compiler): maintain multiline CSS selectors during CSS scoping #55509

Closed
wants to merge 1 commit into from

Conversation

alan-agius4
Copy link
Contributor

Previously, multiline selectors were being converted into single lines, resulting in sourcemap disruptions due to shifts in line numbers.

Closes #55508

@alan-agius4 alan-agius4 marked this pull request as draft April 24, 2024 11:54
@pullapprove pullapprove bot requested a review from crisbeto April 24, 2024 11:54
@alan-agius4 alan-agius4 removed the request for review from crisbeto April 24, 2024 11:55
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release area: compiler Issues related to `ngc`, Angular's template compiler labels Apr 24, 2024
@ngbot ngbot bot added this to the Backlog milestone Apr 24, 2024
@alan-agius4 alan-agius4 added requires: TGP This PR requires a passing TGP before merging is allowed action: global presubmit The PR is in need of a google3 global presubmit and removed requires: TGP This PR requires a passing TGP before merging is allowed labels Apr 24, 2024
@alan-agius4
Copy link
Contributor Author

alan-agius4 commented Apr 24, 2024

TGP

@alan-agius4 alan-agius4 force-pushed the sm-fix branch 4 times, most recently from 933ade0 to ee07635 Compare April 24, 2024 12:59
@alan-agius4 alan-agius4 removed the action: global presubmit The PR is in need of a google3 global presubmit label Apr 24, 2024
Previously, multiline selectors were being converted into single lines, resulting in sourcemap disruptions due to shifts in line numbers.

Closes angular#55508
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Apr 25, 2024
@alan-agius4 alan-agius4 marked this pull request as ready for review April 25, 2024 09:59
@pullapprove pullapprove bot requested a review from crisbeto April 25, 2024 10:00
@@ -658,8 +658,8 @@ export class ShadowCss {

private _scopeSelector(selector: string, scopeSelector: string, hostSelector: string): string {
return selector
.split(',')
.map((part) => part.trim().split(_shadowDeepSelectors))
.split(/ ?, ?/)
Copy link
Member

Choose a reason for hiding this comment

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

Should we use \s here rather than an actual space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No otherwise the newlines will get lost which would cause the sourcemaps to break.

@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate and removed 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 labels May 3, 2024
@AndrewKushnir AndrewKushnir added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label May 3, 2024
@AndrewKushnir
Copy link
Contributor

Caretaker note: looks like this PR might have some risk in g3, will proceed with the merge on Monday, 05/06.

@AndrewKushnir
Copy link
Contributor

This PR was merged into the repository by commit 3e1d6e9.

AndrewKushnir pushed a commit that referenced this pull request May 6, 2024
…55509)

Previously, multiline selectors were being converted into single lines, resulting in sourcemap disruptions due to shifts in line numbers.

Closes #55508

PR Close #55509
@alan-agius4 alan-agius4 deleted the sm-fix branch May 6, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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: rc This PR is targeted for the next release-candidate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scss source maps mismatch in angular 16
3 participants