Skip to content

Conversation

@nordmograph
Copy link
Contributor

@nordmograph nordmograph commented Oct 15, 2025

Pull Request for Issue # .

Summary of Changes

The width was hardcoded to 45%, regardless of the number of columns. This change makes it dynamic, distributing the width according to the number of fields, while reserving 8% for the action column.

Testing Instructions

Create a subform 'test' field with a repeatable.table layout and at least 3 (text for eg.) fields in it.
(layout="joomla.form.field.subform.repeatable-table") + subform_test.xml

Actual result BEFORE applying this Pull Request

2 first fields have 45% as width and the 3rd and following ones are compressed

Expected result AFTER applying this Pull Request

the width of ech field is a divisiion of the total width per the amount of fields

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

The <th> width was hardcoded to 45%, regardless of the number of columns.
This change makes it dynamic, distributing the width according to the number of fields, while reserving 8% for the action column.
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
@richard67 richard67 changed the title Update repeatable-table.php [5.4] Update repeatable-table.php Oct 15, 2025
@HLeithner HLeithner added the bug label Oct 15, 2025
@chmst
Copy link
Contributor

chmst commented Oct 17, 2025

Tested and works perfectly.
I’d round it to two decimal places - this looks a bit weird:
grafik

@muhme
Copy link
Contributor

muhme commented Oct 24, 2025

@chmst Could you do an issue tracker test?

@chmst
Copy link
Contributor

chmst commented Oct 24, 2025

I have tested this item ✅ successfully on 3d4662a


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

@chmst
Copy link
Contributor

chmst commented Oct 24, 2025

Tested successfully: All columns have the same width.

grafik

@muhme
Copy link
Contributor

muhme commented Oct 24, 2025

@nordmograph I have tested this PR and see:

  • before PR: <th scope="col" style="width:45%">
  • with PR: <th scope="col" style="width:13.142857142857%">

However, there is no difference in the presentation for me on quick view in any of the three browsers (Firefox, Chrome, and Safari). All fields are present, and I can scroll horizontally before or after the PR. Could you please explain/show what bug this PR fixes?

shoot

@richard67
Copy link
Member

@muhme Maybe you can see the effect only on small screens, e.g. mobile phone?

@chmst
Copy link
Contributor

chmst commented Oct 24, 2025

It is the calculation - before: every column has with: 45% which is not correct if there are more than 2 cloumns. Now, all columns have a correctly calculated width.
Users don't see a difference because the fields enforce the width they need and hoizontal scrolling is necessary.

@muhme
Copy link
Contributor

muhme commented Oct 31, 2025

@nordmograph and other testers: How to reproduce the problem? Which browser, under what circumstances, with a screenshot?

2 first fields have 45% as width and the 3rd and following ones are compressed

@Fedik
Copy link
Member

Fedik commented Oct 31, 2025

@muhme try use different field types as @chmst did.

The fix mostly cosmetic, the width is ignored by Table (table use it as "relative width"), and example for all "text input" it will be equal for each cell.
With different content in the cell the result should be more visible.

@muhme
Copy link
Contributor

muhme commented Oct 31, 2025

Even with different content, all columns are equal in size:
before
Is there is not enough horicontal space, there is horicontel scrolling needed, but nothing is compressed:
before-with-scrolling
After applying the PR with Patch Tester it looks identical as before. Sorry, I can't reproduce the problem.

@Fedik
Copy link
Member

Fedik commented Oct 31, 2025

In some reason I expected it will be relive to content width, but as all columns have same width 45% the table make it equal also for any amount of columns.

But, as I said it just cosmetic changes, even if we set width:100% the table will "make it fit".

@muhme
Copy link
Contributor

muhme commented Nov 8, 2025

I have tested this item ✅ successfully on 21a6aed

Tested with JBT, the width is calculated dynamically for the number of fields.


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

@muhme
Copy link
Contributor

muhme commented Nov 8, 2025

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Nov 8, 2025
@richard67 richard67 added this to the Joomla! 5.4.1 milestone Nov 8, 2025
@richard67 richard67 merged commit 7b5d99e into joomla:5.4-dev Nov 8, 2025
60 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Nov 8, 2025
@richard67
Copy link
Member

Thanks @nordmograph for this fix, @chmst and @muhme for testing and @Fedik for support.

@nordmograph nordmograph deleted the fix/fields-repeatable-table-th branch November 8, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants