-
Notifications
You must be signed in to change notification settings - Fork 967
Support externally hosted comprehensive themes #2676
Support externally hosted comprehensive themes #2676
Conversation
Thanks for the pull request, @fghaas! I've created OSPR-1063 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. |
@singingwolfboy will have opinions on this. |
I am way, way in favor of the idea behind this change. We would love to move the I can't provide a thumbs-up or thumbs-down on this pull request, since I'm not familiar with the configuration repo, and I don't understand how this code works. But conceptually, this is a very, very good idea. |
@ziafazal, FYI |
@@ -83,7 +83,7 @@ | |||
- install | |||
- install:code | |||
|
|||
- name: checkout theme | |||
- name: checkout Stanford-style theme |
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.
@fghaas I'm with @singingwolfboy in that I don't have a solid understanding of the configuration aspect of the platform works. That said, I'm wondering if it's possible to change the name here to something more generic, versus "Stanford-style"?
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.
@mattdrayer The only authoritative resource on comprehensive theming that I've been able to find is https://github.com/edx/edx-platform/blob/master/themes/README.rst, and it refers to the opposite of comprehensive themes as "Stanford" theming (https://github.com/edx/edx-platform/blob/master/themes/README.rst#stanford-theming). Confusing as theming already is, I'd prefer not to invent a new term for the sole purpose of being more generic.
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.
@fghaas there's more documentation for comprehensive theming available here: http://edx.readthedocs.org/projects/edx-installing-configuring-and-running/en/latest/theming/index.html
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.
@singingwolfboy Good to know, thanks.
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.
@fghaas -- Okay, I've read thru all of the docs and I now agree that sticking with "Stanford-style" makes sense here. Can you please include a comment with the URL pointing to the related section of the README.rst and then this changeset should be good to go.
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.
@mattdrayer You mean a comment right there in the playbook YAML? Or somewhere else?
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.
Yep, I'd put it right there in the YAML file, just so people know where to look for more info when they come across that section.
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.
@mattdrayer Done.
Nice, this looks great to me now -- thanks very much @fghaas! 👍 |
Thanks @mattdrayer, do you still need to remove or add some tags so this gets merged? |
@fghaas I'm not sure who is responsible for merging changes to edx/configuration (maybe it's me!) -- @feanil or @fredsmith do you have any advice to lend? |
@fghaas - the fact that you're re-using edxapp_git_ssh means that you'll be reusing the credentials that you use for checking out edxapp. eg. if you have a private theme and a public edxapp, this won't work. You should set this as a separate variable that defaults to edxapp_git_ssh. Also, I think the EDXAPP_COMPREHENSIVE_THEME_DIR should have a more useful default, probably based on {{ edxapp_app_dir }} @edx/devops any other comments? |
@fredsmith, re |
Collectstatic failed in production when comprehensive theme contained custom css files. This change fixes that problem. 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.
@fredsmith Just letting you know that I'm still waiting for an answer here. |
@fghaas @fredsmith Re: The playbook for Stanford Theme FWIW: We use this play successfully with a public platform and private theme, setting values: EDXAPP_USE_GIT_IDENTITY: true
EDXAPP_GIT_IDENTITY: WOULDNT_YOU_LIKE_TO_KNOW |
@fredsmith @feanil what's the next step here? |
@jbarciauskas I'm hoping to do a review of this today or tomorrow but I'm on call this week so my schedule is a bit unpredictable. |
Understood, thanks! |
The old Stanford-style themes can be pulled in from an external Git repo; no such provision was previously available for comprehensive themes. * Introduce two new configuration variables: - EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO: Git repo for the comprehensive theme - EDXAPP_COMPREHENSIVE_THEME_VERSION: Git branch, tag, or revision to check out from the repo * Introduce a new task, "checkout comprehensive theme", doing the equivalent of the previously existing "checkout theme" task. Check out the theme repo to EDXAPP_COMPREHENSIVE_THEME_DIR. If EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO is unset, continue to assume that EDXAPP_COMPREHENSIVE_THEME_DIR already exists and is populated with a comprehensive theme. * Rename the "checkout theme" task to "checkout Stanford-style theme".
b4bc637
to
48fd551
Compare
Now that Dogwood is out and comprehensive theming is touted as a key feature, could this perhaps be reviewed? It's only been sitting here for a month and a half. |
👍 @fghaas sorry about that, I dropped the ball on this. It got buried in my inbox. |
Thanks @feanil, would be great to see this merged. |
I'll be merging it once the tests have finished running. |
Support externally hosted comprehensive themes
@feanil Thank you! |
The old Stanford-style themes can be pulled in from an external Git repo; no such provision was previously available for comprehensive themes.
EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO is unset, continue to assume that EDXAPP_COMPREHENSIVE_THEME_DIR already exists and is populated with a comprehensive theme.