Aman-Mittal opened a new issue, #581:
URL: https://github.com/apache/fineract-backoffice-ui/issues/581

   `.truncate-text` in the shared data table caps cell content at a hardcoded 
200 px regardless of the space the column has, so names get an ellipsis while 
the same cell sits half empty.
   
   > **Screenshot:** _System → Scheduler Jobs at 1440px — "Transfer Fee For 
Loans From…" and "Update Accounting Running …" clipped with free space to their 
right._ (attached below)
   
   ## Measured
   
   On **System → Scheduler Jobs** at 1440 px:
   
   | Job | `<span>` width | content needs | containing `<td>` |
   |---|---|---|---|
   | Transfer Fee For Loans From Savings | 200 px | 238 px | **374 px** |
   | Update Accounting Running Balances | 200 px | 244 px | **374 px** |
   
   The cell has 374 px. The span refuses to use more than 200 of it, so ~174 px 
goes unused while the text is cut. The Job Name column is the widest on the 
screen and still truncates.
   
   ## Source
   
   ```scss
   .truncate-text {
     display: inline-block;
     max-width: 200px;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
     vertical-align: middle;
   }
   ```
   `src/app/shared/components/data-table/data-table.component.ts:324-331`
   
   Because this lives in the shared component, it applies to every list screen 
using it, not just Scheduler Jobs.
   
   ## Not a data-loss bug
   
   The full value **is** reachable — `data-table.component.ts:201` attaches 
`[appTooltip]="getTooltipText(row, col.key)"`, and I confirmed on the deployed 
build that hovering a clipped job name shows `Transfer Fee For Loans From 
Savings` in full. So this is about wasted space and unnecessary hovering, not 
unreadable data. Filing as an enhancement rather than a bug for that reason.
   
   ## Suggested fix
   
   Let the cell decide its own width instead of fixing it in pixels:
   
   ```scss
   .truncate-text {
     display: block;
     max-width: 100%;
     white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
   }
   ```
   
   with `table-layout: fixed` plus per-column widths if columns need to stay 
stable. That way a wide column shows its content and a narrow one still 
truncates — and the tooltip keeps covering the genuinely long values.
   
   ## Reproduction
   
   1. Sign in, go to **System → Scheduler Jobs** at a viewport of 1280 px or 
wider.
   2. Note "Transfer Fee For Loans From…" truncated with obvious free space to 
its right in the same cell.
   
   ## Tested against
   
   Deployed build of `main`, Chrome, 1440x900. Line references are against 
`27d5a441`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to