joomla-cms
joomla-cms copied to clipboard
Articles Module
Pull Request for Issue #43404 .
Summary of Changes
This PR is a follow-up of #43610 that was closed some days ago.
I did several changes to the code, added some parameters (for layout) and functions (include specific articles by ID) and created a CSS file to control the layout. After this get merged additional changes in the CSS from Cassiopeia can be done.
Testing Instructions
I you don't directly install the PR package, you will need to run npm (npm run build:css) to get the CSS file.
With this module you can replace the existing mod_articles_xx. All you need is to play with the parameters.
Articles - Archived -> Filter Archived Articles only Articles - Category -> Select category, play with parameter, use filter, group them, etc. Articles - Latest -> Change ordering to newest first Articles - Most Read -> Change ordering to hits Articles - Newsflash -> Select category, play with parameter, use filter, group them, etc.
Toggle the inline help to get more information about some fields.
Expected result AFTER applying this Pull Request
Link to documentations
Please select:
-
[ ] Documentation link for docs.joomla.org:
-
[ ] No documentation changes for docs.joomla.org needed
-
[ ] Pull Request link for manual.joomla.org:
-
[ ] No documentation changes for manual.joomla.org needed
Layout horizontal only works in some module positions. Is this intentional? Took me a while to work out why i couldnt get the columns to work
Layout horizontal only works in some module positions. Is this intentional? Took me a while to work out why i couldnt get the columns to work
No, no intentional at all... But the number of columns is related to the width of the container (maybe something for the description of the field). For example you can set 3 columns and in main-bottom you will get 2, because the container is smaller than 992px
The label "card style" confused me - I thought it referred to placing a border around the article. Not that it made the entire article a link,
When Card style is enable you should not be able to make the category a link as it will never work.
Same is true for the tags
Articles Info Layout
I think it makes more sense to describe this as single line and multiline as opposed to horizontal and vertical
I think it makes more sense to describe this as single line and multiline as opposed to horizontal and vertical
Good idea! Thank you
No matter what options you chose it is always output as a list. When you just have the article titles that makes sense but I dont believe it is correct to display articles with content in this way and it should be a div. We dont display a content blog view as a list
The label "card style" confused me - I thought it referred to placing a border around the article. Not that it made the entire article a link,
I understand card style as a combination of the two things. I was not sure, if it is good to put so much css on the module itself and better do it in Cassiopeia (as is now in the case of mod_articles_newsflash).
When Card style is enable you should not be able to make the category a link as it will never work.
Same is true for the tags
That is true ... Maybe it will be better to remove the possibility to display category and tags if card style is selected ... It is always difficult to get all ideas working well (and I have a lot of other ideas ;-) )
No matter what options you chose it is always output as a list. When you just have the article titles that makes sense but I dont believe it is correct to display articles with content in this way and it should be a div. We dont display a content blog view as a list
I was following a tutorial for accessible cards: https://gehirngerecht.digital/barrierefreie-cards-erstellen-schritt-fuer-schritt-anleitung/ They write: "A list is an advantage for screen readers because, among other things, it tells them how many elements to expect. "
They write: "A list is an advantage for screen readers because, among other things, it tells them how many elements to expect.
That's true but it would also be true for all the blog article views. For me it is an abuse of the list semantics
Show Introtext
I suggest making this default to Show. Otherwise it is very confusing when you change Titles Only to No and you still dont see the introtext
Articles Info Layout showon syntax is not correct
showon="title_only:0[AND]show_date:1[OR]show_category:1[OR]show_hits:1[OR]show_author:1"
It should not be displayed when title only = 1
I suggest some descriptions for params. There are several params
"..... filtering type" with selection inclusive / exclusive.
This is not self explaining, I have to check the code for unterstanding. Maybe due to language gap?
When we started with J4, we had the rule that labels on switches should be only yes/no or show/hide. There were only a few rare exceptions, for example the user state. In this module we have more exceptions. Woudn't it be better to make a selection dropdown if alternatives are other that yes/no or show/hide?
When we started with J4, we had the rule that labels on switches should be only yes/no or show/hide. There were only a few rare exceptions, for example the user state. In this module we have more exceptions. Woudn't it be better to make a selection dropdown if alternatives are other that yes/no or show/hide?
agreed
When we started with J4, we had the rule that labels on switches should be only yes/no or show/hide.
Oh, I didn't know (or I forgot it). I will change to select lists.
Oh, I didn't know (or I forgot it).
Never mind. There was no document or written rule, only discussions. Because with switches the user cannot see the possible options. We could add this as "best practice rule" to the manual.
The article info data should be presented using the description element just as it is in the content component and not as a regular list element
The article info data should be presented using the description element just as it is in the content component and not as a regular list element
A description list needs <dt> and <dd> and at the moment we are only displaying the descripton but not the term.
- Option 1: always display the term
- Option 2: always make the term "visually hidden"
- Option 3: add a parameter show / hide term
well it should be the same as with an article
I like the choice linline / vertical for the info-data elements - and would like to have this also for articles.
Could we make that like in my PR, https://github.com/joomla/joomla-cms/pull/43729
with a visually hidden <dl><dt> label and the inline / vertical display for <dd>?
Can you help me get up to speed? I don't yet know the status of this PR. What still needs to be done? What is missing? Where do you need help?
Looking at this right now, I would like to have this in the testing sampledata and if this is supposed to be the future, then we should directly replace all cases of the old modules in our sampledata plugins with this new plugin and ideally you shouldn't see the difference...
Can you help me get up to speed? I don't yet know the status of this PR. What still needs to be done? What is missing? Where do you need help?
Looking at this right now, I would like to have this in the testing sampledata and if this is supposed to be the future, then we should directly replace all cases of the old modules in our sampledata plugins with this new plugin and ideally you shouldn't see the difference...
this is supposed to exist in parallel with the other content modules - otherwise we are in migration hell
We've had these modules for at least 10 years, most likely even since Mambo times, so of course we wont be dropping them like hot potatoes. I don't see them being replaced anytime soon, so at least until the end of 8.x I would expect the old ones to be safe. However, that still doesn't mean that we shouldn't be encouraging people to use the new module instead of the old ones. If the new module is only supposed to be used in parallel with the old ones, but feature-wise is identical, then we don't need this module. We think that this new module should be the future for com_content modules, so we should advertise it in our core product by using it as a direct replacement for the old ones in our sampledata.
its easy to update the sample data - shouldnt take more than a few minutes
I have modified the Blog Sample Data to display the new module instead of the old ones. The Testing Sample Data need a complete restructuring and I'm not sure if I'm able to do that.
Hello about installing a PR I installed this PR with the 2nd method by downloading https://artifacts.joomla.org/drone/j...te_Package.zip then doing the manual update which asks me to identify myself on the site. I had already tried by copying the update url and putting development version without success So I easily went from the test version joomla 5.2alpha3 to this version joomla 5.2alpha3+PR new module It's easier than going through the component whose options I got lost in by using it once a year.
For the future, I have 2 questions, a) when I install another more recent version, if this pr is not included, what I did will be overwritten? b) if I put another joomla 5.2x + PR, it will not overwrite and a priori should not interfere?
About the module Good to know you must set display options correctly" otherwise there is no display I appreciate
- the presentation on the same line. I imagine that after the templates including astroid will be able to create a nice layout :-)
- the fact of clicking on a block
Afterwards I have 2 questions c) it seems that the images are not rendered! yet I put 2 nice images in the content of the text. Well it is less important for me because I systematically use the Tassos custom field images which will probably never be taken natively in this module d) I have not seen any repercussions of modifying the parameter: "Articles Info Layout"
Sorry if my bad English is poorly translated.
@HDInfautre sorry I don't understand your problems / questions about the installation ...
Article Info Layout = Multiline
Article Info Layout = Single Line
Article image: first image is intro image, secon one is an image inside the article (before the read more)
I have no idea what Astroid framework will do with this module ...
HI hanks for this very quick response :-) I'm giving up my positive remarks or on astroid. I'm just focusing on the remarks c) it seems that the images are not rendered! https://j5test-seul.88h.ovh/index.php/test-mod yet I put 2 beautiful images in the text content. Well it's less important for me because I systematically use the Tassos custom field images which will probably never be taken natively in this module d) I have not seen any repercussions of modifying the parameter: "Articles Info Layout"
After possibly on the questions concerning the post-patch updates if it's understandable!?
Make sure this setting is set to show
The images are not rendered because you have set a character limit for the introtext ... For my understanding that is correct, but maybe I need to change the visibility of the "Show Article Images" parameter...
You are showing only one element (category) from the article info that is why you don't see any difference between multiline and single line, try displaying the author too
HI hanks for this very quick response :-) I'm giving up my positive remarks or on astroid. I'm just focusing on the remarks c) it seems that the images are not rendered! https://j5test-seul.88h.ovh/index.php/test-mod yet I put 2 beautiful images in the text content. Well it's less important for me because I systematically use the Tassos custom field images which will probably never be taken natively in this module d) I have not seen any repercussions of modifying the parameter: "Articles Info Layout"
After possibly on the questions concerning the post-patch updates if it's understandable!?
The images are not rendered because you have set a character limit for the introtext ... For my understanding that is correct, but maybe I need to change the visibility of the "Show Article Images" parameter...
You are showing only one element (category) from the article info that is why you don't see any difference between multiline and single line, try displaying the author too
Hi thanks for the follow-up The image is at the beginning of the text I checked what seems right to me.
I can give access if necessary.