User tests: Successful: Unsuccessful:
This Pull Request tries to solve several issues #44183, #44185, corrects wrong introduced parameters for the read more button #44136 and replaces other PRs #44179, #44175
Replaced the truncate method with string.truncateComplex
. The intro text preserves now html tags (e.g. formatting like strong
or links) and the number of characters is almost correct (the truncate method doesn't cut words, so the number of characters can be more or less depending on the length of the words and the position of a space). The ellipsis are on a new line, I don't like it, but that is the way the method is defined and it is not in the scope of this PR to change the truncate method.
The PR #44136 introduced some additional parameters on the read more button. These are not necessary and interferes with the parameter of the module (e.g. don't displaying the read more button although the parameter is set to show).
Create several articles with and without formatting (e.g. strong) and / or links in the intro text. Create a module to display the articles and play with the parameters Introtext, Introtext Limit, "Read More" Link, Read More with Title, Read More Limit
Please look at all linked issues and pull requests.
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
Status | New | ⇒ | Pending |
Category | ⇒ | Modules Front End |
@drmenzelit agreed
We can add that help text in 5.2.1, among other things because we are in language freeze. Waiting for people to test this, so that I can merge it.
I have tested this item ✅ successfully on 66725d3
If I delete the 100 character limit of the introtext it comes back again instead of unlimited.
When I manually add a 0 into the truncation of introtext field an image field magically appears, don't know if that is intended?
When I manually add a 0 into the truncation of introtext field an image field magically appears, don't know if that is intended?
This is what it says in the tooltip.
When I manually add a 0 into the truncation of introtext field an image field magically appears, don't know if that is intended?
This is what it says in the tooltip.
Thats not obvious that someone needs to toggle inline help to find something like this. If I delete the number it should be deleted or set to 0 but not make 100 reapear
Also the 3 dots still appear on a new line instead of after the truncated text (it was mentioned in another issue)
Currently, the module has some small information buttons that show a tooltip on hover. I don't think that this is sufficient for a standard user. I believe that we need comprehensive inline help for the module.
Currently, the module has some small information buttons that show a tooltip on hover. I don't think that this is sufficient for a standard user. I believe that we need comprehensive inline help for the module.
I dont see any tooltips? just the inline help. But the inline help is not really good for explaining unexpected behaviour :)
I have tested this item ✅ successfully on 66725d3
RTC
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-10-04 19:53:38 |
Closed_By | ⇒ | Hackwar | |
Labels |
Added:
PR-5.2-dev
|
The PR is successful for html code.
But there is no change in the original problem. If the limit is smaller than the length of the first word, no text is displayed.
When the limit is set to for example 15, the result is
#44183 (comment)
It is a result of the stringhelper truncate method:
$offset is empty if the string does not contain a space.