Skip to content
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

MetricTableRow subtitle has overflow #6487

Closed
niekdemelker opened this issue Aug 1, 2024 · 2 comments
Closed

MetricTableRow subtitle has overflow #6487

niekdemelker opened this issue Aug 1, 2024 · 2 comments
Assignees
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Milestone

Comments

@niekdemelker
Copy link

  • Laravel Version: 11.19.0
  • Nova Version: 4.34.3
  • PHP Version: 8.3.9
  • Operating System and Version: pop-os and windows
  • Browser type and version: firefox 128.0.3 (64-bits) and chromium 127.0.6533.88

Description:

The TableMetric presents an overflow issue when the subtitle is to long, making the action buttons unreachable (or only after scroll). This can be seen in the image provided below.

image

The subtitle text has the CSS class 'truncate', which intention is to trim the string with text-overflow: ellipsis;, but as you can see there is just an overflow with scrollbar. I would suggest the subtitle will ether get trimmed or wrapped to a new line, the action buttons shouldn't be pushed away. I also tested this in different browsers with the same experience.

Detailed steps to reproduce the issue on a fresh Nova installation:

Make a new table metric

add an MetricTableRow with a long subtitle to a Dashboard.

Example of Table Metric:

class Example extends Table
{
    public function calculate(NovaRequest $request)
    {
        return [
            MetricTableRow::make()
                ->title('Overflow It!')
                ->subtitle('The subtitle is to long making an overflow, even tho this has a class with the name truncate, witch should prevent the overflow, pushing the action buttons out of view.')
                ->actions(fn () => [
                    MenuItem::externalLink('Random Action', 'http://127.0.0.1:8000/'),
                ]);
        ]
    }
}
@jeremynikolic
Copy link

Thanks @niekdemelker for reporting this, we've managed to reproduce the issue and will be fixing it 👍

@crynobone crynobone added bug Verified bug by the Nova team fix incoming A fix is in review labels Aug 4, 2024
@crynobone crynobone added this to the 4.x milestone Aug 4, 2024
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Verified bug by the Nova team fix incoming A fix is in review
Projects
None yet
Development

No branches or pull requests

3 participants