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

Replace builtin block Sass with vanilla CSS #35300

Open
Tracked by #34827
kdmccormick opened this issue Aug 12, 2024 · 7 comments
Open
Tracked by #34827

Replace builtin block Sass with vanilla CSS #35300

kdmccormick opened this issue Aug 12, 2024 · 7 comments
Assignees

Comments

@kdmccormick
Copy link
Member

kdmccormick commented Aug 12, 2024

Background

Follows up from:

The goal of this task is to entirely convert the Sass in the ./xmodule/ directory into vanilla CSS which can be loaded with the standard ResourceLoader class from xblock.utils. The immediate benefit is that we can remove the xmodule Sass build steps from edx-platform. The longer-term benefit is that this will remove any Sass build concerns from the xblock extraction effort.

Tasks

  1. Ensure Sass has been compiled into uncompressed CSS (npm run compile-sass-dev).
  2. Copy all the built-in compiled XBlock CSS (lms/static/css/*Display.css and lms/static/css/*Editor.css) into xmodule/assets. Add those CSS files to version control.
  3. For each XBlock with Sass: Replace its add_sass_to_fragment call with standard usage of a xblock.utils.resources.ResourceLoader and fragment.add_css.
  4. Remove the definition of add_sass_to_fragment from xmodule.util.builtin_assets.py
  5. Remove all .scss files under xmodule/assets
  6. Remove all compile_sass_dir(...) calls in scripts/compile_sass.sh which compile Sass under xmodule/assets.
  7. Update xmodule/assets/README.rst
@farhan
Copy link
Contributor

farhan commented Aug 16, 2024

Perhaps duplicate of #35306

@kdmccormick
Copy link
Member Author

@farhan Whereas #35306 concerned converting just the variables, this issue will concern converting the entire files from .scss to .css

@kdmccormick
Copy link
Member Author

@farhan I've filled this one in. Let me know if you have any questions.

@farhan
Copy link
Contributor

farhan commented Oct 1, 2024

I have created following main epic story for per block conversion of sass to css
#35570

After shifting of all the blocks from sass to css we can pick this story and do the left over cleaning.

cc: @kdmccormick

@kdmccormick
Copy link
Member Author

Hey @farhan , could you or someone on your team:

.xmodule_display.xmodule_VideoBlock {
    /* stylelint-disable-line */
    /* stylelint-disable-line */
    /* stylelint-disable-line */
    /* stylelint-disable-line */
    /* stylelint-disable-line */
    /* stylelint-disable-line */
}

@kdmccormick
Copy link
Member Author

Finally, before extracting the CSS to the xblock-contrib repo, I'd like to take care of this task: #32617

Let me know if that's something your team has time to take on soon. If not, I can take care of it.

kdmccormick added a commit to kdmccormick/edx-platform that referenced this issue Nov 14, 2024
Since all built-in block Sass is gone, we remove two final pieces of code:

* the steps in `npm run compile-sass` which compiled `xmodule/assets`, and
* the now-unused `add_sass_to_fragment` function.

This should speed up the edx-platform assets build a little bit.
This commit also includes some minor dev doc updates.

Part of: openedx#35300
kdmccormick added a commit that referenced this issue Nov 14, 2024
Since all built-in block Sass is gone, we remove two final pieces of code:

* the steps in `npm run compile-sass` which compiled `xmodule/assets`, and
* the now-unused `add_sass_to_fragment` function.

This should speed up the edx-platform assets build a little bit.
This commit also includes some minor dev doc updates.

Part of: #35300
@farhan
Copy link
Contributor

farhan commented Nov 18, 2024

@kdmccormick Going to mark this epic done as all functionality has been implemented

@farhan farhan closed this as completed Nov 18, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Aximprovements Team Nov 18, 2024
@farhan farhan reopened this Nov 18, 2024
@feanil feanil moved this from ✅ Done to 🏗 In progress in Aximprovements Team Dec 5, 2024
@farhan farhan moved this from 🏗 In progress to ✅ Done in Aximprovements Team Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

No branches or pull requests

2 participants