diff --git a/cms/envs/common.py b/cms/envs/common.py index eb4ca9fed6..85307f775d 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -1363,6 +1363,8 @@ XBLOCK_SETTINGS = { } } +STUDIO_FRONTEND_CONTAINER_URL = None + ################################ Settings for Credit Course Requirements ################################ # Initial delay used for retrying tasks. # Additional retries use longer delays. diff --git a/cms/templates/accessibility.html b/cms/templates/accessibility.html index ce495876d5..29c551a99f 100644 --- a/cms/templates/accessibility.html +++ b/cms/templates/accessibility.html @@ -12,13 +12,20 @@ <%namespace name='static' file='static_content.html'/> +<%block name="header_extras"> + % if not settings.STUDIO_FRONTEND_CONTAINER_URL: + + + % endif + + <%block name="content">
-
- <%static:studiofrontend page="AccessibilityPage"> +
+ <%static:studiofrontend entry="accessibilityPolicy"> { "lang": "${language_code | n, js_escaped_string}", } diff --git a/cms/templates/asset_index.html b/cms/templates/asset_index.html index a810e35ee5..c00ee46579 100644 --- a/cms/templates/asset_index.html +++ b/cms/templates/asset_index.html @@ -13,25 +13,32 @@ <%namespace name='static' file='static_content.html'/> <%block name="header_extras"> - % for template_name in ["asset"]: - - % endfor + % if waffle_flag_enabled: + % if not settings.STUDIO_FRONTEND_CONTAINER_URL: + + + % endif + % else: + % for template_name in ["asset"]: + + % endfor + % endif -% if not waffle_flag_enabled: <%block name="requirejs"> - require(["js/factories/asset_index"], function (AssetIndexFactory) { - AssetIndexFactory({ - assetCallbackUrl: "${asset_callback_url|n, js_escaped_string}", - uploadChunkSizeInMBs: ${chunk_size_in_mbs|n, dump_js_escaped_json}, - maxFileSizeInMBs: ${max_file_size_in_mbs|n, dump_js_escaped_json}, - maxFileSizeRedirectUrl: "${max_file_size_redirect_url|n, js_escaped_string}" - }); - }); + % if not waffle_flag_enabled: + require(["js/factories/asset_index"], function (AssetIndexFactory) { + AssetIndexFactory({ + assetCallbackUrl: "${asset_callback_url|n, js_escaped_string}", + uploadChunkSizeInMBs: ${chunk_size_in_mbs|n, dump_js_escaped_json}, + maxFileSizeInMBs: ${max_file_size_in_mbs|n, dump_js_escaped_json}, + maxFileSizeRedirectUrl: "${max_file_size_redirect_url|n, js_escaped_string}" + }); + }); + % endif -% endif <%block name="content"> @@ -58,7 +65,7 @@
<%static:optional_include_mako file="asset_index_content_header.html" /> % if waffle_flag_enabled: - <%static:studiofrontend page="AssetsPage"> + <%static:studiofrontend entry="assets"> { "lang": "${language_code | n, js_escaped_string}", "course": { @@ -78,9 +85,6 @@ } } -
-

${_("Loading")}

-
% else:
diff --git a/common/djangoapps/pipeline_mako/templates/static_content.html b/common/djangoapps/pipeline_mako/templates/static_content.html index 170dbde87b..3e48b16cf5 100644 --- a/common/djangoapps/pipeline_mako/templates/static_content.html +++ b/common/djangoapps/pipeline_mako/templates/static_content.html @@ -89,7 +89,7 @@ engine = Engine(dirs=settings.DEFAULT_TEMPLATE_ENGINE['DIRS']) source, template_path = Loader(engine).load_template_source(path) %>${source | n, decode.utf8} -<%def name="studiofrontend(page)"> +<%def name="studiofrontend(entry)"> <%doc> Loads a studio-frontend page, with the necessary context. Context is expected as a dictionary in the body of this tag. @@ -105,8 +105,14 @@ source, template_path = Loader(engine).load_template_source(path) -
- ${HTML(render_bundle(page))} +
+ % if settings.STUDIO_FRONTEND_CONTAINER_URL: + + % else: + + + + % endif <%def name="webpack(entry, extension=None, config='DEFAULT', attrs='')"> diff --git a/lms/static/js/accessible_components/StatusBarAlert.jsx b/lms/static/js/accessible_components/StatusBarAlert.jsx index 649ef5422b..6d974fb7d4 100644 --- a/lms/static/js/accessible_components/StatusBarAlert.jsx +++ b/lms/static/js/accessible_components/StatusBarAlert.jsx @@ -4,7 +4,7 @@ Wrapper for React/Paragon accessible status bar import React from 'react'; import ReactDOM from 'react-dom'; -import StatusAlert from '@edx/paragon/src/StatusAlert/index.jsx'; +import { StatusAlert } from '@edx/paragon/static'; export class StatusAlertRenderer { constructor(message, selector, afterselector) { diff --git a/lms/templates/wiki/base.html b/lms/templates/wiki/base.html index ec344b6c20..66ef9aeb73 100644 --- a/lms/templates/wiki/base.html +++ b/lms/templates/wiki/base.html @@ -13,6 +13,8 @@ {% stylesheet 'style-course-vendor' %} {% stylesheet 'style-course' %} + +