Fix import order of Bootstrap and our CSS#116
Merged
Conversation
dsmmcken
reviewed
Jul 16, 2021
| "clean:modules": "lerna clean --yes", | ||
| "clean": "npm run clean:build && npm run clean:modules", | ||
| "bootstrap": "lerna bootstrap --hoist -- --no-audit --prefer-offline", | ||
| "bootstrap": "lerna bootstrap --hoist --nohoist=bootstrap -- --no-audit --prefer-offline", |
Contributor
There was a problem hiding this comment.
what's the purpose of this?
Collaborator
Author
There was a problem hiding this comment.
custom.scss imports from the Bootstrap version in node_modules. Since we're shipping that scss file to enterprise without compiling it, it still needs to be able to import Bootstrap. Sass has no real module resolution, so in OSS the import would be 3 or 4 levels up, but in enterprise it would be just 2 levels up if bootstrap were also installed to enterprise.
Nohoist emulates the package structure (with regular dependencies) when installed via npm. So importing ../node_modules/boostrap/... will work in OSS and enterprise as both will have bootstrap in the components node_modules folder
dsmmcken
approved these changes
Jul 16, 2021
Merged
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.
Fixes #102
This should ensure that bootstrap's classes are always included earlier than all of our CSS in both OSS and Enterprise.
This is the OSS part of the enterprise fix. The bug occurs in enterprise when using a production build.
To test locally, copy the
packages/componentsfolder into enterprise atnode_modules/@deephaven/components. Symlinking won't work properly. Then do a build and use something likeserve -s build -l 3000(npm module) to test the production version of enterprise.The CSS should be correct. Easy one to find is the table menu buttons are way too big if the import order is wrong.