Remove ThemingAware storage mixins and ComprehensiveThemeFinder - #11319
Conversation
|
Thanks for the pull request, @mtyaka! I've created OSPR-1086 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here. |
|
@mattdrayer will be the engineer on this. |
|
I would have thought themable microsites are on the close horizon, and we would rather not discard work that would help with it, but @mattdrayer knows more. |
|
@mtyaka -- @nedbat is correct that we are very close to combining microsites to yield dynamic per-request theming. We have not yet defined the specific approach to accomplish this outcome, however -- our work so far has been to hide all of the existing branding/theming implementations behind comprehensive theming and eliminate redundancies where possible. After this consolidation work is complete we will move to multi-site which we hope to begin within the next two weeks. So with that said, I'm not sure we want to remove these classes now if we are going to need them back in short order -- thoughts? |
|
@ziafazal @saleem-latif FYI on this PR |
|
@mattdrayer @nedbat I can change the patch to not remove the actual files where the classes are defined, and just remove them from configuration and from |
|
👍 I have verified existence of the error, and that this PR solves it. After checking out this PR comprehensive themes work on my local full-stack. |
|
@mtyaka that sounds good to me -- thanks! |
Collectstatic failed in production when comprehensive theme contained custom css files. This patch fixes that problem by removing ComprehensiveThemeFinder from STATICFILES_FINDERS and ComprehensiveThemingAware mixin from STATICFILES_STORAGE. Comprehensive theme static dirs are added to the top of the STATICFILES_DIRS entry, which means that the default django FilesystemFinder will find theme static files, and since the theme folder is at the top of STATICFILES_DIRS, theme files will take precedence over default LMS/CMS static files. This change means that theme static file URLs are no longer prefixed with themes/<theme-name>/, but since we currently only support one comprehensive theme at a time, that shouldn't be a problem. If/when we want to make the choice of a theme dynamic per-request (microsites?), we will have to bring custom theme finders and storage mixins back, but for now, we don't need them.
a0eeab3 to
266f593
Compare
|
@mattdrayer @nedbat I changed the patch so that ComprehensiveTheme finders/storage mixins are only removed from the configuration. The actual files where the classes are defined are kept in the repository. |
|
Thanks @mtyaka -- 👍 -- @saleem-latif @ziafazal if you can confirm that we're good to go with this PR that would be great. |
|
LGTM 👍 |
|
👍 for me as well -- GTG @mtyaka |
|
Thanks! |
…finders Remove ThemingAware storage mixins and ComprehensiveThemeFinder
|
@mtyaka @mattdrayer @jbzdak Can one of you verify this PR on staging when you have a chance, as we plan on pushing to production at 11am EST on Tuesday: https://openedx.atlassian.net/wiki/display/ENG/2016-02-09+Release |
|
@andy-armstrong @mattdrayer @jbzdak I'm on it. |
Any update on combining microsites with the comprehensive theming? |
|
@natea, yes! This work is currently in progress -- I will tag you on a PR momentarily |
Collectstatic failed in production when comprehensive theme contained custom css files.
This patch fixes that problem by removing
ComprehensiveThemeFinderfromSTATICFILES_FINDERSandComprehensiveThemingAwaremixin fromSTATICFILES_STORAGE.Comprehensive theme static dirs are added to the top of the
STATICFILES_DIRSentry, which means that the default djangoFilesystemFinderwill find theme static files, and since the theme folder is at the top ofSTATICFILES_DIRS, theme files will take precedence over default LMS/CMS static files.This change means that theme static file URLs are no longer prefixed with
'themes/<theme-name>/', but since we currently only support one comprehensive theme at a time, that shouldn't be a problem.If/when we want to make the choice of a theme dynamic per-request (comprehensive theming for microsites?), we will have to bring custom theme finders and storage mixins back, but for now, it looks like we don't need them.
Prior discussion: https://groups.google.com/forum/#!topic/edx-code/ixHe-CvE1AQ
Partner information: 3rd party-hosted open edX instance
JIRA ticket: https://openedx.atlassian.net/browse/OSPR-1086
Sandbox URLs: TBD
Settings