Skip to content

Commit

Permalink
MDL-82497 theme: Update icons for consistency
Browse files Browse the repository at this point in the history
Some places where using the wrong icon and now that they have changed,
they need to be updated. For instance:
- i/settings (cog) should be used for settings or configure.
- t/edit (pen) should be used for editing
  • Loading branch information
sarjona committed Jul 30, 2024
1 parent fd67691 commit 793fe8a
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 25 deletions.
2 changes: 1 addition & 1 deletion contentbank/templates/bankcontent/toolbar.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ data-action="viewgrid">
<button class="icon-no-margin btn btn-secondary {{#viewlist}}active{{/viewlist}}"
title="{{#str}} displaydetails, contentbank {{/str}}"
data-action="viewlist">
{{#pix}}t/viewdetails, core, {{#str}} displaydetails, contentbank {{/str}} {{/pix}}
{{#pix}}a/view_list_active, core, {{#str}} displaydetails, contentbank {{/str}} {{/pix}}
</button>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{{#showsettings}}
<div class="mb-2">
<a href="{{{settingsurl}}}" title="{{#str}} edit {{/str}}" aria-label="{{#str}} edit {{/str}}">
{{#pix}} t/edit, moodle {{/pix}}
{{#pix}} i/settings, moodle {{/pix}}
</a>
</div>
{{/showsettings}}
Expand Down
2 changes: 1 addition & 1 deletion course/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ function course_get_cm_edit_actions(cm_info $mod, $indent = -1, $sr = null) {
if ($hasmanageactivities) {
$actions['update'] = new action_menu_link_secondary(
new moodle_url($baseurl, array('update' => $mod->id)),
new pix_icon('t/edit', '', 'moodle', array('class' => 'iconsmall')),
new pix_icon('i/settings', '', 'moodle', ['class' => 'iconsmall']),
$str->editsettings,
array('class' => 'editing_update', 'data-action' => 'update')
);
Expand Down
4 changes: 2 additions & 2 deletions course/tests/behat/activity_chooser.feature
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Feature: Display and choose from the available activities in course
# Confirm more help link exists
Then "More help" "link" should exist
# Confirm that corresponding help icon exist
And ".fa-info-circle" "css_element" should exist
And ".fa-book" "css_element" should exist
# Confirm that link opens in new window
And "Opens in new window" "link" should be visible
# Confirm the same behaviour for weekly format course
Expand All @@ -313,6 +313,6 @@ Feature: Display and choose from the available activities in course
# Confirm more help link exists
And "More help" "link" should exist
# Confirm that corresponding help icon exist
And ".fa-info-circle" "css_element" should exist
And ".fa-book" "css_element" should exist
# Confirm that link opens in new window
And "Opens in new window" "link" should be visible
2 changes: 1 addition & 1 deletion lib/blocklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@ public function edit_controls($block) {

$controls[] = new action_menu_link_secondary(
$editactionurl,
new pix_icon('t/edit', $str, 'moodle', array('class' => 'iconsmall', 'title' => '')),
new pix_icon('i/settings', $str, 'moodle', ['class' => 'iconsmall', 'title' => '']),
$str,
[
'class' => 'editing_edit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
aria-label="{{#str}} settings, core_message {{/str}}"
role="button"
>
{{#pix}} t/edit, core {{/pix}}
{{#pix}} i/settings, core {{/pix}}
</a>
</div>
{{/caneditownmessageprofile}}
Expand Down
2 changes: 1 addition & 1 deletion reportbuilder/classes/local/systemreports/reports_list.php
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ protected function add_actions(): void {
// Edit details action.
$this->add_action((new action(
new moodle_url('#'),
new pix_icon('t/edit', ''),
new pix_icon('i/settings', ''),
['data-action' => 'report-edit', 'data-report-id' => ':id'],
false,
new lang_string('editreportdetails', 'core_reportbuilder')
Expand Down
5 changes: 4 additions & 1 deletion theme/boost/scss/moodle/blocks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,12 @@

.block .block-controls {
.dropdown-toggle {
/* So that the caret takes the colour of the icon. */
/* So that the icon takes the colour of the icon. */
color: $body-color;
}
.dropdown-toggle::after {
display: none;
}
}

$blocks-column-width: 360px !default;
Expand Down
5 changes: 5 additions & 0 deletions theme/boost/scss/moodle/forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ div#dateselector-calendar-panel {
display: none;
}

.availability-field img {
width: 16px;
height: 16px;
}

.availability-eye {
clear: left;
float: left;
Expand Down
5 changes: 0 additions & 5 deletions theme/boost/scss/moodle/popover-region.scss
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ $content-header-footer-height: $region-header-height + $region-footer-height;
.icon {
font-weight: bolder;
}
.notification-image {
.icon {
font-weight: 400;
}
}
}
}

Expand Down
1 change: 0 additions & 1 deletion theme/boost/scss/moodle/reportbuilder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ $rb-sortable-list-drag-color: lighten($primary, 40%);
.toggle-card-button {
i.toggle-card-icon {
color: $gray-600;
font-size: 1.5em;
font-weight: 700;
}
// Toggle icons using standard bootstrap collapse.
Expand Down
4 changes: 4 additions & 0 deletions theme/boost/scss/moodle/user.scss
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,10 @@

#userselector_options .collapsibleregioncaption {
font-weight: bold;
img {
width: 16px;
height: 16px;
}
}

#userselector_options p {
Expand Down
18 changes: 13 additions & 5 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -27043,9 +27043,12 @@ img.icon {
}

.block .block-controls .dropdown-toggle {
/* So that the caret takes the colour of the icon. */
/* So that the icon takes the colour of the icon. */
color: #1d2125;
}
.block .block-controls .dropdown-toggle::after {
display: none;
}

[data-region=blocks-column] {
width: 360px;
Expand Down Expand Up @@ -32905,6 +32908,10 @@ body.path-question-type .mform fieldset.hidden {
#userselector_options .collapsibleregioncaption {
font-weight: bold;
}
#userselector_options .collapsibleregioncaption img {
width: 16px;
height: 16px;
}

#userselector_options p {
margin: 0.2em 0;
Expand Down Expand Up @@ -33252,6 +33259,11 @@ div#dateselector-calendar-panel {
display: none;
}

.availability-field img {
width: 16px;
height: 16px;
}

.availability-eye {
clear: left;
float: left;
Expand Down Expand Up @@ -36738,9 +36750,6 @@ body {
.navbar-nav .popover-region .icon {
font-weight: bolder;
}
.navbar-nav .popover-region .notification-image .icon {
font-weight: 400;
}

.navbar .popover-region.collapsed .popover-region-container {
opacity: 0;
Expand Down Expand Up @@ -38345,7 +38354,6 @@ div.editor_atto_toolbar button .icon {
}
.reportbuilder-toggle-card .toggle-card-button i.toggle-card-icon {
color: #6a737b;
font-size: 1.5em;
font-weight: 700;
}
.reportbuilder-toggle-card .toggle-card-button .collapsed-icon-container {
Expand Down
18 changes: 13 additions & 5 deletions theme/classic/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -27043,9 +27043,12 @@ img.icon {
}

.block .block-controls .dropdown-toggle {
/* So that the caret takes the colour of the icon. */
/* So that the icon takes the colour of the icon. */
color: #1d2125;
}
.block .block-controls .dropdown-toggle::after {
display: none;
}

[data-region=blocks-column] {
width: 360px;
Expand Down Expand Up @@ -32905,6 +32908,10 @@ body.path-question-type .mform fieldset.hidden {
#userselector_options .collapsibleregioncaption {
font-weight: bold;
}
#userselector_options .collapsibleregioncaption img {
width: 16px;
height: 16px;
}

#userselector_options p {
margin: 0.2em 0;
Expand Down Expand Up @@ -33252,6 +33259,11 @@ div#dateselector-calendar-panel {
display: none;
}

.availability-field img {
width: 16px;
height: 16px;
}

.availability-eye {
clear: left;
float: left;
Expand Down Expand Up @@ -36672,9 +36684,6 @@ body {
.navbar-nav .popover-region .icon {
font-weight: bolder;
}
.navbar-nav .popover-region .notification-image .icon {
font-weight: 400;
}

.navbar .popover-region.collapsed .popover-region-container {
opacity: 0;
Expand Down Expand Up @@ -38279,7 +38288,6 @@ div.editor_atto_toolbar button .icon {
}
.reportbuilder-toggle-card .toggle-card-button i.toggle-card-icon {
color: #6a737b;
font-size: 1.5em;
font-weight: 700;
}
.reportbuilder-toggle-card .toggle-card-button .collapsed-icon-container {
Expand Down

0 comments on commit 793fe8a

Please sign in to comment.