From 8af68bbe09b04b03559fbe9290bbf076a21c7a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikel=20Mart=C3=ADn?= Date: Thu, 20 Jul 2023 12:18:08 +0200 Subject: [PATCH] MDL-78558 core_courseformat: Activity cards UI improvements - Fix action menu and completion button size - New 'Add activity' button styles - Fix restriction container styles - Fix action menu and groupmode button styles - Fix hover styles for action menu and groupmode button - Fix groupmode spacing styles - Homogenize completion button colours - Fix inplaceeditable and badge positioning - Fix export filesize related behat - Homogenize activity/section availability - New add topic styles --- .../tests/behat/dataexport.feature | 2 +- .../tests/behat/add_filetypes.feature | 2 +- .../local/content/addsection.mustache | 4 +- .../local/content/availability.mustache | 13 +- .../local/content/cm/activitybadge.mustache | 10 +- .../local/content/cm/availability.mustache | 2 +- .../local/content/cm/cmname.mustache | 2 +- .../local/content/cm/groupmode.mustache | 4 +- .../templates/activitychooserbutton.mustache | 4 +- .../tests/behat/add_custom_file_type.feature | 2 +- theme/boost/scss/moodle/course.scss | 78 +-- theme/boost/style/moodle.css | 449 +++++++++++++++--- theme/classic/style/moodle.css | 449 +++++++++++++++--- 13 files changed, 832 insertions(+), 189 deletions(-) diff --git a/admin/tool/dataprivacy/tests/behat/dataexport.feature b/admin/tool/dataprivacy/tests/behat/dataexport.feature index bef9452fca4..7535de26a56 100644 --- a/admin/tool/dataprivacy/tests/behat/dataexport.feature +++ b/admin/tool/dataprivacy/tests/behat/dataexport.feature @@ -185,7 +185,7 @@ Feature: Data export from the privacy API And I reload the page And I should see "Download ready" in the "Victim User 1" "table_row" And I open the action menu in "Victim User 1" "table_row" - And following "Download" should download between "1" and "167500" bytes + And following "Download" should download between "1" and "169000" bytes And the following config values are set as admin: | privacyrequestexpiry | 1 | tool_dataprivacy | And I wait "1" seconds diff --git a/admin/tool/filetypes/tests/behat/add_filetypes.feature b/admin/tool/filetypes/tests/behat/add_filetypes.feature index 2d3bf3ccee6..13b1e2acba3 100644 --- a/admin/tool/filetypes/tests/behat/add_filetypes.feature +++ b/admin/tool/filetypes/tests/behat/add_filetypes.feature @@ -129,4 +129,4 @@ Feature: Add customised file types And I expand all fieldsets And I set the field "Show type" to "1" And I press "Save and return to course" - Then I should see "FROG" in the "div.activitybadge" "css_element" + Then I should see "FROG" in the "span.activitybadge" "css_element" diff --git a/course/format/templates/local/content/addsection.mustache b/course/format/templates/local/content/addsection.mustache index 06de0f62baf..5a762b9bc57 100644 --- a/course/format/templates/local/content/addsection.mustache +++ b/course/format/templates/local/content/addsection.mustache @@ -53,13 +53,13 @@ {{#addsections}} - {{title}} + {{#pix}}t/switch_plus, moodle{{/pix}}{{title}} {{/addsections}} diff --git a/course/format/templates/local/content/availability.mustache b/course/format/templates/local/content/availability.mustache index ef88b91aef3..e3fc1e81b5f 100644 --- a/course/format/templates/local/content/availability.mustache +++ b/course/format/templates/local/content/availability.mustache @@ -28,7 +28,9 @@ } }} {{^excerpt}} - {{#pix}}t/unlock, core{{/pix}} {{{text}}} + + {{#pix}}t/unlock, core{{/pix}} {{{text}}} + {{/excerpt}} {{#excerpt}} {{< core/showmore }} @@ -39,14 +41,17 @@ {{#pix}}t/unlock, core{{/pix}} {{{text}}} {{/expandedcontent}} {{$buttonextraclasses}}font-weight-bold{{/buttonextraclasses}} - {{$collapsedextraclasses}}text-truncate pr-2{{/collapsedextraclasses}} - {{$expandedextraclasses}}py-2{{/expandedextraclasses}} + {{$collapsedextraclasses}}text-truncate pr-2 {{#editing}}mt-2{{/editing}}{{/collapsedextraclasses}} + {{$expandedextraclasses}} + {{^editing}}py-2{{/editing}} + {{#editing}}mt-2 pb-2{{/editing}} + {{/expandedextraclasses}} {{/core/showmore }} {{/excerpt}} {{#editing}} {{#editurl}} {{/editurl}} {{/editing}} diff --git a/course/format/templates/local/content/cm/activitybadge.mustache b/course/format/templates/local/content/cm/activitybadge.mustache index 4c8f0f8af50..76e39c7c680 100644 --- a/course/format/templates/local/content/cm/activitybadge.mustache +++ b/course/format/templates/local/content/cm/activitybadge.mustache @@ -39,17 +39,17 @@ ] } }} -
-
+ {{#badgeurl}} {{badgecontent}} {{/badgeurl}} {{^badgeurl}} {{badgecontent}} {{/badgeurl}} -
-
+ + diff --git a/course/format/templates/local/content/cm/availability.mustache b/course/format/templates/local/content/cm/availability.mustache index 633dd907c3b..98ea2b2d5b5 100644 --- a/course/format/templates/local/content/cm/availability.mustache +++ b/course/format/templates/local/content/cm/availability.mustache @@ -36,7 +36,7 @@ }} {{#hasmodavailability}} {{#info}} -
+
{{^isrestricted}} {{{text}}} {{/isrestricted}} diff --git a/course/format/templates/local/content/cm/cmname.mustache b/course/format/templates/local/content/cm/cmname.mustache index 34346542741..7df6ed914d2 100644 --- a/course/format/templates/local/content/cm/cmname.mustache +++ b/course/format/templates/local/content/cm/cmname.mustache @@ -58,7 +58,7 @@
-
+
{{#activityname}} {{$ core/inplace_editable }} {{> core/inplace_editable }} diff --git a/course/format/templates/local/content/cm/groupmode.mustache b/course/format/templates/local/content/cm/groupmode.mustache index 737f1c37f9a..b469ef28d3e 100644 --- a/course/format/templates/local/content/cm/groupmode.mustache +++ b/course/format/templates/local/content/cm/groupmode.mustache @@ -31,7 +31,7 @@ {{< core/local/dropdown/status}} {{$ buttonclasses }} {{#autohide}} v-parent-focus {{/autohide}} - groupmode-information btn pt-1 icon-no-margin + groupmode-information btn btn-icon icon-no-margin {{/ buttonclasses }} {{$ buttoncontent }} {{{groupicon}}} @@ -44,7 +44,7 @@
{{#groupicon}}{{{groupicon}}}{{/groupicon}} {{#groupalt}} diff --git a/course/templates/activitychooserbutton.mustache b/course/templates/activitychooserbutton.mustache index 04ecfa0ddd1..91615f7065f 100644 --- a/course/templates/activitychooserbutton.mustache +++ b/course/templates/activitychooserbutton.mustache @@ -29,9 +29,9 @@ "sectionreturn": 0 } }} -