Refactor progress table style constants into SCSS module - #48113
Merged
maddiedierker merged 3 commits intoSep 16, 2022
Conversation
maddiedierker
changed the base branch from
staging
to
revert-48103-revert-48021-revert-48020-revert-47093-webpack-5-upgrade
September 16, 2022 16:15
maddiedierker
commented
Sep 16, 2022
| $content-view-width: $content-width - $student-list-width; | ||
|
|
||
| :export { | ||
| MAX_BODY_HEIGHT: math.div($max-height, 1px); |
Contributor
Author
There was a problem hiding this comment.
these variables need to be in a module file so that we can access them in JS
maddiedierker
commented
Sep 16, 2022
| @@ -39,12 +31,12 @@ $content-view-width: $content-width - $student-list-width; | |||
| } | |||
| .primary-row { | |||
Contributor
Author
There was a problem hiding this comment.
this file can't be a module file because some classes (like primary-row) are implemented by external libraries. in this case, we have a library that renders the progress table and applies its own classes
maddiedierker
merged commit Sep 16, 2022
54611f1
into
revert-48103-revert-48021-revert-48020-revert-47093-webpack-5-upgrade
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch will be merged into the Webpack upgrade #48105.
Prior to this fix, SCSS modules were broken with the upgrade to Webpack 5. Our Webpack configuration for modules was no longer working as expected because we had an SCSS file that was trying to behave as both global SCSS and as a module in different contexts; see #48103 for more details.
I've refactored that file into two separate files -- some global SCSS and constants stored in a module file. I initially tried to refactor everything into a module file, but there are some classes that can't be modularized because they are owned by external libraries (I've left a comment in the appropriate place to explain more).