NPM Resource Changed ? ? ? Pending

User tests: Successful: Unsuccessful:

avatar YatharthVyas
YatharthVyas
7 May 2021

Pull Request for Issue #33617

Summary of Changes

The overflow: hidden style applied to ul and ol in #33560 affected the navbar dropdowns which I hadn't tested properly. To rectify my mistake, I've added a selector that only applies the style to lists that are inside the article component

Testing Instructions

  1. npm run build:css
  2. Check that all dropdowns are functional in the frontend
  3. Visit 'Your Modules' blog in frontend and ensure that the lists are properly indented

Actual result BEFORE applying this Pull Request

Dropdowns don't work

Expected result AFTER applying this Pull Request

Dropdowns work

image

Documentation Changes Required

None

avatar YatharthVyas YatharthVyas - open - 7 May 2021
avatar YatharthVyas YatharthVyas - change - 7 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 May 2021
Category Front End Templates (site) NPM Change
avatar YatharthVyas YatharthVyas - change - 7 May 2021
The description was changed
avatar YatharthVyas YatharthVyas - edited - 7 May 2021
avatar richard67 richard67 - test_item - 7 May 2021 - Tested successfully
avatar richard67
richard67 - comment - 7 May 2021

I have tested this item successfully on b1e7f29


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

avatar sandramay0905 sandramay0905 - test_item - 7 May 2021 - Tested successfully
avatar sandramay0905
sandramay0905 - comment - 7 May 2021

I have tested this item successfully on b1e7f29

Thanks all for solving the issue.


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

avatar richard67 richard67 - change - 7 May 2021
Status Pending Ready to Commit
Labels Added: ? NPM Resource Changed
avatar richard67
richard67 - comment - 7 May 2021

RTC


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

avatar wilsonge wilsonge - change - 7 May 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-07 10:20:55
Closed_By wilsonge
Labels Added: ? ?
avatar wilsonge wilsonge - close - 7 May 2021
avatar wilsonge wilsonge - merge - 7 May 2021
avatar wilsonge
wilsonge - comment - 7 May 2021

Thanks!

avatar wilsonge
wilsonge - comment - 7 May 2021

As a followup it would be good if someone could split the com_content specific styling from this globals file and create a dedicated scss file for it in a pages subfolder similar to the atum structure https://github.com/joomla/joomla-cms/blob/b1e7f290a81d79117e203a89cfb79af290f7ff29/administrator/templates/atum/scss/pages/_com_content.scss

avatar richard67
richard67 - comment - 7 May 2021

As a followup it would be good if someone could split the com_content specific styling from this globals file and create a dedicate scss file for it in a pages subfolder similar to the atum structure https://github.com/joomla/joomla-cms/blob/b1e7f290a81d79117e203a89cfb79af290f7ff29/administrator/templates/atum/scss/pages/_com_content.scss

@YatharthVyas Would you like to be that "someone"? ?

avatar YatharthVyas
YatharthVyas - comment - 7 May 2021

@YatharthVyas Would you like to be that "someone"? ?

Sure, Thanks!

avatar YatharthVyas
YatharthVyas - comment - 7 May 2021

I noticed that the atum template's scss/pages/ imports have a message:

// Also these DO NOT BELONG HERE!!!

which was added in commit 482aea2

I read the PR's discussion and couldn't figure out the reason behind this. This applies to the scss refactoring for Cassiopeia (discussed above) and I want to know what's the correct implementation for these import(s).

avatar richard67
richard67 - comment - 7 May 2021

I noticed that the atum template's scss/pages/ imports have a message:

// Also these DO NOT BELONG HERE!!!

which was added in commit 482aea2

I read the PR's discussion and couldn't figure out the reason behind this. This applies to the scss refactoring for Cassiopeia (discussed above) and I want to know what's the correct implementation for these import(s).

@dgrammatiko Can you answer that?

avatar dgrammatiko
dgrammatiko - comment - 7 May 2021

// Also these DO NOT BELONG HERE!!!
// Page specifics
@import "pages/com_admin";
@import "pages/com_config";
@import "pages/com_content";
@import "pages/com_cpanel";
@import "pages/com_finder";
@import "pages/com_joomlaupdate";
@import "pages/com_modules";
@import "pages/com_tags";
@import "pages/com_privacy";
@import "pages/com_templates";
@import "pages/com_users";

The problem -that most people don't even see in the above lines- is that we're creating a monolith that is totally inflexible. Of course, most people don't realise the impact of packaging all the css in a file because most of the times they are not even using Joomla correctly (eg extensive use of overrides). So, for those that will never override anything the monolith approach is fine, although a practice of the past that is really against today's needs. BUT if you ever want to override things due to the fact the routes/pages are already styled in the template you're in big trouble and either you have to completely change all the classes (and maybe the structure) of the produced HTML or you have to use !important everywhere. Also, the whole approach is actually fighting Joomla's architecture which is totally modular...

In short, routes (eg component views) should have their own css files. The same goes for modules and everything else that is outputting HTML... We're destroying what should have being a USP for the project (modularity) for the sake of using well establish (and totally outdated) patterns.
My 2c

avatar YatharthVyas
YatharthVyas - comment - 8 May 2021

I absolutely agree with your point

In short, routes (eg component views) should have their own CSS files.

In light of this, I am working on a PR that works on the page related styles for Cassiopeia (I'll later move on to Atum) and this is what I've done:

  • Move the scss files for all component's to their respective build/media_source folder
  • Import them in their respective component via Web Asset Manager

I have 2 questions for @dgrammatiko :

  1. Certain styles are mapped to template variables like $cassiopiea-gutter-width. Should these be hardcoded now as we are separating the component CSS from the Cassiopeia template?
  2. Moving these styles to their component folder might not cause any effect for Cassiopeia but they will offset styling for 3rd Party Templates so is it worth it?
avatar dgrammatiko
dgrammatiko - comment - 8 May 2021

Moving these styles to their component folder might not cause any effect for Cassiopeia but they will offset styling for 3rd Party Templates

Not really, the views will still have the default css so, 3rd pd could override the css by adding the relative file in their template css folder. Also you shouldn't really worry about 3rd pd templates as these will be brand new as the ones from version 3 hardly work with the bootstrap 5 markup ?

Add a Comment

Login with GitHub to post a comment