From 5c3fe58ed7b85cd7ac38e209166c0a905fe5ddec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Apr 2022 09:29:08 +0200 Subject: [PATCH 1/6] MOBILE-3833 storage: Fix hover style state --- .../pages/course-storage/course-storage.html | 8 +-- .../pages/course-storage/course-storage.scss | 55 ++++++++++--------- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.html b/src/addons/storagemanager/pages/course-storage/course-storage.html index 1d0182cf1..d0801b848 100644 --- a/src/addons/storagemanager/pages/course-storage/course-storage.html +++ b/src/addons/storagemanager/pages/course-storage/course-storage.html @@ -47,8 +47,8 @@ - - + - diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.scss b/src/addons/storagemanager/pages/course-storage/course-storage.scss index 8682b14eb..cf6193060 100644 --- a/src/addons/storagemanager/pages/course-storage/course-storage.scss +++ b/src/addons/storagemanager/pages/course-storage/course-storage.scss @@ -3,36 +3,41 @@ :host { --course-storage-max-activity-height: 120px; - ion-card ion-item { + ion-card ion-item.size { --inner-padding-end: 0px; } - ion-card.section ion-card-header { - padding-top: 8px; - padding-bottom: 8px; - } - ion-card.section .item-heading { - font-weight: bold; - font-size: 1.2rem; - } + ion-card.section { + ion-card-header { + padding: 0; + } + ion-card-content { + padding: 0; - ion-card-content.hidden-content { - padding: 0; - } + .core-course-storage-activity ion-label { + h3 { + position: relative; + max-height: var(--course-storage-max-activity-height); + overflow: hidden; + ::ng-deep * { + pointer-events: none !important; + } - .core-course-storage-activity ion-label h3 { - position: relative; - max-height: var(--course-storage-max-activity-height); - - &:before { - content: ''; - height: 100%; - min-height: var(--course-storage-max-activity-height); - position: absolute; - @include position(0, 0, null, 0); - background: linear-gradient(to bottom, rgba(var(--background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--background-gradient-rgb), 1) calc(100% - 20px)); - z-index: 6; - pointer-events: none; + &:before { + content: ''; + height: var(--course-storage-max-activity-height); + position: absolute; + @include position(0, 0, null, 0); + background: linear-gradient(to bottom, rgba(var(--background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--background-gradient-rgb), 1) calc(100% - 20px)); + z-index: 6; + pointer-events: none; + } + } + } + } + .item-heading { + font-weight: bold; + font-size: 1.2rem; } } } From be8ed25daaaa9635ff64ed063e5bcd935af92673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Apr 2022 09:50:17 +0200 Subject: [PATCH 2/6] MOBILE-3833 course: Deprecate skipListStatus on prefetch handlers --- src/addons/mod/label/services/handlers/prefetch.ts | 1 - src/core/features/course/classes/module-prefetch-handler.ts | 6 ------ .../features/course/services/module-prefetch-delegate.ts | 4 +++- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/addons/mod/label/services/handlers/prefetch.ts b/src/addons/mod/label/services/handlers/prefetch.ts index 50feb8c62..72f153fa5 100644 --- a/src/addons/mod/label/services/handlers/prefetch.ts +++ b/src/addons/mod/label/services/handlers/prefetch.ts @@ -31,7 +31,6 @@ export class AddonModLabelPrefetchHandlerService extends CoreCourseResourcePrefe modName = 'label'; component = AddonModLabelProvider.COMPONENT; updatesNames = /^.*files$/; - skipListStatus = true; /** * @inheritdoc diff --git a/src/core/features/course/classes/module-prefetch-handler.ts b/src/core/features/course/classes/module-prefetch-handler.ts index ab9bf9fda..79dfd6bc7 100644 --- a/src/core/features/course/classes/module-prefetch-handler.ts +++ b/src/core/features/course/classes/module-prefetch-handler.ts @@ -47,12 +47,6 @@ export class CoreCourseModulePrefetchHandlerBase implements CoreCourseModulePref */ updatesNames = /^.*files$/; - /** - * If true, this module will be ignored when determining the status of a list of modules. The module will - * still be downloaded when downloading the section/course, it only affects whether the button should be displayed. - */ - skipListStatus = false; - /** * List of download promises to prevent downloading the module twice at the same time. */ diff --git a/src/core/features/course/services/module-prefetch-delegate.ts b/src/core/features/course/services/module-prefetch-delegate.ts index 91e069b40..992e069e8 100644 --- a/src/core/features/course/services/module-prefetch-delegate.ts +++ b/src/core/features/course/services/module-prefetch-delegate.ts @@ -1361,8 +1361,10 @@ export interface CoreCourseModulePrefetchHandler extends CoreDelegateHandler { /** * If true, this module will be treated as not downloadable when determining the status of a list of modules. The module will * still be downloaded when downloading the section/course, it only affects whether the button should be displayed. + * + * @depracated since app 4.0. */ - skipListStatus: boolean; + skipListStatus?: boolean; /** * Get the download size of a module. From 6bf1bb7cb4748b74465ed9332b9a27737b849952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Apr 2022 10:17:49 +0200 Subject: [PATCH 3/6] MOBILE-3833 style: Center toast message and buttons on small screens --- src/theme/theme.base.scss | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 6efa32011..81ce547f4 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -501,10 +501,6 @@ ion-toast { @include media-breakpoint-down(sm) { &::part(container) { flex-direction: column; - align-items: flex-end; - } - &::part(message) { - align-self: flex-start; } } } From 9de662f8964e16767e53727b01d47ca59b34bf42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Apr 2022 10:58:36 +0200 Subject: [PATCH 4/6] MOBILE-3833 timeline: Import styles from myoverview --- .../events/addon-block-timeline-events.html | 2 +- .../timeline/addon-block-timeline.html | 29 +++++------ .../components/timeline/timeline.scss | 38 +++++++++++++++ .../timeline/components/timeline/timeline.ts | 1 + .../search-box/core-search-box.html | 48 +++++++++---------- .../components/search-box/search-box.scss | 29 +++++++---- 6 files changed, 98 insertions(+), 49 deletions(-) create mode 100644 src/addons/block/timeline/components/timeline/timeline.scss diff --git a/src/addons/block/timeline/components/events/addon-block-timeline-events.html b/src/addons/block/timeline/components/events/addon-block-timeline-events.html index b370beae4..5244492db 100644 --- a/src/addons/block/timeline/components/events/addon-block-timeline-events.html +++ b/src/addons/block/timeline/components/events/addon-block-timeline-events.html @@ -53,7 +53,7 @@ - + {{event.action.name}} {{event.action.itemcount}} diff --git a/src/addons/block/timeline/components/timeline/addon-block-timeline.html b/src/addons/block/timeline/components/timeline/addon-block-timeline.html index 949692cb2..c494a8f6f 100644 --- a/src/addons/block/timeline/components/timeline/addon-block-timeline.html +++ b/src/addons/block/timeline/components/timeline/addon-block-timeline.html @@ -4,13 +4,21 @@ - - - + + + + + + + + + {{ 'core.all' | translate }} - + {{ 'addon.block_timeline.overdue' | translate }} @@ -30,13 +38,13 @@ - + - + @@ -48,14 +56,7 @@ - - - - - - + -
- - {{ placeholder }} - - - - - - - - + + + {{ placeholder }} + + + + + + + + + + + + + {{item.searchedtext}} - - - - {{item.searchedtext}} - - - -
+ + diff --git a/src/core/features/search/components/search-box/search-box.scss b/src/core/features/search/components/search-box/search-box.scss index 958a5edc7..698da8e5b 100644 --- a/src/core/features/search/components/search-box/search-box.scss +++ b/src/core/features/search/components/search-box/search-box.scss @@ -1,29 +1,40 @@ :host { - min-height: var(--a11y-min-target-size); + --height: var(--a11y-min-target-size); + --search-height: calc(var(--height) - 2px); + min-height: var(--height); display: block; position: relative; margin: 8px; - ion-card { + form { position: absolute; left: 0; right: 0; z-index: 4; margin: 0; - --border-color: var(--core-search-box-border-color); - --border-radius: var(--core-search-box-border-radius); - --background: var(--core-search-box-background); - --color: var(--core-search-box-border-color); + border: 1px solid var(--core-search-box-border-color); + border-radius: var(--core-search-box-border-radius); + background: var(--core-search-box-background); + color: var(--core-search-box-border-color); + + .search-box { + --min-height: var(--search-height); + border-radius: var(--core-search-box-border-radius); + } + + ion-button.button { + margin: 0; + --a11y-min-target-size: var(--search-height); + } } - ion-button.button { - margin: 0; - } + .core-search-history { max-height: calc(-120px + 80vh); overflow-y: auto; background: var(--core-search-box-background); + border-radius: 0 0 var(--core-search-box-border-radius) var(--core-search-box-border-radius); --ion-item-background: var(--core-search-box-background); .item:hover { From 77cbaa1f966b32400492c3b4d63517575d02912e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Apr 2022 11:04:35 +0200 Subject: [PATCH 5/6] MOBILE-3833 style: Margin on chip slotted icons --- src/theme/theme.base.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 81ce547f4..e71e36640 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -1050,9 +1050,16 @@ ion-button.chip { ion-icon { font-size: 16px; min-width: 16px; + } + + ion-icon[slot=start] { @include margin(0, 8px, 0, 0); } + ion-icon[slot=end] { + @include margin(0, 0, 0, 8px); + } + ion-label { white-space: normal !important; } From a251482349348c854e40559a7615b2695b6320fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 6 Apr 2022 11:17:36 +0200 Subject: [PATCH 6/6] MOBILE-3833 storage: Do not show info text if downloads are disabled --- .../storagemanager/pages/course-storage/course-storage.html | 2 +- src/theme/theme.base.scss | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.html b/src/addons/storagemanager/pages/course-storage/course-storage.html index d0801b848..84fb399a2 100644 --- a/src/addons/storagemanager/pages/course-storage/course-storage.html +++ b/src/addons/storagemanager/pages/course-storage/course-storage.html @@ -10,7 +10,7 @@ - +

{{ 'addon.storagemanager.courseinfo' | translate }}

diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index e71e36640..32100b047 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -844,6 +844,10 @@ ion-card { ion-item:only-child { --inner-border-width: 0px; } + + ion-card-title { + font-size: 20px; + } } .core-course-module-handler:not(.addon-mod-label-handler) .item-heading .filter_mathjaxloader_equation div {