Skip to content

feat(tarko): optimize navbar space for agent and model display (close: #1076)#1078

Merged
ulivz merged 1 commit intomainfrom
feat/navbar-space-optimization-1076
Aug 11, 2025
Merged

feat(tarko): optimize navbar space for agent and model display (close: #1076)#1078
ulivz merged 1 commit intomainfrom
feat/navbar-space-optimization-1076

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Aug 11, 2025

Summary

Optimizes navbar space utilization by implementing dynamic width calculation and intelligent truncation for agent and model name badges.

Before

image

After

image

Changes

  • Added DynamicNavbarCenter component with real-time width measurement
  • Implements proportional space distribution when content exceeds available width
  • Only applies truncation when absolutely necessary
  • Maintains responsive behavior across different screen sizes

Technical Details

  • Uses useRef and useEffect for DOM measurement
  • Calculates text widths using temporary DOM elements
  • Distributes available space proportionally between badges
  • Preserves original styling and visual design

Testing

  • ✅ Build passes successfully
  • ✅ Component renders correctly with dynamic sizing
  • ✅ Responsive behavior verified

Implement dynamic width calculation and smart truncation
Only show ellipsis when space is truly insufficient
@netlify
Copy link

netlify bot commented Aug 11, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit 86fbc58
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/6899f91daac24e0008e8f8b5
😎 Deploy Preview https://deploy-preview-1078--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ulivz
Copy link
Member Author

ulivz commented Aug 11, 2025

cc @cjraft @helio9cn

@ulivz ulivz changed the title feat: optimize navbar space utilization for agent and model display (close: #1076) feat(tarko): optimize navbar space utilization for agent and model display (close: #1076) Aug 11, 2025
@ulivz ulivz changed the title feat(tarko): optimize navbar space utilization for agent and model display (close: #1076) feat(tarko): optimize navbar space for agent and model display (close: #1076) Aug 11, 2025
@ulivz ulivz merged commit cb067fd into main Aug 11, 2025
10 checks passed
@ulivz ulivz deleted the feat/navbar-space-optimization-1076 branch August 11, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments