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

Ir 2790 mouseover tooltip to show fullname #10456

Merged
merged 6 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ const ResourceFile = ({ resource }: { resource: StaticResourceType }) => {
<span className="mb-[5px] h-[70px] w-[70px] text-[70px]">
<FileIcon thumbnailURL={resource.thumbnailURL} type={assetType} />
</span>
<span className="w-[100px] overflow-hidden overflow-ellipsis whitespace-nowrap text-sm text-white">{name}</span>

<Tooltip title={t(name)} direction="bottom">
<span className="w-[100px] overflow-hidden overflow-ellipsis whitespace-nowrap text-sm text-white">{name}</span>
</Tooltip>

<ContextMenu
anchorEvent={anchorEvent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { VscBlank } from 'react-icons/vsc'
import { twMerge } from 'tailwind-merge'
import { Vector3 } from 'three'
import Button from '../../../../../primitives/tailwind/Button'
import Tooltip from '../../../../../primitives/tailwind/Tooltip'
import { FileIcon } from '../icon'
import DeleteFileModal from './DeleteFileModal'
import RenameFileModal from './RenameFileModal'
Expand Down Expand Up @@ -160,6 +161,8 @@ export const FileGridItem: React.FC<FileGridItemProps> = (props) => {
const { projectName } = useMutableState(EditorState)
const staticResource = useFind(staticResourcePath, { query: { key: props.item.key, project: projectName.value! } })
const thumbnailURL = staticResource.data[0]?.thumbnailURL
const { t } = useTranslation()

return (
<div
className={`flex h-32 w-28 cursor-pointer flex-col items-center text-center ${
Expand All @@ -183,7 +186,12 @@ export const FileGridItem: React.FC<FileGridItemProps> = (props) => {
color="text-[#375DAF]"
/>
</div>
<div className="text-secondary mb-2 line-clamp-1 w-full text-wrap break-all text-sm">{props.item.fullName}</div>

<Tooltip title={t(props.item.fullName)} direction="bottom">
<div className="text-secondary relative mb-2 line-clamp-1 w-full text-wrap break-all text-sm ">
{props.item.fullName}
</div>
</Tooltip>
</div>
)
}
Expand Down Expand Up @@ -227,7 +235,6 @@ export function FileBrowserItem({
const [anchorEvent, setAnchorEvent] = React.useState<undefined | React.MouseEvent<HTMLDivElement>>(undefined)

const fileService = useMutation(fileBrowserPath)

const handleContextMenu = (event: React.MouseEvent<HTMLDivElement>) => {
event.preventDefault()
event.stopPropagation()
Expand Down
Loading