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

Dropping Sass support from builtin html block #35719

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

farhan
Copy link
Contributor

@farhan farhan commented Oct 24, 2024

Dropping Sass support from builtin html block

Parent story: #35300

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
Screenshots
Screenshot 2024-10-25 at 4 31 34 PM
Screenshot 2024-10-25 at 4 32 18 PM
Screenshot 2024-10-25 at 4 32 39 PM
Screenshot 2024-10-25 at 4 32 46 PM

@salman2013 salman2013 added the hacktoberfest-accepted Issue accepted for hacktoberfest participants label Oct 24, 2024
@farhan farhan added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Oct 24, 2024
@farhan farhan force-pushed the farhan/sass-to-css-html-block-2 branch from 0748893 to 9e7aeed Compare October 24, 2024 14:00
@farhan farhan marked this pull request as ready for review October 24, 2024 14:02
@farhan farhan force-pushed the farhan/sass-to-css-poll-block-2 branch from 7721307 to 1341a47 Compare October 24, 2024 14:11
@farhan farhan force-pushed the farhan/sass-to-css-html-block-2 branch from 9e7aeed to e482913 Compare October 24, 2024 14:13
@farhan farhan added create-sandbox open-craft-grove should create a sandbox environment from this PR and removed create-sandbox open-craft-grove should create a sandbox environment from this PR labels Oct 25, 2024
@farhan farhan force-pushed the farhan/sass-to-css-poll-block-2 branch from 1341a47 to cee0957 Compare October 25, 2024 13:35
@farhan farhan force-pushed the farhan/sass-to-css-html-block-2 branch from e482913 to f4b7757 Compare October 25, 2024 13:42
@farhan farhan added create-sandbox open-craft-grove should create a sandbox environment from this PR and removed create-sandbox open-craft-grove should create a sandbox environment from this PR labels Oct 25, 2024
Copy link

@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 changed the base branch from farhan/sass-to-css-poll-block-2 to master October 28, 2024 15:43
@farhan farhan force-pushed the farhan/sass-to-css-html-block-2 branch 2 times, most recently from 84662de to 3151048 Compare October 28, 2024 15:48
@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@farhan farhan added create-sandbox open-craft-grove should create a sandbox environment from this PR and removed create-sandbox open-craft-grove should create a sandbox environment from this PR labels Oct 29, 2024
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@farhan farhan force-pushed the farhan/sass-to-css-html-block-2 branch from 3151048 to 6ad6ec3 Compare October 30, 2024 06:18
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@farhan farhan merged commit 2984568 into master Oct 30, 2024
49 checks passed
@farhan farhan deleted the farhan/sass-to-css-html-block-2 branch October 30, 2024 16:23
@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
create-sandbox open-craft-grove should create a sandbox environment from this PR hacktoberfest-accepted Issue accepted for hacktoberfest participants
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants