Skip to content

Commit c046d21

Browse files
AmirMohammad CheraghaliAmirMohammad Cheraghali
authored andcommitted
fix: Add text truncation to viewport headers to prevent overflow
- Added truncate class to viewport title text - Added flex-1 min-w-0 to parent container for proper truncation - Long structure names now show ellipsis (...) instead of overflowing - Works correctly on mobile and in multi-view modes
1 parent 6ecf702 commit c046d21

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,8 +1441,8 @@ function App() {
14411441
{viewportLabels[index]}
14421442
</span>
14431443
</div>
1444-
<div className="flex items-center gap-3">
1445-
<span className="text-[10px] text-neutral-400 font-mono flex-1 text-center">
1444+
<div className="flex items-center gap-3 flex-1 min-w-0">
1445+
<span className="text-[10px] text-neutral-400 font-mono truncate max-w-full">
14461446
{ctrl.proteinTitle || ctrl.pdbId || (ctrl.file ? ctrl.file.name : "No Structure")}
14471447
</span>
14481448
<button

0 commit comments

Comments
 (0)