Skip to content

Conversation

@chippison
Copy link
Contributor

Description

UX-353
We wanted to make some improvements to PDF reports so that it renders better

Acceptance Criteria:

  • All pages in portrait mode
  • All tables to use 100% of width
  • Make table header bottom aligned
  • Make revenue column more dynamic.
  • Instead of truncating labels, wrap them on 2-3 lines instead (maybe up to 100 characters or so? TBD)
  • Make sure that links work even when truncation of label is applied
  • Fix bug in Funnels that link do work (problem that Thomas reported above (in the Funnel Flow report))

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@chippison chippison force-pushed the force-portrait-for-scheduled-reports branch from 7dead88 to 53993f7 Compare December 30, 2025 02:22
@chippison chippison marked this pull request as ready for review January 4, 2026 22:31
@chippison chippison requested a review from a team January 5, 2026 01:19
if (mb_strlen($text) < $maxLength) {
return $text;
}
return mb_substr($text, 0, $maxLength) . '...';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be shorter with the 3 dots character.

Suggested change
return mb_substr($text, 0, $maxLength) . '...';
return mb_substr($text, 0, $maxLength) . '';

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also ensure that the max length isn't exceeded after adding the 3 dots?

Suggested change
return mb_substr($text, 0, $maxLength) . '...';
return mb_substr($text, 0, $maxLength - 1) . '';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the ellipsis ('…') I tried adding your suggestion to my code, but the pdf library just outputs them the same way.

For the subtraction of 1 to ensure that max length isn't exceeded, the max length already has some padding of around 5 chars to what is allowed in the cell because the pdf library computes the width of a string by actual length (adding a string with all 'w' will result in a slightly different length that will no longer fit our cell width). I don't think its necessary to subtract the 1 from the max length

@chippison chippison requested review from sgiehl and tzi January 6, 2026 06:02
@chippison chippison added this to the 5.7.0 milestone Jan 7, 2026
@chippison chippison added the Needs Review PRs that need a code review label Jan 8, 2026
@github-actions
Copy link
Contributor

This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers

@github-actions github-actions bot added the Stale The label used by the Close Stale Issues action label Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review PRs that need a code review Stale The label used by the Close Stale Issues action

Development

Successfully merging this pull request may close these issues.

4 participants