mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
* feat: changing chat to use cm6 editor instead to allow for mentions display and autocomplete * feat: changing review panel comment, edit, and reply to also use cm6 editor to enable mentions * feat: updating tests, and moving from jsdom to cypress tests as jsdom cant handle cm6 * feat: centralizing mentions component and applying to both chat and review-panel * feat: centralizing mentions input, and using changesUsers in chat mentions * fixing dark mode styles of chat * feat: updating mentions dropdown style and adding custom icon generation for mentions cm6 autocomplete tooltip * feat: making mentions look like links, and fixing border radius on tooltip * fix: naming and using correct color util * feat: fixing hover on highlight * update scroll bar dance in review panel when a system had persistent scroll bars, we would run into issues calculating the height of the review panel Co-authored-by: Kristina <7614497+khjrtbrg@users.noreply.github.com> --------- Co-authored-by: Kristina <7614497+khjrtbrg@users.noreply.github.com> GitOrigin-RevId: 96441ad55f9614427506edfecf3d87bae82d1607
18 lines
295 B
TypeScript
18 lines
295 B
TypeScript
export const buildName = (user: {
|
|
first_name?: string
|
|
last_name?: string
|
|
email?: string
|
|
}) => {
|
|
const name = [user.first_name, user.last_name].filter(Boolean).join(' ')
|
|
|
|
if (name) {
|
|
return name
|
|
}
|
|
|
|
if (user.email) {
|
|
return user.email.split('@')[0]
|
|
}
|
|
|
|
return 'Unknown'
|
|
}
|