Skip to content

fix: Username text overflows its container in the Dashboard header on mobile viewportΒ #1762

@Vaibhav-221

Description

@Vaibhav-221

πŸ› Bug Report

Describe the bug
On the Dashboard page, the username displayed in the top-right user profile section (inside the header card) overflows its parent container on mobile viewports. The name text β€” "Vaibhav Singh" β€” extends beyond the boundary of the containing element instead of being constrained and truncated gracefully.

This causes a broken layout where the username visually escapes the card/row boundaries, making the UI look unpolished especially on smaller screen sizes.


πŸ“Έ Screenshot

Image

πŸ“ Location

  • Page: /dashboard
  • Component: Dashboard Header / User Profile row
  • Element: Username text next to the avatar and bell icon
  • Viewport: Mobile (observed at ~412px width)

πŸ” Root Cause
The username text element likely lacks CSS overflow constraints. The containing flex row does not prevent the text from expanding beyond its bounds.


πŸ› οΈ Proposed Fix
Add the following CSS properties to the username text element:

.username {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px; /* adjust based on layout */
}

Or if using Tailwind CSS:

Vaibhav Singh

This ensures longer names are gracefully truncated with an ellipsis (...) instead of overflowing the container.


πŸ“‹ Steps to Reproduce

  1. Open the DevTrack app
  2. Log in with an account that has a multi-word name (e.g. "Vaibhav Singh")
  3. Navigate to the Dashboard page
  4. View the header section on a mobile viewport (≀ 430px)
  5. Observe the username overflowing outside its container

⚠️ Impact
This affects all users with names longer than ~10 characters on mobile viewports β€” which is the majority of users.


Additional context
I have identified the component and the exact CSS fix. Happy to submit a PR once assigned. πŸ™Œ

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions