From abc6461f36269ce071b4597a69e476f3b4c1d8f6 Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Fri, 11 Aug 2023 08:33:19 +0200 Subject: [PATCH 1/2] MOBILE-4372 course-format: Change user tour alignment in RTL --- .../features/course/components/course-format/course-format.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/features/course/components/course-format/course-format.ts b/src/core/features/course/components/course-format/course-format.ts index 381c6040a..529fd0189 100644 --- a/src/core/features/course/components/course-format/course-format.ts +++ b/src/core/features/course/components/course-format/course-format.ts @@ -51,6 +51,7 @@ import { CoreCourseCourseIndexTourComponent } from '../course-index-tour/course- import { CoreDom } from '@singletons/dom'; import { CoreUserTourDirectiveOptions } from '@directives/user-tour'; import { CoreAnalytics, CoreAnalyticsEventType } from '@services/analytics'; +import { CorePlatform } from '@services/platform'; /** * Component to display course contents using a certain format. If the format isn't found, use default one. @@ -93,7 +94,7 @@ export class CoreCourseFormatComponent implements OnInit, OnChanges, OnDestroy { id: 'course-index', component: CoreCourseCourseIndexTourComponent, side: CoreUserToursSide.Top, - alignment: CoreUserToursAlignment.End, + alignment: CorePlatform.isRTL ? CoreUserToursAlignment.Start : CoreUserToursAlignment.End, getFocusedElement: nativeButton => { const innerButton = Array.from(nativeButton.shadowRoot?.children ?? []).find(child => child.tagName === 'BUTTON'); From 33bece4e262bd6650d4635b4be1d9e5dd1816a25 Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Fri, 11 Aug 2023 09:44:24 +0200 Subject: [PATCH 2/2] MOBILE-4372 theme: Remove modal lateral margin in RTL --- src/theme/theme.base.scss | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 1e735cc38..9a501ad6a 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -699,8 +699,6 @@ body.core-iframe-fullscreen ion-router-outlet { --ion-safe-area-right: 0px; .modal-wrapper { - @include margin-horizontal(var(--modal-lateral-margin), null); - position: absolute; @include position(0 !important, 0 !important, 0 !important, unset !important); display: block; @@ -719,6 +717,14 @@ body.core-iframe-fullscreen ion-router-outlet { } } +html:not([dir="rtl"]) { + .core-modal-lateral { + .modal-wrapper { + @include margin-horizontal(var(--modal-lateral-margin), null); + } + } +} + .core-modal-transparent-no-filter { @extend .core-modal-transparent; ion-backdrop {