-
Notifications
You must be signed in to change notification settings - Fork 2.1k
refactor: Add index stylesheets to each package #5491
Conversation
The migrator uses import-only files to figure out what @use rules to generate, so this will ensure that downstream users will automatically load names from the new index files rather than the individual variables/mixins/functions files.
abhiomkar
left a comment
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.
Sent first round of review comments.
- Can you make a CL and export into PR (See http://go/mdc-web-g3sync)? You wouldn't have to do any additional changes on GitHub except exporting a CL. (Internally we've good test coverage including screenshot tests and global tests).
- Can we also update actual _mixin, _variables files to use these index files, using index files greatly improves readability of our Sass files.
Thanks!
nex3
left a comment
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.
Can you make a CL and export into PR (See http://go/mdc-web-g3sync)? You wouldn't have to do any additional changes on GitHub except exporting a CL. (Internally we've good test coverage including screenshot tests and global tests).
I tried running mdc import_pr 5491 but I got an error:
ERROR: Cannot find last imported revision. Use --force if you really want to proceed with the migration
CAUSED BY: Cannot find reference '6fb7ccb68afea5ad782e79948764ca16f1b40468'
Can we also update actual _mixin, _variables files to use these index files, using index files greatly improves readability of our Sass files.
My main goal is to unblock downstream migrations as soon as possible. I'll try to make time to circle back to this later on, but it may need to wait until @jathak is back in the office and the team has more bandwidth again.
Please use
SGTM. Thanks! |
I don't think there's currently a simple way to do this automatically, but writing one shouldn't be too challenging (since it's essentially just merging the |
This fixes a couple bugs: mdc-theme's "color-palette" variables weren't being hidden, and nested packages' files weren't updated.
|
Obsoleted by #5539 |
As discussed with @abhiomkar, this adds an
_index.scssfile to each package so that each package can be loaded with a single@userule. As a bonus, that@userule will automatically use the package's name as its namespace.Here's an example of the difference between an API using each separate files versus index files.