Problem/Motivation

In the current implementation, all Bootstrap libraries (CSS and JS) are attached globally in Layout Builder, even when no Bootstrap-based plugins or components are selected. This leads to unnecessary asset loading, increasing page weight and affecting performance.

Proposed resolution

  • Update the bootstrap_styles module to conditionally attach the Bootstrap libraries only when a Bootstrap-based plugin or style is selected.
  • Implement a check within the Layout Builder rendering pipeline to evaluate whether the selected layout or block requires Bootstrap assets.
CommentFileSizeAuthor
#11 03.png23.57 KBeric.vvf
#11 01.png202.3 KBeric.vvf
#11 00.png40.83 KBeric.vvf
#3 3515075-3.patch6.89 KBqusai taha
#2 3515075-2.patch7.06 KBqusai taha
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

qusai taha created an issue. See original summary.

qusai taha’s picture

StatusFileSize
new7.06 KB
qusai taha’s picture

StatusFileSize
new6.89 KB

Patch for 1.2.x

qusai taha’s picture

Status: Active » Needs review

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Version: 2.0.x-dev » 1.2.x-dev
Assigned: qusai taha » Unassigned
Status: Needs review » Needs work

qusai taha’s picture

New MR created for 1.2.x

qusai taha’s picture

Status: Needs work » Needs review
eric.vvf’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new40.83 KB
new202.3 KB
new23.57 KB

The patch #3 work as expected.

Background color configuration:
Color Config

Assets before the patch
before the patch

Assets after the patch
before the patch

rajab natshah’s picture

Category: Task » Bug report

rajab natshah’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +bootstrap_styles-1.2.3

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajab natshah’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.