Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up legacy styles and remove bs3-compat.scss #4267

Open
wants to merge 25 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4ad2536
Replace $brand-something with just $something
EreMaijala Feb 10, 2025
f0f0868
Eliminate border-radius variables and breadcrumb-separator
EreMaijala Feb 11, 2025
b3e09ad
Eliminate input-height-base, list-group-border and double gray-*.
EreMaijala Feb 24, 2025
b85304e
Adopt $nav-link-hover-bg and drop other unused nav-link variables.
EreMaijala Feb 21, 2025
c00506d
Drop unused variables.
EreMaijala Feb 21, 2025
44a7c0d
Eliminate padding and panel vars.
EreMaijala Feb 21, 2025
46aa3c8
Adopt btn-default.
EreMaijala Feb 24, 2025
d85986f
Remove copied color variables and out-of-date components/variables.scss.
EreMaijala Feb 24, 2025
ccf4dc2
Adopt pager.
EreMaijala Feb 24, 2025
5703a7b
Adopt legend changes, eliminate miscellaneous variables.
EreMaijala Feb 25, 2025
59dbae7
Drop unused mixins.
EreMaijala Feb 25, 2025
cd689d4
Replace sr-only with visually-hidden and sr-only-focusable with visua…
EreMaijala Feb 25, 2025
7d3d130
Eliminate button back-compatibility styles.
EreMaijala Feb 25, 2025
e1af845
Use Bootstrap's btn-group.
EreMaijala Feb 25, 2025
2563435
Adopt badges and labels.
EreMaijala Feb 25, 2025
c5beaa3
Use VuFind's dropdown caret everywhere.
EreMaijala Feb 25, 2025
90f345c
Clean up form styles
EreMaijala Feb 26, 2025
3c96ff6
Change control-label class to form-label.
EreMaijala Feb 26, 2025
456de16
Adopt form-group and input-group styles.
EreMaijala Feb 26, 2025
a13f39e
Rearrange miscellaneous rules, remove duplicates, fix textarea height.
EreMaijala Feb 26, 2025
338ca0f
Misc rearrangements, replace pull-right with float-end and pull-left …
EreMaijala Feb 26, 2025
3523bcc
Fix Export Record caret.
EreMaijala Feb 28, 2025
dd12bf5
Fix more/less buttons.
EreMaijala Feb 28, 2025
2f04603
Fix facet title margin.
EreMaijala Feb 28, 2025
2ca758c
Use smaller padding for tags.
EreMaijala Feb 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function testStatusBadges(): void
);
$this->assertEquals(
'Items due later: 1 ,',
$this->findCssAndGetText($checkoutsStatus, '.visually-hidden, .sr-only')
$this->findCssAndGetText($checkoutsStatus, '.visually-hidden')
);

$this->assertEquals(
Expand All @@ -393,7 +393,7 @@ public function testStatusBadges(): void
);
$this->assertEquals(
'Items due soon: 2 ,',
$this->findCssAndGetText($checkoutsStatus, '.visually-hidden, .sr-only', null, 1)
$this->findCssAndGetText($checkoutsStatus, '.visually-hidden', null, 1)
);

$this->assertEquals(
Expand All @@ -402,7 +402,7 @@ public function testStatusBadges(): void
);
$this->assertEquals(
'Items overdue: 3 ,',
$this->findCssAndGetText($checkoutsStatus, '.visually-hidden, .sr-only', null, 2)
$this->findCssAndGetText($checkoutsStatus, '.visually-hidden', null, 2)
);

// Holds
Expand All @@ -413,7 +413,7 @@ public function testStatusBadges(): void
);
$this->assertEquals(
'Available for Pickup: 1 ,',
$this->findCssAndGetText($holdsStatus, '.visually-hidden, .sr-only')
$this->findCssAndGetText($holdsStatus, '.visually-hidden')
);

$this->assertEquals(
Expand All @@ -422,7 +422,7 @@ public function testStatusBadges(): void
);
$this->assertEquals(
'In Transit: 2 ,',
$this->findCssAndGetText($holdsStatus, '.visually-hidden, .sr-only', null, 1)
$this->findCssAndGetText($holdsStatus, '.visually-hidden', null, 1)
);

$this->assertEquals(
Expand All @@ -431,7 +431,7 @@ public function testStatusBadges(): void
);
$this->assertEquals(
'Other Status: 3 ,',
$this->findCssAndGetText($holdsStatus, '.visually-hidden, .sr-only', null, 2)
$this->findCssAndGetText($holdsStatus, '.visually-hidden', null, 2)
);

// Fines
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function testFeedbackAdmin(): void
$this->assertEquals("All {$this->getVuFindUrl()}/", $this->findCss($page, '#site_url')->getText());

// Set the first message to "in progress" status:
$this->findCss($page, '.form-control.status_update')->setValue('in progress');
$this->findCss($page, '.form-feedback-list .status_update')->setValue('in progress');
$this->waitForPageLoad($page);
$this->assertEquals(
'Feedback status updated successfully',
Expand Down
2 changes: 1 addition & 1 deletion themes/bootstrap5/css/compiled.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion themes/bootstrap5/js/advanced_search.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function addGroup(_firstTerm, _firstField, _join, isUser = false) {
.on("click", function deleteGroupHandler() {
return deleteGroup($(this).data('nextGroup'));
});
$newGroup.find('select.form-control')
$newGroup.find('.adv-group-match select')
.attr('id', 'search_bool' + nextGroup)
.attr('name', 'bool' + nextGroup + '[]');
$newGroup.find('.search_bool')
Expand Down
4 changes: 3 additions & 1 deletion themes/bootstrap5/js/channels.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ VuFind.register('channels', function Channels() {
data: {tab: 'description'}
})
.done(function channelPopoverDone(data) {
var newContent = '<div class="btn-group btn-group-justified">'
var newContent = '<div class="d-flex">'
+ '<div class="btn-group flex-fill">'
+ '<a href="' + VuFind.path + '/Channels/Record?'
+ 'id=' + encodeURIComponent(record.attr('data-record-id'))
+ '&source=' + encodeURIComponent(record.attr('data-record-source'))
+ '" class="btn btn-default">' + VuFind.translate('channel_expand') + '</a>'
+ ' <a href="' + record.attr('href') + '" class="btn btn-default">' + VuFind.translate('View Record') + '</a>'
+ '</div>'
+ '</div>'
+ data;
loadingPopover.dispose();
new bootstrap.Popover(
Expand Down
2 changes: 1 addition & 1 deletion themes/bootstrap5/js/visual_facets.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function settext() {
}

function setscreenreader() {
this.attr("class", "sr-only")
this.attr("class", "visually-hidden")
.text(function createTextForScreenReader(d) {
if (typeof d.parentfield !== "undefined") {
return VuFind.translate('visual_facet_parent') + " " + d.parentlevel;
Expand Down
8 changes: 6 additions & 2 deletions themes/bootstrap5/scss/bootstrap-variable-overrides.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// From a11y:
// These colors ensure proper contrast:
$primary: #265680 !default;
$success: #028302 !default;
$info: #1C5F74 !default;
Expand All @@ -18,6 +18,9 @@ $warning-border-subtle: darken(adjust-hue($warning-bg-subtle, -10), 5%) !def
$danger-bg-subtle: #f2dede !default;
$danger-border-subtle: darken(adjust-hue($danger-bg-subtle, -10), 5%) !default;

$input-border-color: #888 !default;
$form-select-border-color: #888 !default;

$breadcrumb-bg: #f5f5f5 !default;
$breadcrumb-padding-y: 8px !default;
$breadcrumb-padding-x: 15px !default;
Expand Down Expand Up @@ -47,6 +50,8 @@ $form-switch-bg-image-dark: none !default;
$navbar-dark-toggler-icon-bg: none !default;
$navbar-light-toggler-icon-bg: none !default;

$enable-caret: false !default;

$link-hover-decoration: underline !default;
$icon-link-underline-offset: inherit !default;

Expand All @@ -60,5 +65,4 @@ $enable-smooth-scroll: false !default;
$enable-validation-icons: false !default;
$form-select-indicator-padding: .75rem !default;

$table-bg-accent: #f9f9f9 !default;
$table-striped-bg: #f9f9f9 !default;
Loading