@@ -116,15 +116,23 @@ export const ProfileCompletionPage: FC = () => {
116116 const displayedRows = useMemo ( ( ) => profiles
117117 . map ( profile => {
118118 const userSkills = profile . userId ? ( memberSkills . get ( profile . userId ) || [ ] ) : [ ]
119- const principalSkills = userSkills
120- . filter ( skill => skill . displayMode ?. name === UserSkillDisplayModes . principal )
121- . slice ( 0 , 5 )
119+
120+ // Prioritize principal skills, then add additional skills
121+ const allSkillsByPriority = [
122+ ...userSkills . filter ( skill => skill . displayMode ?. name === UserSkillDisplayModes . principal ) ,
123+ ...userSkills . filter ( skill => skill . displayMode ?. name !== UserSkillDisplayModes . principal ) ,
124+ ]
125+
126+ const displayedSkills = allSkillsByPriority . slice ( 0 , 5 )
127+ const additionalSkillsCount = Math . max ( 0 , allSkillsByPriority . length - 5 )
122128
123129 return {
124130 ...profile ,
131+ additionalSkillsCount,
125132 countryLabel : profile . countryCode
126133 ? countryMap . get ( profile . countryCode ) || profile . countryName || profile . countryCode
127134 : profile . countryName || '-' ,
135+ displayedSkills,
128136 fullName : [ profile . firstName , profile . lastName ] . filter ( Boolean )
129137 . join ( ' ' )
130138 . trim ( ) ,
@@ -133,7 +141,6 @@ export const ProfileCompletionPage: FC = () => {
133141 : profile . countryName ]
134142 . filter ( Boolean )
135143 . join ( ', ' ) ,
136- principalSkills,
137144 }
138145 } )
139146 . sort ( ( a , b ) => a . handle . localeCompare ( b . handle ) ) , [ profiles , countryMap , memberSkills ] )
@@ -195,8 +202,7 @@ export const ProfileCompletionPage: FC = () => {
195202 < th > Handle</ th >
196203 < th > Location</ th >
197204 < th > Skills</ th >
198- < th > Principal Skills</ th >
199- < th > Go to profile</ th >
205+ < th > { ' ' } </ th >
200206 </ tr >
201207 </ thead >
202208 < tbody >
@@ -224,22 +230,30 @@ export const ProfileCompletionPage: FC = () => {
224230 </ a >
225231 </ td >
226232 < td > { profile . locationLabel || profile . countryLabel } </ td >
227- < td > { profile . skillCount ?? '-' } </ td >
228233 < td >
229- { profile . principalSkills && profile . principalSkills . length > 0 ? (
234+ { profile . displayedSkills && profile . displayedSkills . length > 0 ? (
230235 < div className = { styles . skillsList } >
231- { profile . principalSkills . map ( skill => (
236+ { profile . displayedSkills . map ( skill => (
232237 < span key = { skill . id } className = { styles . skillTag } >
233238 { skill . name }
234239 </ span >
235240 ) ) }
241+ { profile . additionalSkillsCount > 0 && (
242+ < span className = { styles . moreIndicator } >
243+ +
244+ { profile . additionalSkillsCount }
245+ { ' ' }
246+ skills
247+ </ span >
248+ ) }
236249 </ div >
237250 ) : (
238251 '-'
239252 ) }
240253 </ td >
241254 < td >
242255 < a
256+ className = { styles . link }
243257 href = { `${ EnvironmentConfig . USER_PROFILE_URL } /${ profile . handle } ` }
244258 target = '_blank'
245259 rel = 'noreferrer noopener'
0 commit comments