Skip to content
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

[5/6] build: commit XModule SCSS entrypoints instead of generating them #32290

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions pavelib/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,8 @@ def get_theme_sass_dirs(system, theme_dir):
css_dir = theme_dir / system / "static" / "css"
certs_sass_dir = theme_dir / system / "static" / "certificates" / "sass"
certs_css_dir = theme_dir / system / "static" / "certificates" / "css"
xmodule_sass_folder = "modules" if system == 'lms' else "descriptors"
xmodule_sass_dir = path("common") / "static" / "xmodule" / xmodule_sass_folder / "scss"
xmodule_lookup_dir = path("xmodule") / "css"
xmodule_sass_dir = path("xmodule") / "static" / "sass" / system
xmodule_lookup_dir = path("xmodule") / "static" / "sass" / "include"

dependencies = SASS_LOOKUP_DEPENDENCIES.get(system, [])
if sass_dir.isdir():
Expand Down Expand Up @@ -238,9 +237,8 @@ def get_system_sass_dirs(system):
dirs = []
sass_dir = path(system) / "static" / "sass"
css_dir = path(system) / "static" / "css"
xmodule_sass_folder = "modules" if system == 'lms' else "descriptors"
xmodule_sass_dir = path("common") / "static" / "xmodule" / xmodule_sass_folder / "scss"
xmodule_lookup_dir = path("xmodule") / "css"
xmodule_sass_dir = path("xmodule") / "static" / "sass" / system
xmodule_lookup_dir = path("xmodule") / "static" / "sass" / "include"

dependencies = SASS_LOOKUP_DEPENDENCIES.get(system, [])
dirs.append({
Expand Down
10 changes: 0 additions & 10 deletions xmodule/annotatable_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,23 +82,13 @@ class AnnotatableBlock(
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
preview_view_css = {
'scss': [
resource_filename(__name__, 'css/annotatable/display.scss'),
],
}

studio_view_js = {
'js': [
resource_filename(__name__, 'js/src/raw/edit/xml.js'),
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
studio_view_css = {
'scss': [
resource_filename(__name__, 'css/codemirror/codemirror.scss'),
],
}
studio_js_module_name = "XMLEditingDescriptor"
mako_template = "widgets/raw-edit.html"

Expand Down
13 changes: 0 additions & 13 deletions xmodule/capa_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,26 +177,13 @@ class ProblemBlock(
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js')
}

preview_view_css = {
'scss': [
resource_filename(__name__, 'css/capa/display.scss'),
],
}

studio_view_js = {
'js': [
resource_filename(__name__, 'js/src/problem/edit.js'),
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}

studio_view_css = {
'scss': [
resource_filename(__name__, 'css/editor/edit.scss'),
resource_filename(__name__, 'css/problem/edit.scss'),
]
}

display_name = String(
display_name=_("Display Name"),
help=_("The display name for this component."),
Expand Down
6 changes: 0 additions & 6 deletions xmodule/conditional_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,13 @@ class ConditionalBlock(
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
preview_view_css = {
'scss': [],
}

mako_template = 'widgets/metadata-edit.html'
studio_js_module_name = 'SequenceDescriptor'
studio_view_js = {
'js': [resource_filename(__name__, 'js/src/sequence/edit.js')],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
studio_view_css = {
'scss': [],
}

# Map
# key: <tag attribute in xml>
Expand Down
7 changes: 0 additions & 7 deletions xmodule/html_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def studio_view(self, _context):
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
preview_view_css = {'scss': [resource_filename(__name__, 'css/html/display.scss')]}

uses_xmodule_styles_setup = True

Expand All @@ -168,12 +167,6 @@ def studio_view(self, _context):
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
studio_view_css = {
'scss': [
resource_filename(__name__, 'css/editor/edit.scss'),
resource_filename(__name__, 'css/html/edit.scss')
]
}

# VS[compat] TODO (cpennington): Delete this method once all fall 2012 course
# are being edited in the cms
Expand Down
6 changes: 0 additions & 6 deletions xmodule/library_content_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ class LibraryContentBlock(
'js': [],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
preview_view_css = {
'scss': [],
}

mako_template = 'widgets/metadata-edit.html'
studio_js_module_name = "VerticalDescriptor"
Expand All @@ -111,9 +108,6 @@ class LibraryContentBlock(
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
studio_view_css = {
'scss': [],
}

show_in_read_only_mode = True

Expand Down
8 changes: 0 additions & 8 deletions xmodule/lti_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,11 +378,6 @@ class LTIBlock(
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
preview_view_css = {
'scss': [
resource_filename(__name__, 'css/lti/lti.scss')
],
}

mako_template = 'widgets/metadata-only-edit.html'

Expand All @@ -393,9 +388,6 @@ class LTIBlock(
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
studio_view_css = {
'scss': [],
}

def studio_view(self, _context):
"""
Expand Down
9 changes: 0 additions & 9 deletions xmodule/poll_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ class PollBlock(
],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
preview_view_css = {
'scss': [
resource_filename(__name__, 'css/poll/display.scss')
],
}

# There is no studio_view() for this XBlock but this is needed to make the
# the static_content command happy.
Expand All @@ -105,10 +100,6 @@ class PollBlock(
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js')
}

studio_view_css = {
'scss': []
}

def handle_ajax(self, dispatch, data): # lint-amnesty, pylint: disable=unused-argument
"""Ajax handler.

Expand Down
10 changes: 0 additions & 10 deletions xmodule/seq_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,23 +278,13 @@ class SequenceBlock(
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js')
}

preview_view_css = {
'scss': [
resource_filename(__name__, 'css/sequence/display.scss'),
],
}

# There is no studio_view() for this XBlock but this is needed to make the
# the static_content command happy.
studio_view_js = {
'js': [],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js')
}

studio_view_css = {
'scss': []
}

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)

Expand Down
6 changes: 0 additions & 6 deletions xmodule/split_test_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,13 @@ class SplitTestBlock( # lint-amnesty, pylint: disable=abstract-method
'js': [],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
preview_view_css = {
'scss': [],
}

mako_template = "widgets/metadata-only-edit.html"
studio_js_module_name = 'SequenceDescriptor'
studio_view_js = {
'js': [resource_filename(__name__, 'js/src/sequence/edit.js')],
'xmodule_js': resource_filename(__name__, 'js/src/xmodule.js'),
}
studio_view_css = {
'scss': [],
}

@cached_property
def child_block(self):
Expand Down
4 changes: 4 additions & 0 deletions xmodule/static/sass/cms/AboutBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.xmodule_edit.xmodule_AboutBlock {
@import "editor/edit.scss";
@import "html/edit.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/cms/AnnotatableBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_edit.xmodule_AnnotatableBlock {
@import "codemirror/codemirror.scss";
}
4 changes: 4 additions & 0 deletions xmodule/static/sass/cms/CourseInfoBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.xmodule_edit.xmodule_CourseInfoBlock {
@import "editor/edit.scss";
@import "html/edit.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/cms/CustomTagBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_edit.xmodule_CustomTagBlock {
@import "codemirror/codemirror.scss";
}
4 changes: 4 additions & 0 deletions xmodule/static/sass/cms/HtmlBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.xmodule_edit.xmodule_HtmlBlock {
@import "editor/edit.scss";
@import "html/edit.scss";
}
4 changes: 4 additions & 0 deletions xmodule/static/sass/cms/ProblemBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.xmodule_edit.xmodule_ProblemBlock {
@import "editor/edit.scss";
@import "problem/edit.scss";
}
4 changes: 4 additions & 0 deletions xmodule/static/sass/cms/StaticTabBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.xmodule_edit.xmodule_StaticTabBlock {
@import "editor/edit.scss";
@import "html/edit.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/cms/VideoBlockStudio.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_edit.xmodule_VideoBlock {
@import "tabs/tabs.scss";
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/AboutBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_AboutBlock {
@import "html/display.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/AnnotatableBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_AnnotatableBlock {
@import "annotatable/display.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/CourseInfoBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_CourseInfoBlock {
@import "html/display.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/HtmlBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_HtmlBlock {
@import "html/display.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/LTIBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_LTIBlock {
@import "lti/lti.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/PollBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_PollBlock {
@import "poll/display.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/ProblemBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_ProblemBlock {
@import "capa/display.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/SequenceBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_SequenceBlock {
@import "sequence/display.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/StaticTabBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_StaticTabBlock {
@import "html/display.scss";
}
4 changes: 4 additions & 0 deletions xmodule/static/sass/lms/VideoBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.xmodule_display.xmodule_VideoBlock {
@import "video/display.scss";
@import "video/accessible_menu.scss";
}
3 changes: 3 additions & 0 deletions xmodule/static/sass/lms/WordCloudBlockPreview.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.xmodule_display.xmodule_WordCloudBlock {
@import "word_cloud/display.scss";
}
Loading