Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
abias committed Dec 6, 2024
1 parent 23228c8 commit 57ea94b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ moodle-theme_boost_union
Changes
-------

### Unreleased

* 2024-11-25 - Bugfix: Make outside-left and outside-right block regions really responsive, resolves #266.

### v4.5-r3

* 2024-11-19 - Bugfix: The starred courses popover showed a JavaScript error in the browser JS console, resolves #759.
Expand Down
1 change: 0 additions & 1 deletion lang/en/theme_boost_union.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@
<ul><li>By default, all additional block regions are disabled. Please enable the particular block regions on the particular page layouts according to your needs. Try to be as focused as possible – too many block regions could overwhelm end users.</li>
<li>As soon as an additional block region is enabled, it is visible for all authenticated users and editable by teachers and managers (depending on the fact if the particular user is allowed to edit the particular Moodle page, of course). But there are also theme/boost_union:viewregion* and theme/boost_union:editregion* capabilities which allow you to fine-tune the usage of each block region according to your needs.</li>
<li>The Outside (left), Outside (right), Content (upper), Content (lower) and Header block regions are not available for all page layouts.</li></ul>';
$string['blockregionsheading_experimental'] = 'Please note: The <em>Outside (left) and Outside (right) block regions</em> are fully working in the current state of implementation, but have to be <em>considered as experimental</em> as they do not wrap properly on medium width screens yet. Against this background, please use them with care. This issue will be fixed in an upcoming release.';
$string['region-none'] = 'None';
$string['region-outside-left'] = 'Outside (left)';
$string['region-outside-top'] = 'Outside (top)';
Expand Down
16 changes: 8 additions & 8 deletions scss/boost_union/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -757,12 +757,14 @@ body.theme-boost-union-commincourse {
.main-inner-outside-left-right,
.main-inner-outside-left,
.main-inner-outside-right {
/* If the admin configured outside blocks to be shown next to the window edges. */
&.main-inner-outside-nearwindowedges {
/* Center the main region content to position the page content in the middle of the page,
and place the left and right block regions near the window edges. */
width: 100%;
display: flex;
}
/* If the admin configured outside blocks to be shown next to the main content. */
&.main-inner-outside-nextmaincontent {
/* Center the main region content to keep the left and right block regions near the main region,
positioning the page content in the middle of the page. */
Expand Down Expand Up @@ -797,7 +799,8 @@ body.theme-boost-union-commincourse {
width: calc(98% - #{$blockregionoutsiderightwidth} - #{$blockregionoutsideleftwidth});
}

/* Using 100% of width in the main inner push the side rigions outside the page */
/* Set the width of the outside-* regions to auto.
Using a 100% width in the main inner area would push the side regions outside the page. */
#page .main-inner-outside-left-right .main-inner,
#page .main-inner-outside-left .main-inner,
#page .main-inner-outside-right .main-inner {
Expand All @@ -806,7 +809,7 @@ body.theme-boost-union-commincourse {
}
}

/* On larger screens. */
/* On even larger screens. */
@include media-breakpoint-up(lg) {
/* Set the width and margin of the outside-left region. */
#theme-block-region-outside-left {
Expand All @@ -821,17 +824,14 @@ body.theme-boost-union-commincourse {
margin-top: 1.5rem;
width: $blockregionoutsiderightwidth;
}
}

/* On larger screen. */
@include media-breakpoint-up(lg) {
/* Set the width of the main region content to 50%, allowing the left and right block regions to have a wider width */
body.limitedwidth #page.drawers .main-inner-wrapper .main-inner {
flex: auto;
}
}

/* On larger screen. */
/* On even larger screens only. */
@include media-breakpoint-only(lg) {
/* Reduced the left region block to maximum width, so the center main content & right block region
align nearer to the left block region */
Expand All @@ -848,7 +848,7 @@ body.theme-boost-union-commincourse {
}
}

/* On larger screen. */
/* On larger screens only. */
@include media-breakpoint-only(md) {
/* Center the main region content while maintaining full width for the left and right block regions,
thereby positioning the page content in the middle of the page. */
Expand Down Expand Up @@ -885,7 +885,7 @@ body.theme-boost-union-commincourse {
}
}

/* And on smaller screens. */
/* And on really small screens. */
@include media-breakpoint-down(sm) {
/* Padding has been added to the center region block, which contains the left and right regions,
as well as the main content region, to create space between the main content and the window screen. */
Expand Down
9 changes: 0 additions & 9 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -1553,15 +1553,6 @@
$setting = new admin_setting_heading($name, $title, $description);
$tab->add($setting);

// Add experimental warning.
$name = 'theme_boost_union/blockregionsheadingexperimental';
$notification = new \core\output\notification(get_string('blockregionsheading_experimental', 'theme_boost_union'),
\core\output\notification::NOTIFY_WARNING);
$notification->set_show_closebutton(false);
$description = $OUTPUT->render($notification);
$setting = new admin_setting_heading($name, '', $description);
$tab->add($setting);

// Settings: Additional block regions for 'x' layout.
// List of region strings.
$regionstr = (array) get_strings([
Expand Down
1 change: 1 addition & 0 deletions tests/behat/theme_boost_union_feelsettings_blocks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ Feature: Configuring the theme_boost_union plugin for the "Blocks" tab on the "F
| <config> | <settingvalue> | theme_boost_union |
And the theme cache is purged and the theme is reloaded
When I log in as "admin"
# Change to a large window size as the block region width is not applied on small screens when the blocks are wrapped.
And I change window size to "large"
And I am on "Course 1" course homepage
And I turn editing mode on
Expand Down

0 comments on commit 57ea94b

Please sign in to comment.