-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: wp-895 menu bugs since bootstrap 5 #1073
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1073 +/- ##
=======================================
Coverage 70.34% 70.34%
=======================================
Files 538 538
Lines 33328 33328
Branches 2953 2953
=======================================
Hits 23446 23446
Misses 9684 9684
Partials 198 198
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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.
Notes for reviewers.
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.
|
||
/* Make (CMS) Bootstrap 4 toggle compatible with (Portal) Bootstrap 5 */ | ||
[ ...container.querySelectorAll('[data-toggle]')].forEach(toggle => { | ||
const cmsUsesBootstrap4Toggle = ( | ||
toggle.dataset.toggle !== undefined && | ||
toggle.dataset.bsToggle === undefined | ||
) | ||
|
||
if ( cmsUsesBootstrap4Toggle ) { | ||
toggle.dataset.bsToggle = toggle.dataset.toggle; | ||
delete toggle.dataset.toggle; | ||
console.log( | ||
'Replaced `data-toggle` with `data-bs-toggle` in `#s-cms-nav`.', | ||
'To not need this, update CMS Bootstrap from 4 to 5.' | ||
) | ||
} | ||
}); |
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.
Like my working fix in CMS for Portal nav, but reversed.
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.
Works locally, and LGTM
PR TACC/Core-Portal#1073/1066 fixes portal nav dropdown menu alignment. But that breask alignment for CMS, because CMS uses old Bootstrap.
* fix: WP-894 portal nav dropdown menu alignment PR TACC/Core-Portal#1073/1066 fixes portal nav dropdown menu alignment. But that breask alignment for CMS, because CMS uses old Bootstrap. * refactor: make fix independent of similar fix * fix: missing punctuation
Overview
Do not let Portal Nav dropdown menu be positioned off-screen horizontally.Fix moved to Fix: Workbench drop down menu is cut off on the right. #1066.
Important
Upon merge, notify @shayanaijaz, so he can update Digital Rocks Portal branch(es).
Related
Changes
Testing
3. Portal Nav Dropdown Off-Screen
Also fixed in #1066.
4. CMS Dropdown Menu Not Opening
5. Fix Navbar Toggle Not Working
UI
3. Portal Nav Dropdown Off-Screen
fix.nav.position.more.mov
Also fixed in #1066.
4. CMS Dropdown Menu Not Opening
Fixed
cms.dropdown.menu.dev-cep.works.mov
Warning
Unable to test locally because of WP-897.
Broken
cms.dropdown.menus.BROKEN.mov
5. Fix Navbar Toggle Not Working
Fixed
navbar.expand-collapse.FIXED.mov
Broken
navbar.expand-collapse.BROKEN.mov