Move all Bootstrap ~5.3.0 JavaScript libraries to Single Directory Components (SDC) in Varbase Components

Created on 22 February 2024, 9 months ago
Updated 16 April 2024, 7 months ago

Problem/Motivation

Loading all the Bootstrap ~5.3.0 Javascript behaviors in all pages.
Moving with Single Directory Components (SDC) needs to load all JS in all components too.

Needed for a better SDC way in Drupal and Storybook

Proposed resolution

Using the following libraries

  • Popperjs core: varbase_components/popper-script
  • Bootstrap Base component script: varbase_components/bs-base-component-script
  • --
  • Bootstrap alert script: vartheme_bs5/bs-alert-script
  • Bootstrap button script: vartheme_bs5/bs-button-script
  • Bootstrap carousel script: vartheme_bs5/bs-carousel-script
  • Bootstrap collapse script: vartheme_bs5/bs-collapse-script
  • Bootstrap dropdown script: vartheme_bs5/bs-dropdown-script
  • Bootstrap modal script: vartheme_bs5/bs-modal-script
  • Bootstrap offcanvas script: vartheme_bs5/bs-offcanvas-script
  • Bootstrap popover script: vartheme_bs5/bs-popover-script
  • Bootstrap scrollspy script: vartheme_bs5/bs-scrollspy-script
  • Bootstrap tab script: vartheme_bs5/bs-tab-script
  • Bootstrap toast script: varbase_components/bs-toast-script
  • Bootstrap tooltip script: vartheme_bs5/bs-tooltip-script

And allow to override libraries in the theme.

libraries-override:
  varbase_components/popper-script: vartheme_bs5/popperjs-script
  varbase_components/bs-base-component-script: vartheme_bs5/bs-base-component-script
  varbase_components/bs-alert-script: vartheme_bs5/bs-alert-script
  varbase_components/bs-button-script: vartheme_bs5/bs-button-script
  varbase_components/bs-carousel-script: vartheme_bs5/bs-carousel-script
  varbase_components/bs-collapse-script: vartheme_bs5/bs-collapse-script
  varbase_components/bs-dropdown-script: vartheme_bs5/bs-dropdown-script
  varbase_components/bs-modal-script: vartheme_bs5/bs-modal-script
  varbase_components/bs-offcanvas-script: vartheme_bs5/bs-offcanvas-script
  varbase_components/bs-popover-script: vartheme_bs5/bs-popover-script
  varbase_components/bs-scrollspy-script: vartheme_bs5/bs-scrollspy-script
  varbase_components/bs-tab-script: vartheme_bs5/bs-tab-script
  varbase_components/bs-toast-script: vartheme_bs5/bs-toast-script
  varbase_components/bs-tooltip-script: vartheme_bs5/bs-tooltip-script
  content_moderation/content_moderation: vartheme_bs5/content_moderation

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.0.0-rc2 , vartheme_bs5-3.0.0-beta7

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3423178 : Moved all Bootstrap ~5.3.0 JavaScript libraries to Single Directory Components (SDC) in Varbase Components
📌 Task
Status

Fixed

Version

3.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024