Skip to content

Conversation

@Lunyachek
Copy link
Contributor

@Lunyachek Lunyachek commented Mar 6, 2025

Description

Previously, the mixin @include left(-9999em); was used to set left: -9999em or right: -9999em depending on the text direction (LTR/RTL). However, using right: -9999em in RTL mode caused the body to expand, leading to an unwanted horizontal scroll.

This PR replaces the mixin with a fixed left: -9999em for both LTR and RTL, ensuring elements are correctly hidden without affecting the page width.

Additionally, z-index: 1 has been added to ensure that hint tooltips appear above their parent label elements

2025-03-06.14.52.10.mov
Снимок экрана 2025-03-06 в 14 53 51

Changes

  • Replaced @include left(-9999em); with left: -9999em for both LTR and RTL.
  • Removed the possibility of using right: -9999em to prevent horizontal scrolling issues.
  • Added z-index: 1 to ensure hint tooltips are displayed above their parent label elements.

Reason for Changes

  • Using right: -9999em in RTL mode caused the body to expand, resulting in an unnecessary horizontal scroll. Setting left: -9999em ensures proper element hiding without side effects.
  • Hint tooltips were sometimes rendered behind their parent label elements. Adding z-index: 1 ensures they appear on top

Testing

  • Verified in both LTR and RTL modes.
  • Horizontal scroll no longer appears.
  • Elements remain hidden without affecting body width.
  • Hint tooltips are now properly displayed above their parent labels.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 6, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @Lunyachek!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are 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.


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.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Mar 6, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Mar 6, 2025
@mphilbrick211 mphilbrick211 added the needs reviewer assigned PR needs to be (re-)assigned a new reviewer label Mar 6, 2025
@Lunyachek Lunyachek force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch from b307741 to a7d40a4 Compare March 11, 2025 21:58
@Lunyachek Lunyachek force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch from a7d40a4 to 3f7e519 Compare March 31, 2025 20:46
@Lunyachek Lunyachek force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch from 3f7e519 to dff2031 Compare April 30, 2025 16:17
@Lunyachek Lunyachek force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch from dff2031 to f169e1a Compare May 30, 2025 15:45
@sarina
Copy link
Contributor

sarina commented Jun 26, 2025

Hi @brian-smith-tcril this is one of our top 10 oldest PRs. Do you think you could fit it into your review queue?

@ihor-romaniuk ihor-romaniuk force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch from f169e1a to e0fb810 Compare July 1, 2025 10:37
Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

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

Thanks @Lunyachek

I've just found this PR in an email.

First, it's better than before and I recommend merging it after someone else builds it locally and verify it's not broking other things.

I have done a lot of RTL fixes and the code sounds like a good one. Many thanks for addressing this issue. So I recommend merging it after a second review.

I've left few notes and comments, please check them and let me know what do you think.

I can't test locally as it'll take me a couple of hours to refresh my dev environment.


@include left(-9999em);

left: -9999em;
Copy link
Member

Choose a reason for hiding this comment

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

Forgive my late question, why not display: none?

left: -9999em; seems like a bad way to hide an element and could cause other sort of nasty bugs.

Check the todo below:

/* ***
     * Ideally we want to handle functionality with JS.
     * This functionality should eventually be moved into CS/JS, and out of here. */
    .has-hint:hover > .hint {
      @include left($baseline*10);
    }

If we're hardcoding left here. How it would play with @include left($baseline*10);?

In its current form it looks a bit oddly placed in Arabic, what's the placement in English look like in a screenshot?

image

Copy link
Contributor Author

@Lunyachek Lunyachek Jul 2, 2025

Choose a reason for hiding this comment

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

Hello @OmarIthawi! I have no objections - changed to display none

@Lunyachek Lunyachek force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch 2 times, most recently from dbbb205 to 0f56eab Compare July 2, 2025 17:04
}

.has-hint:hover > .hint,
.has-hint input:focus ~ .hint {
Copy link
Member

Choose a reason for hiding this comment

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

We need display block here, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

@Lunyachek can you address this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@OmarIthawi Yes, you’re absolutely right. I’ve added display: block

@mphilbrick211
Copy link

@Lunyachek - just checking to see if this is still in progress?

@Lunyachek Lunyachek force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch from f151f48 to ee94049 Compare October 1, 2025 17:14
Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

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

Thanks a lot @Lunyachek. It's been a huge while. Please squash so @sarina or someone else can merge.

@sarina
Copy link
Contributor

sarina commented Oct 7, 2025

@arbrandes or @brian-smith-tcril could you give this a once-over?

@brian-smith-tcril brian-smith-tcril added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Oct 8, 2025
@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

@open-craft-grove
Copy link

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

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

LGTM!

I'm curious about the choice to not use display: none in the first place, but I'm glad to see it cleaned up.

I had a bit of trouble testing RTL on the sandbox (some pages seemed to fully display as RTL, and the html showed dir="rtl" but not everything appeared as RTL), so I can't fully confirm the fix, but everything seems to work as expected in LTR and the code looks great!

@mphilbrick211 mphilbrick211 removed the needs reviewer assigned PR needs to be (re-)assigned a new reviewer label Oct 8, 2025
@mphilbrick211 mphilbrick211 moved this from Ready for Review to Ready to Merge in Contributions Oct 8, 2025
@Lunyachek Lunyachek force-pushed the lunyachek/fix/instructor-rtl-remove-horizontal-scroll branch from ee94049 to 139f5f7 Compare November 19, 2025 10:22
@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

@feanil feanil self-assigned this Nov 19, 2025
@open-craft-grove
Copy link

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

@feanil feanil merged commit 539bb7d into openedx:master Nov 20, 2025
49 checks passed
@github-project-automation github-project-automation bot moved this from Ready to Merge to Done in Contributions Nov 20, 2025
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 open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

8 participants