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

fix: Remove extra margin around body element #193

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Lunyachek
Copy link

This pull request proposes fixing the margin around the body element. This margin comes from the tinyMCE styles. In cases where we don't have a custom theme, and the header and footer are white, it's not noticeable (1st screenshot). However, if the header and footer have any color, it immediately stands out (2nd and 3rd screenshots). The important property is set not by chance, as without it, the styles from the tinyMCE override the styles from the index.scss file.

Снимок экрана 2024-02-19 в 17 02 09
Снимок экрана 2024-02-15 в 11 37 22
Снимок экрана 2024-02-15 в 11 38 08

@openedx-webhooks
Copy link

openedx-webhooks commented Feb 19, 2024

Thanks for the pull request, @Lunyachek!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/committers-frontend. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 19, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.06%. Comparing base (5f61578) to head (4ebd3e9).
Report is 12 commits behind head on master.

❗ Current head 4ebd3e9 differs from pull request most recent head 9885bee. Consider uploading reports for the commit 9885bee to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #193   +/-   ##
=======================================
  Coverage   83.06%   83.06%           
=======================================
  Files          46       46           
  Lines         685      685           
  Branches      132      132           
=======================================
  Hits          569      569           
  Misses        116      116           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mphilbrick211
Copy link

Hi @openedx/committers-frontend! This is ready for review, as is the backport. Thanks!

@brian-smith-tcril brian-smith-tcril self-requested a review March 29, 2024 16:06
@brian-smith-tcril
Copy link
Contributor

This issue seems to be bigger than just the margins. When inspecting I found

image

image

vs

image

image

I don't think that going through and overriding all the tinymce styles with !important is a sustainable solution, have you looked into any recommended strategies for not having tinymce styles leak out into the rest of the page?

@Lunyachek
Copy link
Author

Lunyachek commented Apr 10, 2024

I don't think that going through and overriding all the tinymce styles with !important is a sustainable solution, have you looked into any recommended strategies for not having tinymce styles leak out into the rest of the page?

You're definitely right! I looked deeper and found a solution in the MFE discussions - https://github.com/openedx/frontend-app-discussions/blob/master/src/components/TinyMCEEditor.jsx I applied the fix in the same way

Снимок экрана 2024-04-10 в 13 53 44

@mphilbrick211
Copy link

Hi @Lunyachek and @brian-smith-tcril, just checking in on this!

@mphilbrick211
Copy link

Hi @Lunyachek and @brian-smith-tcril, just checking in on this!

Friendly follow-up on this @Lunyachek @brian-smith-tcril

@brian-smith-tcril
Copy link
Contributor

I think this is likely a good solution, but I'd like to get a second opinion on using raw-loader. @arbrandes thoughts?

Context: Since my previous review this PR has been updated to follow the raw-loader pattern for loading TinyMCE styles that we are using in the discussions MFE. I'm just not sure if this is a pattern we want to continue using, or if we should be looking for a pattern we like more to apply in places we are currently using this pattern.

@mphilbrick211
Copy link

@Lunyachek @brian-smith-tcril - is this still in progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

4 participants