-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.2] Articles module: Truncate text (introtext and read more title) #44189
Conversation
The PR is successful for html code. When the limit is set to for example 15, the result is $offset is empty if the string does not contain a space. |
@chmst yes, that is what I wrote in the description of the PR too. But it is not in the scope of this PR to change how the truncate method works. The only option is to add some help text for the field(s)... |
@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 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44189. |
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? |
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. |
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 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44189. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/44189. |
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
Summary of Changes
Replaced the truncate method with
string.truncateComplex
. The intro text preserves now html tags (e.g. formatting likestrong
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).
Testing Instructions
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
Actual result BEFORE applying this Pull Request
Please look at all linked issues and pull requests.
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