-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
🎨 🐛 Improve theme lib, middleware & error handling #8145
Merged
Merged
Conversation
This file contains 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
- use loadOneTheme for init - move updateThemeList to the one place that it is used - this just reduces the surface area of the loader
- need to figure out what stuff goes in here as well as loading themes - will move it again later once I've got it figured out
- move the order in blog/app.js so that theme middleware isn't called for shared assets - add comments & cleanup in the middleware itself, for clarity
- Separate out config dependent on settings changing and config dependent on request - Move blogApp.set('views') - no reason why this isn't in the theme activation method as it's actually simpler if it is there, we already know the active theme exists & can remove the if-guard
- ensure we display a warning - don't have complex logic for handling errors - move loading of an empty hbs object into the error-handler as this will support more cases
- asset hash wasn't correctly being set on theme switch
- Previousl, we've simplified loader & improved error handling - We are now able to completely remove theme.read as it's nothing more than a wrapper for package.read - This also means we can change our tests from testing the theme reader to loader
ErisDS
changed the title
🎨 Improve theme lib, middleware & error handling
🎨 🐛 Improve theme lib, middleware & error handling
Mar 13, 2017
kirrg001
reviewed
Mar 13, 2017
@@ -69,7 +69,7 @@ themeHandler = { | |||
}); | |||
|
|||
// reset the asset hash | |||
config.assetHash = null; | |||
config.set('assetHash', null); |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
kirrg001
approved these changes
Mar 13, 2017
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 👍
I made a quick test, the basic functionality works.
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 PR is groundwork, bug fixes, improved error handling and steps towards a better API:
Next up: new concept of theme activating vs mounting