-
Notifications
You must be signed in to change notification settings - Fork 359
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
[VUFIND-1746] Drop bs3-compat.js #4224
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @EreMaijala, this looks good to me and all tests are passing -- it just raised a few minor questions and ideas.
I'm also going to ask @sturkel89 to take a look at this, since her attentive eye might spot something visual that the test suite is overlooking.
For @sturkel89: here is a list of some of the areas where things have changed, so you can focus your testing accordingly. I think generally speaking we want to be sure that things look normal/okay in both bootstrap5 and sandal5. I realize that this could take a really long time to work through, so I don't necessarily expect a thorough attack on every angle. I'm also happy to elaborate on anything I mention that's unclear or that you haven't tested before. Might be helpful for @EreMaijala to highlight whether there are things here that he didn't have time to test himself or has particular concerns about.
- Channels (particularly the menu for adding more of them)
- Expanding/collapsing things (particularly facets, the summary list when performing cart actions, and the DPLATerms/RandomRecommend modules)
- Tab behavior on records and collections
- On-screen virtual keyboards
- Multiple CAPTCHA behavior
- Drop-down menus (e.g. language/theme selectors)
- Drop-down options in forms (e.g. in the hierarchy search control, on the admin screens, in course reserves, etc.)
- Breadcrumbs on most pages
- The mobile hamburger menu in the header
- The account side menu
- The accordion and tabs views in search results
- The home page in the local_theme_example theme
@@ -26,11 +26,11 @@ | |||
// Set up breadcrumbs: | |||
$lastSearch = $this->searchMemory()->getLastSearchLink($this->transEsc('Search')); | |||
if (!empty($lastSearch)) { | |||
$this->layout()->breadcrumbs = '<li>' . $lastSearch . '</li> '; | |||
$this->layout()->breadcrumbs = '<li class="breadcrumb-item">' . $lastSearch . '</li> '; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There has been talk in the past about creating a breadcrumbs view helper. All this formal markup across the templates makes me think the need for that may now be even greater than before. What do you think? Is this worth putting on the to-do list somewhere? Maybe we should look at the ancient discussion on VUFIND-747 and see if it's worth charting a new course forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would make a lot of sense, and it's not nice that we have the markup scattered all over the templates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just left some thoughts on that ticket -- we can move further discussion over there.
?> | ||
<h2><?=$this->transEsc('User Account')?></h2> | ||
<?=$this->flashmessages()?> | ||
|
||
<form method="post" name="accountForm" id="accountForm" class="form-user-create" data-bs-toggle="validator"> | ||
<form method="post" name="accountForm" id="accountForm" class="form-user-create" data-toggle="validator"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just trying to understand what's going on here: was the old data-bs-toggle a typo? I thought BS5 added more -bs-
specifiers to attributes, so I'm curious why this is being removed. Is this not a Bootstrap mechanism at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was a mistake. Validator is not part of Bootstrap but a separate module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a fix we should consider backporting to release-10.1, then, or does the bs3-compat straighten it out there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll provide a separate fix for release-10.1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I'll provide a separate fix for both Bootstrap 3 and Bootstrap 5 for release-10.1, and the Bootstrap 5 part can then be forward-ported to dev. It's better to use Bootstrap's own separate mechanism in Bootstrap 5, and the old validation library is no longer supported anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #4227.
Thanks, @EreMaijala, this is looking good to me but I'll wait to approve until @sturkel89 finishes testing (probably early next week). In the meantime, do you want to take a stab at drafting the changelog notes, or should I? Would detailed notes actually belong on the existing bootstrap5 page? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this PR in both themes and compared with dev. Most functions are fine; I uncovered only two issues that work differently between test and dev and could use some attention.
Tag Management buttons
On Admin screens, under Tag Maintenance, the List Tags and Manage Tags buttons appear as words, rather than buttons, on test in both themes. I'll provide screenshots in Sandal5.
http://localhost/vufind_test/Admin/Tags/Manage
Multiple CAPTCHA options
I set up three CAPTCHA options in config.ini. In the test branch, only the first named CAPTCHA option is enabled; the other two are not clickable. Also, the CAPTCHA options are not displayed as tabs in either lightbox or on full screen.
![](https://private-user-images.githubusercontent.com/107194029/409281398-5620b482-58ad-4819-b15c-6c42191274dd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjM4ODEsIm5iZiI6MTczOTI2MzU4MSwicGF0aCI6Ii8xMDcxOTQwMjkvNDA5MjgxMzk4LTU2MjBiNDgyLTU4YWQtNDgxOS1iMTVjLTZjNDIxOTEyNzRkZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwODQ2MjFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03ZjU4YWQ4ODViNzAzYWY4MzgzZDc0MjllYWQyODYwYzE3ZDgzMTM1NTJjZTU1MWM2YjFmN2FhYjVmMDliNTk1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QBjAyQ1uCQWzF1gp0UDOHsP3nJH-nmIXhsQyctmUJfE)
On dev, all three CAPTCHA options are enabled. However, in lightbox, the labels are run together rather than being displayed in tabs.
![](https://private-user-images.githubusercontent.com/107194029/409281922-01ee4d29-64e2-4bf5-a125-a4921a338f6e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjM4ODEsIm5iZiI6MTczOTI2MzU4MSwicGF0aCI6Ii8xMDcxOTQwMjkvNDA5MjgxOTIyLTAxZWU0ZDI5LTY0ZTItNGJmNS1hMTI1LWE0OTIxYTMzOGY2ZS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwODQ2MjFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hYmNmMjYzNjc2NDUyNmNlNTkwNzBiOWYyNGQyN2JlZWRlMmY1MzE1NDkzOGM1NmM0NmRjZTY3MGNiZTg4ZTMwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.9IQvZiBMW8cPW8r7zaRBWoV3Qsn93c8ht80pJMNkRJ4)
![](https://private-user-images.githubusercontent.com/107194029/409281987-8e3e61e9-baff-4685-a856-ac4bb06f4eab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNjM4ODEsIm5iZiI6MTczOTI2MzU4MSwicGF0aCI6Ii8xMDcxOTQwMjkvNDA5MjgxOTg3LThlM2U2MWU5LWJhZmYtNDY4NS1hODU2LWFjNGJiMDZmNGVhYi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwODQ2MjFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNDE1ZDAzMTA3NGU1OWFlNmU4MDU4YWY4MmZjYzFiY2YzNTU1NTNmYTJiZjU1Mzg5N2M0N2EyZTYxNzZjMGNkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.E3yqNPLcjLHDxNYFwAcC0UJOiNBJ-1YfOZz08PNjzkU)
In other words, nowhere in bootstrap5 do lightboxes handle multiple CAPTCHA options as tabs. But in the test branch, an additional problem is that only the first CAPTCHA option can be selected when there are multiple options configured.
@sturkel89 Thanks for the feedback. Both issues should now be fixed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I revisited the places where things weren't quite right yesterday - and they are all fixed! Thanks!
FYI - I discovered an obscure little bug while testing this branch: "Show other versions" does several weird things when you're in the accordion view of search results. The behavior was the same on test and dev, so I didn't report it in my review. I have not looked at an old release to see if the behavior is different in the bootstrap3 environment. Demian said to open a JIRA ticket so we wouldn't forget about this. Here it is: VUFIND-1753. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @EreMaijala and @sturkel89. I think this is ready to merge, but I wasn't sure about the best approach to the changelog notes. @EreMaijala, do you have anything in mind? If not, maybe we can discuss tomorrow before hitting the merge button.
@demiankatz I updated the Bootstrap 5 page section about the compatibility layer yesterday. I think that the change log entry could point to that. Perhaps something like this right after the entry about removal of Bootstrap 3 themes:
|
Thanks, @EreMaijala, I have updated the changelog as you suggested! |
(cherry picked from commit 854992f)
This set of changes eliminates the need for bs3-compat.js in VuFind's templates, other JS and styles.
TODO: