tududi/frontend/components
Chris e80847b01f
Fix project name overflow and add 6-word validation limit (#972)
* Fix project name overflow and add validation

This commit addresses issue #971 by implementing both UI fixes and
validation to prevent excessively long project names.

Changes:
1. Add word-break and line-clamp to ProjectBanner.tsx to handle
   overflow gracefully with line-clamp-3 for names
2. Add frontend validation in ProjectModal.tsx limiting names to
   6 words maximum
3. Add backend validation in project.js model with custom wordCount
   validator
4. Show user-friendly error messages when validation fails

This ensures project names remain concise and UI-friendly while
preventing the extreme overflow cases that were possible before.

Fixes #971

* Add overflow-hidden to make line-clamp work properly

The line-clamp utility requires explicit overflow-hidden to function
correctly. Without it, the text continues to display in full rather
than being truncated with ellipsis.

* Fix line-clamp using inline CSS styles

Tailwind's line-clamp utilities weren't working, so switched to using
inline styles with the standard CSS approach:
- display: -webkit-box
- -webkit-line-clamp: 3
- -webkit-box-orient: vertical

This ensures the text truncation works reliably across browsers.

* Use Tailwind line-clamp utilities (already defined in CSS)

The project already has line-clamp-1/2/3 utilities properly defined
in tailwind.css with all the necessary webkit properties. Simplified
the component to use these existing utilities instead of inline styles.

* Add dedicated CSS classes with !important for line-clamp

Created custom project-name-clamp and project-desc-clamp classes
with !important flags to ensure they override any conflicting styles.
This should finally fix the text truncation issue.

* Use component-scoped styles for line-clamp

Adding inline style tag in the component to ensure the line-clamp
CSS is definitely loaded and applied. This bypasses any potential
issues with external CSS compilation or loading order.

* Change project name line-clamp from 3 to 2 lines

Limiting project name display to 2 lines with ellipsis for better
visual density and cleaner appearance.

* Increase line-height for project name in banner

Added line-height: 1.3 to project name for better readability
and visual spacing between lines.
2026-03-24 17:36:24 +02:00
..
Admin Fix bug 578 (#648) 2025-12-04 14:00:51 +02:00
Area Set verification modal on escape (#470) (#473) 2025-11-03 16:27:13 +02:00
Backup Update translations 2025-12-10 11:43:15 +02:00
Calendar Fix profile settings mobile layout (#694) 2025-12-10 09:10:23 +02:00
Habits Fix bug 733 (#735) 2025-12-27 21:00:52 +02:00
Inbox Fix redirect after task deletion to return to originating view (#887) 2026-03-01 16:07:02 +02:00
Metrics Fix today race condition (#75) 2025-06-13 14:20:24 +03:00
Note Introduce focus mode in notes (#891) 2026-03-03 00:29:03 +02:00
Notifications Fix redirect after task deletion to return to originating view (#887) 2026-03-01 16:07:02 +02:00
Productivity Fix redirect after task deletion to return to originating view (#887) 2026-03-01 16:07:02 +02:00
Profile feat: Add MCP Integration with client-agnostic instructions (#953) 2026-03-20 16:55:49 +02:00
Project Fix project name overflow and add 6-word validation limit (#972) 2026-03-24 17:36:24 +02:00
Shared Fix missing spacing between lists and headings in markdown (#775) 2026-01-14 17:42:26 +02:00
Sidebar feat: Add MCP Integration with client-agnostic instructions (#953) 2026-03-20 16:55:49 +02:00
Tag Fix tag view showing completed projects when Open filter is active (#933) (#934) 2026-03-10 17:07:45 +02:00
Task Fix Today page task completion issues (#970) 2026-03-24 16:45:31 +02:00
UniversalSearch Fix redirect after task deletion to return to originating view (#887) 2026-03-01 16:07:02 +02:00
About.tsx Feat main content revamp (#584) 2025-11-20 09:15:55 +02:00
Areas.tsx Feat main content revamp (#584) 2025-11-20 09:15:55 +02:00
Calendar.tsx Fix redirect after task deletion to return to originating view (#887) 2026-03-01 16:07:02 +02:00
Login.tsx fix: use getAssetPath() for logo images in Navbar and Login (#946) 2026-03-18 15:26:25 +02:00
Navbar.tsx feat: Add MCP Integration with client-agnostic instructions (#953) 2026-03-20 16:55:49 +02:00
Notes.tsx Introduce focus mode in notes (#891) 2026-03-03 00:29:03 +02:00
Projects.tsx Fix projects order persist to localstorage (#868) 2026-02-27 00:35:44 +02:00
Register.tsx Refresh e2e tests (#606) 2025-11-29 21:25:42 +02:00
Sidebar.tsx feat: Add MCP Integration with client-agnostic instructions (#953) 2026-03-20 16:55:49 +02:00
Tags.tsx Feat improve task details (#585) 2025-11-21 18:43:10 +02:00
Tasks.tsx Fix sidebar toggle causing unnecessary task list reload (#888) (#937) 2026-03-10 18:37:07 +02:00
ViewDetail.tsx Fix bug 733 (#735) 2025-12-27 21:00:52 +02:00
Views.tsx Reorder elements (#687) 2025-12-09 10:51:51 +02:00