fix: add line-clamp and read more toggle to team profile bio (#27742)#28861
Draft
ousamabenyounes wants to merge 1 commit intocalcom:mainfrom
Draft
fix: add line-clamp and read more toggle to team profile bio (#27742)#28861ousamabenyounes wants to merge 1 commit intocalcom:mainfrom
ousamabenyounes wants to merge 1 commit intocalcom:mainfrom
Conversation
…27742) Long team bio text broke the layout by expanding without restriction. This applies the same line-clamp-3 + show more/less toggle pattern already used in the user profile (ProfileBio component). Also adds the missing "show_less" translation key to en/common.json. Generated by Claude Code Vibe coded by ousamabenyounes Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Long team/org bio text expanded without restriction, breaking the page layout. This PR adds the same line-clamp + show more/less toggle pattern already used in the user profile page (
ProfileBiocomponent inusers-public-view.tsx).Changes
apps/web/modules/team/team-view.tsx: Addedline-clamp-3CSS class and a "Show more"/"Show less" toggle button using a callback ref to detect whether the bio text is clampedpackages/i18n/locales/en/common.json: Added missingshow_lesstranslation key (was already used by the user profile'sProfileBiocomponent but the key was missing)Consistency with user profile
The user profile page already handles this correctly via the
ProfileBiocomponent (line 161 inusers-public-view.tsx). This PR replicates the same pattern:useCallbackref to detect ifscrollHeight > clientHeightline-clamp-3class when not expandedMandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist
Generated by Claude Code
Vibe coded by ousamabenyounes