NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar dgrammatiko
dgrammatiko
25 Jan 2021

Pull Request for Issue # .

Summary of Changes

Use a global object named bootstrap instead of the Joomla.Bootstrap

WHY?

This is my fault, let me explain: Joomla has 2 instances (tabs and modals) where it kinda uses it's own constructor (eg some specific tasks executed before initialising the interactive elements). When I was implementing this JS part of BS5 I thought a Joomla registry was a good idea. Never ever ship code that was a nice idea. The problem is that Bootstrap documentation in such case is referring to objects that don't actually exist in the document. I'm sorry, this was a terrible idea

Testing Instructions

Check the dropdowns in the dashdoard
Check the modals in the Article Edit
Check the Accordion in the Menu edit (select new component)
Check the tabs in the tinyMCE plugin (set0... )

Actual result BEFORE applying this Pull Request

Bootstrap docs don't actually reflect the methods of the interactive components

Expected result AFTER applying this Pull Request

Code is the same but the Bootstrap docs reflect exactly what exists in our codebase

Example of the code that reflects BS docs

Screenshot 2021-01-25 at 18 31 58
Screenshot 2021-01-25 at 18 36 40
Screenshot 2021-01-25 at 18 39 41

Documentation Changes Required

The Bootstrap Docs is our documentation but we still need to document the Bootstrap.php methods

@wilsonge sorry mate for the mess, this needs to be merged ASAP

avatar dgrammatiko dgrammatiko - open - 25 Jan 2021
avatar dgrammatiko dgrammatiko - change - 25 Jan 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jan 2021
Category JavaScript Repository NPM Change
avatar dgrammatiko dgrammatiko - change - 25 Jan 2021
Labels Added: NPM Resource Changed ?
6544126 25 Jan 2021 avatar dgrammatiko Typo
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jan 2021
Category JavaScript Repository NPM Change Repository JavaScript NPM Change Libraries
avatar ceford
ceford - comment - 26 Jan 2021

I applied the patch, ran npm ci and checked that the various things mentioned still worked. They did. But I don't really understand what I am looking for. Should I expect to see visible changes in the rendered html? I think this is a pass but I am not sure!


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

avatar dgrammatiko
dgrammatiko - comment - 26 Jan 2021

But I don't really understand what I am looking for

The changes affect only the exposed global object so it's only for very advanced developers. Thanks for testing

avatar wilsonge wilsonge - change - 26 Jan 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-01-26 22:12:01
Closed_By wilsonge
avatar wilsonge wilsonge - close - 26 Jan 2021
avatar wilsonge wilsonge - merge - 26 Jan 2021
avatar wilsonge
wilsonge - comment - 26 Jan 2021

LGTM and tested myself locally too. Thanks!

avatar dgrammatiko
dgrammatiko - comment - 26 Jan 2021

Thanks and sorry for the mess

avatar wilsonge
wilsonge - comment - 26 Jan 2021

Don't worry :)

Add a Comment

Login with GitHub to post a comment