No Code Attached Yet
avatar sandewt
sandewt
15 Dec 2022

Steps to reproduce the issue

Nowadays joomla uses bootstrap 5. The used class="label" is a call from a previous bootstrap version and no longer exists.
See module: Language Switcher

Expected result

For example:
<span class="badge bg-light text-dark" title="<?php echo $language->title_native; ?>"><?php echo strtoupper($language->sef); ?></span>
or
<span class="badge bg-secondary" title="<?php echo $language->title_native; ?>"><?php echo strtoupper($language->sef); ?></span>

Actual result

<span class="label" title="<?php echo $language->title_native; ?>"><?php echo strtoupper($language->sef); ?></span>

System information (as much as possible)

J4: See file

Additional comments

This is probably an old class from bootstrap 3.

avatar sandewt sandewt - open - 15 Dec 2022
avatar sandewt sandewt - change - 15 Dec 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 15 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 15 Dec 2022
avatar sandewt sandewt - change - 15 Dec 2022
The description was changed
avatar sandewt sandewt - edited - 15 Dec 2022
avatar sandewt sandewt - change - 15 Dec 2022
The description was changed
avatar sandewt sandewt - edited - 15 Dec 2022
avatar ayushanand16
ayushanand16 - comment - 15 Dec 2022

@sandewt I would like to work on this issue.

avatar brianteeman
brianteeman - comment - 15 Dec 2022

and how you do know that someone is not using that class in their template?

avatar sandewt
sandewt - comment - 15 Dec 2022

and how you do know that someone is not using that class in their template?

  • I used this class in the past, but switched to the bootstrap 5.0 badge class.
  • I encountered the class="label" in the libraries of @regularlabs.

The question is whether we should allow this obsolete class="label" to continue. I would suggest remove and replace this class.
In addition, the badge class is used extensively in J4.

Bootstrap 3 (obsolete): https://getbootstrap.com/docs/3.3/components/#labels

Bootstrap 5 (current): https://getbootstrap.com/docs/5.0/components/badge/

avatar sandewt
sandewt - comment - 15 Dec 2022

@sandewt I would like to work on this issue.

@ayushanand16 Of course, that's up to you ?

avatar brianteeman
brianteeman - comment - 15 Dec 2022

I encountered the class="label" in the libraries of @regularlabs.

and that is the perfect example of why it should not be removed.

I do remember someone went thourgh and changed label to badge BEFORE j4 was released but the must have missed this one.

avatar regularlabs
regularlabs - comment - 15 Dec 2022

I don't mind the use of class="label" being removed from Joomla.
There was indeed one occurrence in my code that was mimicking the HTML of the language label in Joomla.
I have already changed it in my code (which will be pushed into next versions).

Currently the Joomla admin template gives no CSS styling to the label class.
So this could only be a minor 'issue' for custom/3rd-party admin templates that do include specific styling for that.
Buy changing class="label" to class="badge bg-secondary" would in my view not cause any issues. As other admin templates would also have CSS for that (as it is used a lot in other places in Joomla).

avatar sandewt
sandewt - comment - 15 Dec 2022

Another argument, to change the class name:

Line 90 is completely identical to line 105, with the only difference being the classes. Perhaps something went wrong here in the past?

<span class="label" title="<?php echo $language->title_native; ?>"><?php echo strtoupper($language->sef); ?></span>

<span class="badge bg-secondary" title="<?php echo $language->title_native; ?>"><?php echo strtoupper($language->sef); ?></span>

avatar chmst
chmst - comment - 16 Dec 2022

I am fine with this change.

avatar legendary0911
legendary0911 - comment - 21 Dec 2022

i would like to work on this issue

avatar sandewt
sandewt - comment - 21 Dec 2022

@sandewt I would like to work on this issue.

i would like to work on this issue

All initiatives are appreciated

avatar sandewt
sandewt - comment - 8 Jan 2023

and that is the perfect example of why it should not be removed.

A new insight is that this is (possibly) a b/ c break .
See #39568

avatar sandewt sandewt - close - 12 Jan 2023
avatar sandewt
sandewt - comment - 12 Jan 2023

b/ c break

avatar sandewt sandewt - change - 12 Jan 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-01-12 12:03:19
Closed_By sandewt

Add a Comment

Login with GitHub to post a comment