From 59cf068936cd0ca9a604d2afdbd02e74e6d0ffa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 25 May 2021 17:02:05 +0200 Subject: [PATCH 1/6] MOBILE-3320 comments: Fix add comments check --- src/core/features/comments/pages/viewer/viewer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/features/comments/pages/viewer/viewer.html b/src/core/features/comments/pages/viewer/viewer.html index 6248c094e..ada1872c0 100644 --- a/src/core/features/comments/pages/viewer/viewer.html +++ b/src/core/features/comments/pages/viewer/viewer.html @@ -119,7 +119,7 @@ - + From 676d4f3edf96164a9d57b8cc96eaf304dd670b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 26 May 2021 09:51:12 +0200 Subject: [PATCH 2/6] MOBILE-3320 tabs: Fix tab arrow icon color --- .../messages/pages/contacts/contacts.page.ts | 1 - src/addons/messages/pages/contacts/tabs.scss | 48 ------------------- src/core/components/tabs/tabs.scss | 2 +- .../features/mainmenu/pages/menu/menu.html | 2 +- src/theme/theme.light.scss | 2 +- 5 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 src/addons/messages/pages/contacts/tabs.scss diff --git a/src/addons/messages/pages/contacts/contacts.page.ts b/src/addons/messages/pages/contacts/contacts.page.ts index 473820dd8..80f49d224 100644 --- a/src/addons/messages/pages/contacts/contacts.page.ts +++ b/src/addons/messages/pages/contacts/contacts.page.ts @@ -32,7 +32,6 @@ import { IonRefresher } from '@ionic/angular'; selector: 'page-addon-messages-contacts', templateUrl: 'contacts.html', styleUrls: [ - 'tabs.scss', '../../messages-common.scss', ], }) diff --git a/src/addons/messages/pages/contacts/tabs.scss b/src/addons/messages/pages/contacts/tabs.scss deleted file mode 100644 index 8bb0948a5..000000000 --- a/src/addons/messages/pages/contacts/tabs.scss +++ /dev/null @@ -1,48 +0,0 @@ -:host { - ion-tab-bar.core-tabs-bar { - position: relative; - width: 100%; - background: var(--core-tabs-background); - color: var(--core-tab-color); - -webkit-filter: drop-shadow(0px 3px 3px rgba(var(--drop-shadow))); - filter: drop-shadow(0px 3px 3px rgba(var(--drop-shadow))); - border: 0; - - ion-row { - width: 100%; - } - - .tab-slide { - border-bottom: 2px solid transparent; - min-width: 100px; - min-height: 56px; - cursor: pointer; - overflow: hidden; - display: flex; - align-items: center; - justify-content: center; - padding: 0; - margin-bottom: 1px; - - ion-label { - font-size: 16px; - font-weight: 400; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - word-wrap: break-word; - max-width: 100%; - line-height: 1.2em; - margin: 16px auto; - } - - &[aria-selected=true] { - color: var(--core-tab-border-color-active); - border-bottom-color: var(--core-tab-color-active); - ion-tab-button { - color: var(--core-tab-border-color-active); - } - } - } - } -} diff --git a/src/core/components/tabs/tabs.scss b/src/core/components/tabs/tabs.scss index 3c4a05405..8bc9d4b3e 100644 --- a/src/core/components/tabs/tabs.scss +++ b/src/core/components/tabs/tabs.scss @@ -1,6 +1,6 @@ :host { --tabs-background: var(--core-tabs-background); - --tabs-color: var(--color); + --tabs-color: var(--core-tab-color); --height: 56px; height: 100%; display: block; diff --git a/src/core/features/mainmenu/pages/menu/menu.html b/src/core/features/mainmenu/pages/menu/menu.html index ba8099d71..a22ffd18d 100644 --- a/src/core/features/mainmenu/pages/menu/menu.html +++ b/src/core/features/mainmenu/pages/menu/menu.html @@ -1,6 +1,6 @@ - + Date: Wed, 26 May 2021 10:33:34 +0200 Subject: [PATCH 3/6] MOBILE-3320 course: Position and style section nav buttons --- .../components/format/core-course-format.html | 13 +++++++------ .../features/course/components/format/format.scss | 12 ++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/core/features/course/components/format/core-course-format.html b/src/core/features/course/components/format/core-course-format.html index 223fe9458..6aa6ce2f8 100644 --- a/src/core/features/course/components/format/core-course-format.html +++ b/src/core/features/course/components/format/core-course-format.html @@ -93,18 +93,19 @@ - + - - - - + + diff --git a/src/core/features/course/components/format/format.scss b/src/core/features/course/components/format/format.scss index 0c0b7aca9..3e556b5d2 100644 --- a/src/core/features/course/components/format/format.scss +++ b/src/core/features/course/components/format/format.scss @@ -58,4 +58,16 @@ } } + .core-course-section-nav-buttons { + display: flex; + justify-content: flex-end; + + core-format-text { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + text-transform: none; + } + } + } From fa67fbef810453ea53676da6b44a44aecf2a0977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 26 May 2021 10:54:47 +0200 Subject: [PATCH 4/6] MOBILE-3320 login: Align username and password on reconnect page --- src/core/features/login/login.scss | 1 + src/core/features/login/pages/credentials/credentials.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/features/login/login.scss b/src/core/features/login/login.scss index 1f4c1782a..f3f652d1c 100644 --- a/src/core/features/login/login.scss +++ b/src/core/features/login/login.scss @@ -36,6 +36,7 @@ form .core-username.item p { font-size: 16px; + @include padding-horizontal(8px, null); } .core-login-site-logo img { diff --git a/src/core/features/login/pages/credentials/credentials.html b/src/core/features/login/pages/credentials/credentials.html index 26230ae7d..6ca872e41 100644 --- a/src/core/features/login/pages/credentials/credentials.html +++ b/src/core/features/login/pages/credentials/credentials.html @@ -91,7 +91,7 @@

- + {{ 'core.login.startsignup' | translate }} From 877c79ed5afb35d092e3e0778b4e8cd9315ff5aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 26 May 2021 11:13:32 +0200 Subject: [PATCH 5/6] MOBILE-3320 core: Fix supress events usage on send message form --- .../send-message-form/core-send-message-form.html | 2 +- src/core/directives/supress-events.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/core/components/send-message-form/core-send-message-form.html b/src/core/components/send-message-form/core-send-message-form.html index 292f9c2f2..74fadaad4 100644 --- a/src/core/components/send-message-form/core-send-message-form.html +++ b/src/core/components/send-message-form/core-send-message-form.html @@ -17,7 +17,7 @@ > + [attr.aria-label]="'core.send' | translate" [core-suppress-events] (onClick)="submitForm($event)"> diff --git a/src/core/directives/supress-events.ts b/src/core/directives/supress-events.ts index e651b1eca..0ec7aab2e 100644 --- a/src/core/directives/supress-events.ts +++ b/src/core/directives/supress-events.ts @@ -15,6 +15,7 @@ // Based on http://roblouie.com/article/198/using-gestures-in-the-ionic-2-beta/ import { Directive, ElementRef, OnInit, Input, Output, EventEmitter } from '@angular/core'; +import { CoreLogger } from '@singletons/logger'; /** * Directive to suppress all events on an element. This is useful to prevent keyboard closing when clicking this element. @@ -29,6 +30,8 @@ import { Directive, ElementRef, OnInit, Input, Output, EventEmitter } from '@ang * If you only want to suppress a single event just pass the name of the event. If you want to suppress a set of events, * pass an array with the names of the events to suppress. * + * Usage of onClick instead of click is mandatory to make this directive work. + * * Example usage: * * @@ -51,6 +54,13 @@ export class CoreSupressEventsDirective implements OnInit { * Initialize event listeners. */ ngOnInit(): void { + if (this.onClick.observers.length == 0) { + CoreLogger.getInstance('CoreSupressEventsDirective') + .error('No onClick output was defined causing this directive to fail', this.element); + + return; + } + let events: string[]; if (this.suppressEvents == 'all' || typeof this.suppressEvents == 'undefined' || this.suppressEvents === null) { From 7859b1b2ee985fb6474440e583ef56c305641fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 26 May 2021 11:34:42 +0200 Subject: [PATCH 6/6] MOBILE-3320 styles: Fix some block styles --- .../addon-block-recentlyaccessedcourses.html | 2 +- .../components/starredcourses/addon-block-starredcourses.html | 2 +- src/core/components/dynamic-component/dynamic-component.ts | 1 + src/core/components/loading/loading.scss | 4 ++++ .../features/compile/components/compile-html/compile-html.ts | 1 + .../siteplugins/components/assign-feedback/assign-feedback.ts | 1 + .../components/assign-submission/assign-submission.ts | 1 + src/core/features/siteplugins/components/block/block.ts | 1 + .../siteplugins/components/course-format/course-format.ts | 1 + .../siteplugins/components/module-index/module-index.ts | 1 + .../components/only-title-block/only-title-block.ts | 1 + .../siteplugins/components/plugin-content/plugin-content.ts | 1 + .../components/question-behaviour/question-behaviour.ts | 1 + src/core/features/siteplugins/components/question/question.ts | 1 + .../components/quiz-access-rule/quiz-access-rule.ts | 1 + .../components/user-profile-field/user-profile-field.ts | 1 + .../workshop-assessment-strategy.ts | 1 + 17 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html b/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html index 56d9ffb91..0bc7f105f 100644 --- a/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html +++ b/src/addons/block/recentlyaccessedcourses/components/recentlyaccessedcourses/addon-block-recentlyaccessedcourses.html @@ -2,7 +2,7 @@

{{ 'addon.block_recentlyaccessedcourses.pluginname' | translate }}

-
+
diff --git a/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html b/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html index 9b3cbaa37..afabaf9b9 100644 --- a/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html +++ b/src/addons/block/starredcourses/components/starredcourses/addon-block-starredcourses.html @@ -2,7 +2,7 @@

{{ 'addon.block_starredcourses.pluginname' | translate }}

-
+
diff --git a/src/core/components/dynamic-component/dynamic-component.ts b/src/core/components/dynamic-component/dynamic-component.ts index 033ab327a..b49dbafb7 100644 --- a/src/core/components/dynamic-component/dynamic-component.ts +++ b/src/core/components/dynamic-component/dynamic-component.ts @@ -62,6 +62,7 @@ import { CoreLogger } from '@singletons/logger'; @Component({ selector: 'core-dynamic-component', templateUrl: 'core-dynamic-component.html', + styles: [':host { display: contents; }'], }) export class CoreDynamicComponent implements OnChanges, DoCheck { diff --git a/src/core/components/loading/loading.scss b/src/core/components/loading/loading.scss index f295487c9..1ed6c3d6e 100644 --- a/src/core/components/loading/loading.scss +++ b/src/core/components/loading/loading.scss @@ -56,5 +56,9 @@ padding-top: 20px; position: relative; } + + .core-loading-content { + display: block; + } } } diff --git a/src/core/features/compile/components/compile-html/compile-html.ts b/src/core/features/compile/components/compile-html/compile-html.ts index a2e5ba06c..e3c72975e 100644 --- a/src/core/features/compile/components/compile-html/compile-html.ts +++ b/src/core/features/compile/components/compile-html/compile-html.ts @@ -56,6 +56,7 @@ import { CoreUtils } from '@services/utils/utils'; @Component({ selector: 'core-compile-html', template: '', + styles: [':host { display: contents; }'], }) // eslint-disable-next-line @angular-eslint/no-conflicting-lifecycle export class CoreCompileHtmlComponent implements OnChanges, OnDestroy, DoCheck { diff --git a/src/core/features/siteplugins/components/assign-feedback/assign-feedback.ts b/src/core/features/siteplugins/components/assign-feedback/assign-feedback.ts index 643470967..a03d8e083 100644 --- a/src/core/features/siteplugins/components/assign-feedback/assign-feedback.ts +++ b/src/core/features/siteplugins/components/assign-feedback/assign-feedback.ts @@ -24,6 +24,7 @@ import { CoreSitePluginsCompileInitComponent } from '@features/siteplugins/class @Component({ selector: 'core-site-plugins-assign-feedback', templateUrl: 'core-siteplugins-assign-feedback.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsAssignFeedbackComponent extends CoreSitePluginsCompileInitComponent implements OnInit { diff --git a/src/core/features/siteplugins/components/assign-submission/assign-submission.ts b/src/core/features/siteplugins/components/assign-submission/assign-submission.ts index 367d8090a..ba2bdeab9 100644 --- a/src/core/features/siteplugins/components/assign-submission/assign-submission.ts +++ b/src/core/features/siteplugins/components/assign-submission/assign-submission.ts @@ -24,6 +24,7 @@ import { CoreSitePluginsCompileInitComponent } from '@features/siteplugins/class @Component({ selector: 'core-site-plugins-assign-submission', templateUrl: 'core-siteplugins-assign-submission.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsAssignSubmissionComponent extends CoreSitePluginsCompileInitComponent implements OnInit { diff --git a/src/core/features/siteplugins/components/block/block.ts b/src/core/features/siteplugins/components/block/block.ts index 297a5d89b..8f710e2d6 100644 --- a/src/core/features/siteplugins/components/block/block.ts +++ b/src/core/features/siteplugins/components/block/block.ts @@ -25,6 +25,7 @@ import { CoreSitePluginsPluginContentComponent } from '../plugin-content/plugin- @Component({ selector: 'core-site-plugins-block', templateUrl: 'core-siteplugins-block.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsBlockComponent extends CoreBlockBaseComponent implements OnChanges { diff --git a/src/core/features/siteplugins/components/course-format/course-format.ts b/src/core/features/siteplugins/components/course-format/course-format.ts index 88cd9d586..025c1036e 100644 --- a/src/core/features/siteplugins/components/course-format/course-format.ts +++ b/src/core/features/siteplugins/components/course-format/course-format.ts @@ -28,6 +28,7 @@ import { CoreSitePluginsPluginContentComponent } from '../plugin-content/plugin- @Component({ selector: 'core-site-plugins-course-format', templateUrl: 'core-siteplugins-course-format.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsCourseFormatComponent implements OnChanges { diff --git a/src/core/features/siteplugins/components/module-index/module-index.ts b/src/core/features/siteplugins/components/module-index/module-index.ts index 40061f0ec..5e83cbc9d 100644 --- a/src/core/features/siteplugins/components/module-index/module-index.ts +++ b/src/core/features/siteplugins/components/module-index/module-index.ts @@ -40,6 +40,7 @@ import { CoreSitePluginsPluginContentComponent } from '../plugin-content/plugin- @Component({ selector: 'core-site-plugins-module-index', templateUrl: 'core-siteplugins-module-index.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, CoreCourseModuleMainComponent { diff --git a/src/core/features/siteplugins/components/only-title-block/only-title-block.ts b/src/core/features/siteplugins/components/only-title-block/only-title-block.ts index 09428e441..058ccca47 100644 --- a/src/core/features/siteplugins/components/only-title-block/only-title-block.ts +++ b/src/core/features/siteplugins/components/only-title-block/only-title-block.ts @@ -26,6 +26,7 @@ import { CoreNavigator } from '@services/navigator'; @Component({ selector: 'core-siteplugins-only-title-block', templateUrl: 'core-siteplugins-only-title-block.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsOnlyTitleBlockComponent extends CoreBlockBaseComponent implements OnInit { diff --git a/src/core/features/siteplugins/components/plugin-content/plugin-content.ts b/src/core/features/siteplugins/components/plugin-content/plugin-content.ts index 91b3bb2ce..600f14042 100644 --- a/src/core/features/siteplugins/components/plugin-content/plugin-content.ts +++ b/src/core/features/siteplugins/components/plugin-content/plugin-content.ts @@ -28,6 +28,7 @@ import { CoreDomUtils } from '@services/utils/dom'; @Component({ selector: 'core-site-plugins-plugin-content', templateUrl: 'core-siteplugins-plugin-content.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck { diff --git a/src/core/features/siteplugins/components/question-behaviour/question-behaviour.ts b/src/core/features/siteplugins/components/question-behaviour/question-behaviour.ts index 04428e45c..0fd8f641a 100644 --- a/src/core/features/siteplugins/components/question-behaviour/question-behaviour.ts +++ b/src/core/features/siteplugins/components/question-behaviour/question-behaviour.ts @@ -24,6 +24,7 @@ import { CoreSitePluginsCompileInitComponent } from '@features/siteplugins/class @Component({ selector: 'core-site-plugins-question-behaviour', templateUrl: 'core-siteplugins-question-behaviour.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsQuestionBehaviourComponent extends CoreSitePluginsCompileInitComponent implements OnInit { diff --git a/src/core/features/siteplugins/components/question/question.ts b/src/core/features/siteplugins/components/question/question.ts index f071a0afc..33132630a 100644 --- a/src/core/features/siteplugins/components/question/question.ts +++ b/src/core/features/siteplugins/components/question/question.ts @@ -25,6 +25,7 @@ import { CoreSitePluginsCompileInitComponent } from '@features/siteplugins/class @Component({ selector: 'core-site-plugins-question', templateUrl: 'core-siteplugins-question.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsQuestionComponent extends CoreSitePluginsCompileInitComponent implements OnInit { diff --git a/src/core/features/siteplugins/components/quiz-access-rule/quiz-access-rule.ts b/src/core/features/siteplugins/components/quiz-access-rule/quiz-access-rule.ts index 874d6fbf6..3ed0e21b9 100644 --- a/src/core/features/siteplugins/components/quiz-access-rule/quiz-access-rule.ts +++ b/src/core/features/siteplugins/components/quiz-access-rule/quiz-access-rule.ts @@ -25,6 +25,7 @@ import { CoreSitePluginsCompileInitComponent } from '@features/siteplugins/class @Component({ selector: 'core-site-plugins-quiz-access-rule', templateUrl: 'core-siteplugins-quiz-access-rule.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsQuizAccessRuleComponent extends CoreSitePluginsCompileInitComponent implements OnInit { diff --git a/src/core/features/siteplugins/components/user-profile-field/user-profile-field.ts b/src/core/features/siteplugins/components/user-profile-field/user-profile-field.ts index e30675854..a181a6001 100644 --- a/src/core/features/siteplugins/components/user-profile-field/user-profile-field.ts +++ b/src/core/features/siteplugins/components/user-profile-field/user-profile-field.ts @@ -26,6 +26,7 @@ import { CoreUserProfileFieldDelegate } from '@features/user/services/user-profi @Component({ selector: 'core-site-plugins-user-profile-field', templateUrl: 'core-siteplugins-user-profile-field.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsUserProfileFieldComponent extends CoreSitePluginsCompileInitComponent implements OnInit { diff --git a/src/core/features/siteplugins/components/workshop-assessment-strategy/workshop-assessment-strategy.ts b/src/core/features/siteplugins/components/workshop-assessment-strategy/workshop-assessment-strategy.ts index ea9e56c18..2030ab474 100644 --- a/src/core/features/siteplugins/components/workshop-assessment-strategy/workshop-assessment-strategy.ts +++ b/src/core/features/siteplugins/components/workshop-assessment-strategy/workshop-assessment-strategy.ts @@ -24,6 +24,7 @@ import { CoreSitePluginsCompileInitComponent } from '@features/siteplugins/class @Component({ selector: 'core-siteplugins-workshop-assessment-strategy', templateUrl: 'core-siteplugins-workshop-assessment-strategy.html', + styles: [':host { display: contents; }'], }) export class CoreSitePluginsWorkshopAssessmentStrategyComponent extends CoreSitePluginsCompileInitComponent implements OnInit {