PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar drmenzelit
drmenzelit
4 Oct 2024

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 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).

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

grafik
grafik

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

avatar drmenzelit drmenzelit - open - 4 Oct 2024
avatar drmenzelit drmenzelit - change - 4 Oct 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 4 Oct 2024
Category Modules Front End
avatar chmst
chmst - comment - 4 Oct 2024

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.
grafik
grafik

When the limit is set to for example 15, the result is
grafik
#44183 (comment)
It is a result of the stringhelper truncate method:
grafik

$offset is empty if the string does not contain a space.

avatar drmenzelit
drmenzelit - comment - 4 Oct 2024

@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)...

avatar chmst
chmst - comment - 4 Oct 2024

@drmenzelit agreed

avatar Hackwar
Hackwar - comment - 4 Oct 2024

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.

avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

I set the introtext limit to 10 but its cut after 4. For Example "Your home page" is cut after Your

grafik grafik
avatar dautrich dautrich - test_item - 4 Oct 2024 - Tested successfully
avatar dautrich
dautrich - comment - 4 Oct 2024

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.

avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

Read more limit is set to 15 but cut after 10

grafik
avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

Read more is only read more without title but the 3 dots appear

grafik grafik
avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

If I delete the 100 character limit of the introtext it comes back again instead of unlimited.

avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

When I manually add a 0 into the truncation of introtext field an image field magically appears, don't know if that is intended?

avatar dautrich
dautrich - comment - 4 Oct 2024

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.

avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

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

avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

Also the 3 dots still appear on a new line instead of after the truncated text (it was mentioned in another issue)

avatar dautrich
dautrich - comment - 4 Oct 2024

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.

avatar coolcat-creations
coolcat-creations - comment - 4 Oct 2024

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 :)

avatar RickR2H RickR2H - test_item - 4 Oct 2024 - Tested successfully
avatar RickR2H
RickR2H - comment - 4 Oct 2024

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.

avatar RickR2H
RickR2H - comment - 4 Oct 2024

RTC


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

avatar Hackwar Hackwar - change - 4 Oct 2024
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
avatar Hackwar Hackwar - close - 4 Oct 2024
avatar Hackwar Hackwar - merge - 4 Oct 2024

Add a Comment

Login with GitHub to post a comment