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

chore: Append context menu to the app wrapper element instead to support RTL. #10331

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

coolayatuvxtech
Copy link

Using the ContextMenu.vue component does not work with RTL support, since dir="rtl" attribute is being appended to the <div class="app-wrapper...> element, not in the .

Description

This PR addresses an issue with the ContextMenu.vue component, where RTL (Right-to-Left) support was not working as expected. Previously, the dir="rtl" attribute was being appended to the <div class="app-wrapper...> element instead of the <body> element. The fix involved appending the context menu to the <div class="app-wrapper...> element to ensure proper RTL rendering.

Fixes # (issue number here)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

The fix was tested by:

  • Appending the context menu to the <div class="app-wrapper...> element and verifying that RTL support works as expected.
  • Ensuring the context menu behaves correctly in both RTL and LTR modes.
  • Manually testing the behavior across various browsers and devices to ensure proper alignment and functionality of the context menu.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Using the ContextMenu.vue component does not work with RTL support, since dir="rtl" attribute is being appended to the <div class="app-wrapper...> element, not in the <body>.
@coolayatuvxtech coolayatuvxtech changed the title Append context menu to the app wrapper element instead to support RTL. chore: Append context menu to the app wrapper element instead to support RTL. Oct 21, 2024
@coolayatuvxtech coolayatuvxtech changed the title chore: Append context menu to the app wrapper element instead to support RTL. fix: Append context menu to the app wrapper element instead to support RTL. Oct 21, 2024
@coolayatuvxtech coolayatuvxtech changed the title fix: Append context menu to the app wrapper element instead to support RTL. chore: Append context menu to the app wrapper element instead to support RTL. Oct 21, 2024
@scmmishra scmmishra self-requested a review October 22, 2024 03:18
Copy link
Member

@scmmishra scmmishra left a comment

Choose a reason for hiding this comment

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

Hey @coolayatuvxtech thanks for the contribution and apologies it took a while to get the review.

Moving this to the .app-wrapper can have unintended effects on the layout. You could refer to components-next/dialog component, there we solve this by adding the dir to this component directly

const isRTL = useMapGetter('accounts/isRTL');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants