feat(styles): adjust webpack config to manually load pf stylesheets #49
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 PR improves developers experience around working with patternfly in development mode. Previously, there were so many inline style tags that understanding what styles are applied and where they are coming from was a real pain. This PR applies a
null-loader
for any styles coming from@patternfly/react-styles/css/*
, and instead manually loads required styles via standard import statements. This drastically reduces the number of inline style tags a developer needs to wade through when reasoning about styles loaded an the application.One issue I've noticed is that jest isn't happy about these changes, and throws the following error when running the test suite. Probably needs an adjustment to
moduleNameMapper
in the jest config, but I haven't figured this bit out yet.I'm not sure we actually want to merge this work into master, maybe an example branch accompanied by a wiki entry would be better? I personally prefer this as the default experience, because it's clean and there are less "surprises" to come across when building a UI, but would definitely like to get some others input on this.
#47
null load styles automatically injected from react-styles
fix typo in readme
update patternfly deps
use a landmark region
manually load required styesheets