Skip to content

Conversation

@nordmograph
Copy link

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

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