-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Make improvements to PDF reports #23919
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
base: 5.x-dev
Are you sure you want to change the base?
Conversation
…ake sure that this fits for most cases
…ong labels look better
… that its easier to understand and follow
…re always in portrait mode. and also tests that all reports tables, including those reports with both graph and table, now use 100% width of the page
7dead88 to
53993f7
Compare
… it the way we format labels that have the row metadata parameter url
…little so that it has some space between itself and the table
| if (mb_strlen($text) < $maxLength) { | ||
| return $text; | ||
| } | ||
| return mb_substr($text, 0, $maxLength) . '...'; |
There was a problem hiding this comment.
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.
| return mb_substr($text, 0, $maxLength) . '...'; | |
| return mb_substr($text, 0, $maxLength) . '…'; |
There was a problem hiding this comment.
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?
| return mb_substr($text, 0, $maxLength) . '...'; | |
| return mb_substr($text, 0, $maxLength - 1) . '…'; |
There was a problem hiding this comment.
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
|
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
Description
UX-353
We wanted to make some improvements to PDF reports so that it renders better
Acceptance Criteria:
Checklist
Review