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

feat! Dropping Sass support from builtin LTI block #35603

Conversation

ttqureshi
Copy link

@ttqureshi ttqureshi commented Oct 7, 2024

Dropping Sass Support from Built-in LTI Block

Tickets: #35570

Tasks:

  • Convert Sass variable into css variables
  • Compile the css files of the block following below steps.
    • Change this line to the following to avoid adding comments in the compiled css files. This change is only for compilation, revert it when done with compilation.
      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) 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 lti_block.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

  • 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

image image image image

Copy link
Contributor

@farhan farhan left a comment

Choose a reason for hiding this comment

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

PR seems great to me.
Good work 🌟

xmodule/static/css-builtin-blocks/LTIBlockDisplay.css Outdated Show resolved Hide resolved
Copy link
Contributor

@farhan farhan left a comment

Choose a reason for hiding this comment

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

requested a change

@ttqureshi ttqureshi requested a review from farhan October 9, 2024 06:58
@farhan farhan added the hacktoberfest-accepted Issue accepted for hacktoberfest participants label Oct 11, 2024
@farhan farhan force-pushed the farhan/sass-to-css-video-block branch 4 times, most recently from d280339 to 7558ad4 Compare October 16, 2024 10:24
@farhan farhan force-pushed the farhan/sass-to-css-video-block branch 2 times, most recently from 8f58637 to 7764e47 Compare October 23, 2024 13:40
@farhan farhan deleted the branch openedx:farhan/sass-to-css-video-block October 24, 2024 07:50
@farhan farhan closed this Oct 24, 2024
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants