Skip to content

Conversation

@farhan
Copy link
Contributor

@farhan farhan commented Oct 24, 2024

Dropping Sass support from builtin annotatable block

Tickets: #35570

Tasks:

  • Convert Sass variable into css variables

  • Compile the css file of the block following given steps.

    • Change this line to the following to avoid adding comments in the compiled css files
           source_comments: int = SASS_COMMENTS_NONE
    • Compile the sass to uncompressed CSS using following command
            npm run compile-sass-dev
    • Copy the compiled XBlock linked CSS (lms/static/css/*Display.css and lms/static/css/*Editor.css) into xmodule/static/css-builtin-blocks.
    • Format the CSS files using the editor.
    • Add those CSS files to version control.
  • Replace add_sass_to_fragment to add_css_to_fragment in blocks .py file

  • Remove all .scss files linked to the block under xmodule/assets.

    • Make sure to remove the .scss file in a separate alone commit so reviewer could review scss changes and they stay in history.
    • Don't remove the scss file if its linked to some other block.

Testing Notes:

  • Run npm run build to run webpack and compile sass files.
  • Run ./manage.py lms collectstatic in lms shell to re-collect static files.
  • Run ./manage.py cms collectstatic in cms shell to re-collect static files.
  • Verify the block's compiled css and the css global variables in the LMS
  • Verify the block's compiled css and the css global variables in the Studio
  • Test the XBlock rendering and User Experience in LMS
  • Test the XBlock rendering and User Experience in Studio

Reference PR:

Here is initial reference PR [Some the changes are only 1 time changes so don't need them in next block PR's.]

Screenshots
screencapture-apps-local-openedx-io-2000-learning-course-course-v1-edx-5-5-block-v1-edx-5-5-type-sequential-block-38919c50f1584339aa5b351ab859248f-block-v1-edx-5-5-type-vertical-block-9d0459731b744371b8da11cff5c68e38-2024-10-25-18_14_55
screencapture-studio-local-openedx-io-8001-container-block-v1-edx-5-5-type-vertical-block-9d0459731b744371b8da11cff5c68e38-2024-10-25-18_15_00
Screenshot 2024-10-25 at 6 16 03 PM
Screenshot 2024-10-25 at 6 16 11 PM

@farhan farhan force-pushed the farhan/sass-to-css-annotatable-block-2 branch from d6d57ff to b3f2f93 Compare October 24, 2024 10:46
@farhan farhan added the hacktoberfest-accepted Issue accepted for hacktoberfest participants label Oct 24, 2024
@farhan farhan marked this pull request as ready for review October 24, 2024 14:01
Copy link
Member

@ttqureshi ttqureshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 🚀

@farhan farhan merged commit 1283fdd into master Oct 28, 2024
@farhan farhan deleted the farhan/sass-to-css-annotatable-block-2 branch October 28, 2024 15:22
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hacktoberfest-accepted Issue accepted for hacktoberfest participants

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants