User tests: Successful: 2 Quy, sandramay0905 Unsuccessful: 0
Pull Request for Issue #32978
Using buttons instead of badges to display lang tags for articles associations.
(see f7833a4 as example)
Using full lang tag in button to let choose when we have the same language for different countries: de-DE, de-AT,
----EDIT: Creating btn-secondary and btn-sm overrides
Create a multilingual site with the specific sample data.
Create a list category for the category concerned by the associated articles per default.
Make sure Articles Options Associations are set and not use flags
Load Home page. Load list category menu item.
patch and test again.
Needs npm
Note: may need some more concerning a11y
Status | New | ⇒ | Pending |
Category | ⇒ | Front End com_content Layout Templates (site) NPM Change |
Labels |
Added:
NPM Resource Changed
?
|
@sandramay0905 You can test it by download update package for this PR https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/32992/downloads/41573/Joomla_4.0.0-beta8-dev+pr.32992-Development-Update_Package.zip , go to System -> Update -> Joomla, open Upload & Update tab, select that package, click on Upload & Install button
It seems wrong to me to be adding this class to the bootstrap file as that is really for overrides not for new classes
I dont see why you are inventing a new class of btn-badge and then having to invent a new size when the badge size would be perfectly ok if that was used.
The problem you are trying to solve here (as I understand it) is the current hover styling making the text unreadable and the underline.
Both of those can be resolved purely in css without changing any markup and still only targeting the associations
.association a {
color: #fff;
text-decoration: none;
}
I have tested this item
Thanks @joomdonation for the hint. I used the custom update server, i wasn't aware of both possibilities.
I dont see why
Indeed you don't.
So please explain
Please @drmenzelit explain to the guy.
I am tired.
In Bootstrap 4 it was possible to use .badge-*
as contextual class in links (https://getbootstrap.com/docs/4.0/components/badge/#links). That was changed in Bootstrap 5, now one should use .btn-*
classes. The class .btn-sm
is still too big for the associations and we have already an override for .btn-secondary
. We have two options: we create a new class or we have to make some overrides of the BS classes for the associations views.
We can move the new class to _global.scss or on a new file under joomla-custom-elements
to avoid confusions with the overrides of BS classes.
Which is what I said. As its not an override it should not be in the bootstrap override files but instead be in a component specific file in the pages folder such as _com_associatons
I vote for overrides of the BS classes for the associations views.
OK. Things are now clearer.
We have to use buttons instead of badges in frontend and create our own button for this specific case.
Now, where do we add the new classes?
Do the new classes have to be added in the build/media_source/com_associations/css/sidebyside.css
(which is only loaded in the association
tmpl) or a new buttons.css
file in the same folder,
and then loaded directly in both cases layout/content/info_block/associations.php
and /components/com_content/tmpl/category/default_articles.php
via
if (Associations::isEnabled())
{
/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $app->getDocument()->getWebAssetManager();
$wa->registerAndUseStyle('com_associations, 'com_associations/sidebyside.css'); // or buttons.css
}
The other solution is to make sure we have a association
class added in the /components/com_content/tmpl/category/default_articles.php
<div>
(it exists in the infoblock for <dd>
)
and then create the override for btn-secondary in the bootstap overrides _buttons.scss
(or in a new file _associations.scss
) in vendor/bootstrap/
as
.association .btn-secondary {
.association .btn-sm {
Modified PR to override btn-secondary and btn-sm instead of creating btn-badge and btn-vsm
Same results. Modifying now description.
Can be tested again. Needs NPM.
@sandramay0905 At this time we have an issue with drone and it is impossible to get the corrected update package for the PR.
I have tested this item
"Standard Colour Theme" show different look than "Expected result AFTER applying this Pull Request":
Article | Category List |
---|---|
![]() |
![]() |
"Alternative Colour Theme" show like "Expected result AFTER applying this Pull Request":
Article | Category List |
---|---|
![]() |
![]() |
@sandramay0905
I do not confirm your findings here. The colors are totally independent of the colors themes
.article-info .association,
.cat-list-association {
.btn-secondary {
font-weight: 700;
color: $white;
background-color: $gray-600;
border-color: $gray-400;
&:hover,
&:focus {
color: $white;
background-color: $gray-800;
}
}
I guess you had an issue when applying the PR.
I used https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/32992/downloads/41753/pr_list.xml
for update.
Please make a clean install of https://ci.joomla.org/artifacts/joomla/joomla-cms/4.0-dev/32992/downloads/41753/Joomla_4.0.0-beta8-dev+pr.32992-Development-Full_Package.zip
I just checked that pack and it includes the correct css and modifiations in the php files
Please make a clean install
i can only make a clean install of Joomla4 at launch.joomla.org and test.
Then maybe use the same trick explained above
#32992 (comment)
Then maybe use the same trick explained above
Using this trick i found, what i wrote at #32992 (comment):
The Info by Joomla You can test this package as an update by using this custom update server
is not true?
no ideA. i never use that...
i used it at other pr's and it worked.
I have tested this item
@sandramay0905
It is working here on Firefox Macintosh.(87.0 (64-bit)) OS 10.12.6
Clean all your caches.
@PhilETaylor
I know you have Mac OS 10.13.
Please test this PR on Firefox.
It is working here on Firefox Macintosh.(87.0 (64-bit)) OS 10.12.6
then there is a failure on my side, sorry.
@sandramay0905 Try clearing your browser's cache.
I have tested this item
Private Modus of firefox was the solution. Not true, got at another test similar problems. Best solution seems #32992 (comment)
Thanks for the help at all.
Status | Pending | ⇒ | Ready to Commit |
RTC
Tks for testing
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-04-14 08:34:36 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
Thanks @infograf768 for the PR which i can not test cause
Needs npm
, sorry.