? Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
10 Nov 2018

Pull Request for Issue # N.A.

Summary of Changes

This pull request (PR) cleans up the Cassiopeia template and SQL scripts for installation of core and sample data from unused copy-and-paste remainders coming from Joomla 3 by doing 3 things:

  1. Remove unused module class (formerly called module class suffix) "_menu" from menu modules.
  2. Remove unused menu class (formerly called menu class suffix) "nav-pills" from menu modules and contact links.
  3. Remove handling of not existing parameter "templateColor" from offline page of Cassiopeia template.

These three changes are separated to three commits, so maintainers can cherry-pick some of the changes if not all three are accepted.

Where do these changes apply:

  1. The module class "_menu" is added to the default "Main Menu" on new installation of J4, to diverse menus in testing sample data and to the language-specific main menus in multilanguage sample data, but it has no effect on styling, and when creating a new menu, it is not added, which is an inconsistency between the pre-defined menus mentioned before and a newly created menu.
  2. The menu class "nav-pills" is added in blog sample data for menus at module position "top-a", e.g. the "Main Menu Blog", but it has no effect, i.e. Bootstrap nav-pills does not work in Cassiopeia in general. It is also added to the contact links but has also no effect, and finally it is used in the handling of the not existing parameter "templateColor" in the offline.php of the cassiopesia template.
  3. The offline.php of the cassiopesia template adds CSS if the parameter "templateColor" was set in the template style's advanced options of that template, but that template does not have any parameter like this.

Testing Instructions

Experienced maintainers or reviewers:

Code review should be enough.

Normal testers:

Install new J4 (e.g. alpha 5 or a later nightly build) with blog sample data.

  1. Verify in advanced options of menu modules that in some case module class "_menu" is present, and in some other cases menu class "nav-pills" is present.
  2. Check the menus with menu class "nav-pills" on the site (frontend) and verify that the menus do not look like Bootstrap's "nav-pills" but look like all other menus, which are vertical menus.
    Create a contact with contact links and a menu item for that contact.
    Check the contact page on the site (frontend): The links do not look like Bootstrap's "nav-pills" but look like vertical menus. Make a screenshot of the contact page.
  3. Check that nowhere in the options of the Cassiopeia template is any option for template colors. Set the site offline and make a screenshot of the offline page.

Now unpack the install package which you have used, apply the changes from this PR, pack it again and make a new installation with that modified package.

Or use the modified nightly build from today available here: (obsolete link removed)

Install blog sample data. Create a contact and a menu item for it in the same way as before with the unmodified installation. Check with this new installation that:

  1. Menus which had module class "_menu" with the unmodified installation now do not have this menu class, and they look the same as before with the unmodified new installation.
  2. Menus which had menu class "nav-pills" with the unmodified installation now do not have this menu class, and they look the same as before with the unmodified new installation. Verify that the contact page looks the same as before with the unmodified installation.
  3. Set the site offline. Verify that the offline page looks the same as before with the unmodified installation.

Expected result

None of the menu modules coming with a new installation or any kind of sample data contains any module class "_menu" or menu class "nav-pills", which is consistent with a newly created menu module.

The default_links.php template of com_contacts does not add class "nav-pills" to the links list, which would have no visual effect.

The Cassiopeia template's offline page does not handle a not existing option about template colors, which clearly was a remainder from copying stuff from J3's Protostar template.

Actual result

The opposite of the expected result.

Some examples on the incisistency of menu module css classes:

  1. Module "Main Menu" after a new installation:
    screen shot 2018-11-10 at 15 50 41

  2. A newly created menu module:
    screen shot 2018-11-10 at 15 51 09

  3. Module "Main Menu Blog" after blog sample data installation:
    screen shot 2018-11-10 at 15 51 39

Documentation Changes Required

No idea. Check if menu class "nav-pills" and module class "_menu" are referred somewhere in J4 docs.

avatar richard67 richard67 - open - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Nov 2018
Category Front End com_contact SQL Installation Postgresql Plugins Templates (site)
avatar richard67 richard67 - change - 10 Nov 2018
Title
[4.0] Clean up unused CSS classes and unused template color option from the Cassiopeia template
[4.0] Clean up unused CSS classes in menus and contact links and unused template color option of the Cassiopeia template
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67
richard67 - comment - 10 Nov 2018

@infograf768 Could you review the sample data parts?
@ciar4n Could you review the Cassiopeia template's offline page and the irrelevance of the removed classes "_menu" and "nav-pills" in the Cassiopeia template's SCSS?

avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67
richard67 - comment - 10 Nov 2018

To maintainers: Drone build failure is not related to this PR.

avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 10 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 10 Nov 2018
avatar richard67 richard67 - change - 11 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 11 Nov 2018
avatar richard67
richard67 - comment - 11 Nov 2018

I will make separate PRs for the particular issues for easier testing.

avatar richard67 richard67 - change - 11 Nov 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-11-11 11:56:02
Closed_By richard67
Labels Added: ?
avatar richard67 richard67 - close - 11 Nov 2018
avatar richard67 richard67 - change - 11 Nov 2018
The description was changed
avatar richard67 richard67 - edited - 11 Nov 2018
avatar richard67
richard67 - comment - 11 Nov 2018

Removed obsolete download link.


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

avatar ciar4n
ciar4n - comment - 12 Nov 2018

Yes both _menu and nav-pill classes can and should be removed imo.

avatar richard67
richard67 - comment - 12 Nov 2018

@ciar4n with nav-pills in sample data I am not sure. Maybe it will be supported again in some future in the Cassiopeia template, or maybe there will be another way for having horizontal menus in position top-a, and then it would be easier to find and replace by the new menu class in the blog sampledata plugin.

With _menu I am sure it should be removed from sampledata and installation sql.

So or so I will make 2 new, separate PRs for removing them.

avatar richard67
richard67 - comment - 12 Nov 2018

New pull requests are #23035 (already merged), #23054 and #23055 .

avatar ciar4n
ciar4n - comment - 12 Nov 2018

I presume when you say supporting classes like nav-pills, you are referring to been able to add such classes to the 'Module Class' field? Previously the module class location seemed to be largely dictated by Bootstrap so likely to be placed anywhere. In J4 that class has been moved to be consistently on the outside container.

To answer I would say nav-pills can be safely removed. In Joomla's current state such a class would be added to an override rather than the database.

avatar richard67
richard67 - comment - 12 Nov 2018

@ciar4n Thanks for your feedback. It seems I have to learn a lot new things in J4. For removal of the last remainders of nav-pills see my new PR #23055 .

Add a Comment

Login with GitHub to post a comment