Skip to content

[6.0] Drop Bootstrap::framework #44991

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

Open
wants to merge 16 commits into
base: 6.0-dev
Choose a base branch
from

Conversation

dgrammatiko
Copy link
Contributor

@dgrammatiko dgrammatiko commented Feb 24, 2025

Pull Request for Issue # .

Summary of Changes

  • B/C break
  • Drop Bootstrap::framework Since J4 any bootstrap (js) component should be specifically loaded, the framework fn was kept for compatibility

Testing Instructions

  • code review
  • Add HTMLHelper::_('bootstrap.framework'); somewhere in the index.php of the atum template
  • Check that all the BS components are registered

Screenshot 2025-02-24 at 11 43 22

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org: PR

  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added NPM Resource Changed This Pull Request can't be tested by Patchtester PR-6.0-dev labels Feb 24, 2025
Copy link
Member

@HLeithner HLeithner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please do only on chance in one pr.

  • you update package-lock.json (version numer)
  • you change code style
  • you use deprecated Factory::getDocument()

and the only thing this PR should do is to remove lines 588 to 616 in the Bootstrap.php

@HLeithner HLeithner added the b/c break This item changes the behavior in an incompatible why. HEADS UP label Feb 24, 2025
@joomla-cms-bot joomla-cms-bot removed the NPM Resource Changed This Pull Request can't be tested by Patchtester label Feb 24, 2025
@laoneo
Copy link
Member

laoneo commented Feb 24, 2025

Istead fo removing, I would move it to the compat plugin.

@Hackwar
Copy link
Member

Hackwar commented Feb 24, 2025

Do we have to add the deprecated tag to the methods in the compat plugin as well?

@dgrammatiko
Copy link
Contributor Author

Do we have to add the deprecated tag to the methods in the compat plugin as well?

To me it feels redundant, as it will never show up in the IDE

@Hackwar
Copy link
Member

Hackwar commented Feb 24, 2025

I agree that it wont show up in the IDE, but it will prevent any discussions in the future about removal and deprecation if you move the tag from the old code also over to the new code.

@Hackwar
Copy link
Member

Hackwar commented Feb 24, 2025

Thank you!

@softforge
Copy link
Contributor

@dgrammatiko I like this change and the addition to the compatibility plugin, to then remove it after.
Can you do as @HLeithner suggested and we can get testing done and merge it

@HLeithner
Copy link
Member

the implementation in the b/c plugin is not optimal.

please add a new Class for this function and also an option to disable "all html helper functions" (do we have more?) and make it as option please.

@dgrammatiko
Copy link
Contributor Author

dgrammatiko commented Feb 24, 2025

please add a new Class

what namespace? is namespace Joomla\Plugin\Behaviour\Compat\HTML\Bootstrap ok?

and also an option

simple toggle should be ok here?

@softforge the first batch of requests is already done, I'll do the lest 2 later on (or tomorrow)

@HLeithner
Copy link
Member

yes namespace is ok, we already have yes/no fields in the config. something like that

@joomla-cms-bot joomla-cms-bot added the Language Change This is for Translators label Feb 24, 2025
@dgrammatiko
Copy link
Contributor Author

  • toggler added
  • moved to own class

Screenshot 2025-02-24 at 19 24 54

@Fedik Fedik added the Removal Removes functionality label Feb 27, 2025
@Fedik
Copy link
Member

Fedik commented Feb 27, 2025

I have tested this item ✅ successfully on 30d3736


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44991.

@@ -8,6 +8,8 @@ PLG_COMPAT_FIELD_CLASSES_ALIASES_LABEL="Classes Aliases"
PLG_COMPAT_FIELD_CLASSES_ALIASES_DESCRIPTION="Add class aliases for classes which have been renamed or moved to a namespace."
PLG_COMPAT_FIELD_ES5_ASSETS_DESCRIPTION="Activate this option if your extension requires *.es5 assets which has resulted in an exception. The assets provided are empty but prevent the exception."
PLG_COMPAT_FIELD_ES5_ASSETS_LABEL="ES5 Assets"
PLG_COMPAT_FIELD_HTML_HELPERS_DESCRIPTION="Activate this option if your extension requires deprecated HTMLHelper classes or functions. When enabled, will provide backward compatibility to the prior major version."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not state the version number

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried the not original take here and I copied that part from here:

PLG_COMPAT_XML_DESCRIPTION="If you use extensions which are not using the current Joomla Coding standards then this plugin, when enabled, will provide backward compatibility to the prior major version."

@@ -8,6 +8,8 @@ PLG_COMPAT_FIELD_CLASSES_ALIASES_LABEL="Classes Aliases"
PLG_COMPAT_FIELD_CLASSES_ALIASES_DESCRIPTION="Add class aliases for classes which have been renamed or moved to a namespace."
PLG_COMPAT_FIELD_ES5_ASSETS_DESCRIPTION="Activate this option if your extension requires *.es5 assets which has resulted in an exception. The assets provided are empty but prevent the exception."
PLG_COMPAT_FIELD_ES5_ASSETS_LABEL="ES5 Assets"
PLG_COMPAT_FIELD_HTML_HELPERS_DESCRIPTION="Activate this option if your extension requires deprecated HTMLHelper classes or functions. When enabled, will provide backward compatibility to the prior major version."
PLG_COMPAT_FIELD_HTML_HELPERS_LABEL="HTML Helpers"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to avoid confusion should this not be specific and refer to boostrap html helpers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, Harald suggested one switch for all (probably there are more, haven't really checked) of them: #44991 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW one or multiple switches is fine by me

@laoneo laoneo removed the Removal Removes functionality label Feb 28, 2025
@richard67
Copy link
Member

I've allowed myself to fix the conflicts in files "plugins/behaviour/compat/compat.xml" and "administrator/language/en-GB/plg_behaviour_compat.ini" which were caused by the recent merged of PR #44240 .

@dgrammatiko
Copy link
Contributor Author

@softforge any interest here?

@dgrammatiko dgrammatiko force-pushed the 6.0-dev/remove-bs-fw branch from 0d3a1c2 to cd3ca4e Compare July 17, 2025 19:52
@dgrammatiko
Copy link
Contributor Author

@softforge ping

@softforge
Copy link
Contributor

Im getting ready for alpha3 but will take a look over the weekend. Im still seeing one issue form @HLeithner , @HLeithner is it all good from your point of view?

@dgrammatiko
Copy link
Contributor Author

This should be ok now

@HLeithner
Copy link
Member

I would prefer to move the event to onAfterInitialise, it's a bit earlier. after this it should be ready to merge

@dgrammatiko
Copy link
Contributor Author

The class is now using the onAfterInitialise event as requested

@heelc29
Copy link
Contributor

heelc29 commented Jul 28, 2025

Look like still used


HTMLHelper::_('bootstrap.framework');

Test in backend that the styles list -- can open options (failed) Test in backend that the templates list -- can open options (failed)

@dgrammatiko
Copy link
Contributor Author

The dropdown helper should be removed as I think it doesn’t even work (ie it uses jquery code without loading the jquery lib) 😃

the config just needs to load manually some things

I’ll update the pr

@dgrammatiko dgrammatiko force-pushed the 6.0-dev/remove-bs-fw branch from d7a4256 to 9c4941c Compare August 15, 2025 18:45
@dgrammatiko
Copy link
Contributor Author

@heelc29 so I fixed both the 2 existing instances, in the case of dropdown we just load the dropdown module in the case of com_config the addition of bootstrap.framework was done with aa661a1 but it's not needed anymore as for the tabs we are not using bootstrap anymore!

Co-authored-by: Quy Ton <quy@nomonkeybiz.com>
@richard67 richard67 dismissed HLeithner’s stale review August 16, 2025 12:31

Requested changes have been made.

@bembelimen bembelimen added the bug label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b/c break This item changes the behavior in an incompatible why. HEADS UP bug Language Change This is for Translators PR-6.0-dev
Projects
None yet
Development

Successfully merging this pull request may close these issues.