Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit aa92c34

Browse files
committed
clamped the scene name to be 20 characters with an ellipse and a tooltip
1 parent 53fc185 commit aa92c34

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

β€Žpackages/client-core/src/admin/components/scene/SceneItem.tsxβ€Ž

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { EditorState } from '@etherealengine/editor/src/services/EditorServices'
3131
import { useHookstate, useMutableState } from '@etherealengine/hyperflux'
3232
import RenameSceneModal from '@etherealengine/ui/src/components/editor/panels/Scenes/modals/RenameScene'
3333
import ConfirmDialog from '@etherealengine/ui/src/components/tailwind/ConfirmDialog'
34+
import Tooltip from '@etherealengine/ui/src/primitives/mui/Tooltip'
3435
import Button from '@etherealengine/ui/src/primitives/tailwind/Button'
3536
import Text from '@etherealengine/ui/src/primitives/tailwind/Text'
3637
import { default as React, useEffect, useRef } from 'react'
@@ -100,7 +101,12 @@ export const SceneItem = ({ scene, updateEditorState, handleOpenScene, refetchPr
100101
<div className="inline-flex w-full flex-col items-start justify-start">
101102
<div className="space-between flex w-full flex-row">
102103
<Text component="h3" fontWeight="light" className="leading-6 text-neutral-100">
103-
{sceneName}
104+
{sceneName.length > 20 && (
105+
<Tooltip title={sceneName}>
106+
<div>{sceneName.substring(0, 20)} ...</div>
107+
</Tooltip>
108+
)}
109+
{sceneName.length <= 20 && <div>{sceneName}</div>}
104110
</Text>
105111
</div>
106112
<Text component="h3" fontSize="xs" fontWeight="light" className="h-3.5 w-40 leading-5 text-neutral-100">

0 commit comments

Comments
Β (0)