-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
refactor(cdk/overlay): use index files for public Sass API instead of copying files out #22343
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. this is definitely better! One thing to note is that it will break if people did use something like:
@use '~@angular/cdk/_a11y.scss'
Though that is probably really uncommon (but maybe worth noting at least)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM- can you amend your commit with a breaking change message for the case of importing with the .scss
extension?
2fb0b25
to
501b78d
Compare
Done. Also resolved the merge conflicts. |
d042d62
to
ee2558c
Compare
… copying files out Currently we copy out a few of the CDK .scss files to the root of the `cdk` package so that they're more convenient to consume. The problem with this is that it prevents us from importing other Sass files, because the import path will be wrong after the files are copied (see angular#22043). These changes rename the files to `_index.scss` which will allow users to maintain the same import paths while allowing us to remove the file copying logic and not having to worry about import paths. BREAKING CHANGES: Deep imports to the following CDK .scss files need to be updated: * `@import '~@angular/cdk/overlay/overlay'` -> `@import ~@angular/cdk/overlay` * `@import '~@angular/cdk/a11y/a11y'` -> `@import ~@angular/cdk/a11y` * `@import '~@angular/cdk/text-field/text-field'` -> `@import ~@angular/cdk/text-field`
ee2558c
to
eefa8e1
Compare
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently we copy out a few of the CDK .scss files to the root of the
cdk
package so that they're more convenient to consume. The problem with this is that it prevents us from importing other Sass files, because the import path will be wrong after the files are copied (see #22043).These changes rename the files to
_index.scss
which will allow users to maintain the same import paths while allowing us to remove the file copying logic and not having to worry about import paths.Note: the commit message mentions
overlay
due to the linting rules, but this also applies toa11y
andtext-field
.BREAKING CHANGES:
Deep imports to the following CDK .scss files need to be updated:
@import '~@angular/cdk/overlay/overlay'
->@import ~@angular/cdk/overlay
@import '~@angular/cdk/a11y/a11y'
->@import ~@angular/cdk/a11y
@import '~@angular/cdk/text-field/text-field'
->@import ~@angular/cdk/text-field