From 88acfcaeefcb43fdb20052390552140bfd435521 Mon Sep 17 00:00:00 2001 From: lianahus Date: Fri, 13 Oct 2023 16:01:57 +0200 Subject: [PATCH 1/3] FE item width, scroll removed --- libs/remix-ui/workspace/src/lib/components/file-label.tsx | 4 ++-- libs/remix-ui/workspace/src/lib/css/file-explorer.css | 6 +++++- libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/components/file-label.tsx b/libs/remix-ui/workspace/src/lib/components/file-label.tsx index ce1d6d513a..035de93384 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-label.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-label.tsx @@ -67,14 +67,14 @@ export const FileLabel = (props: FileLabelProps) => { return (
- + {file.name}
diff --git a/libs/remix-ui/workspace/src/lib/css/file-explorer.css b/libs/remix-ui/workspace/src/lib/css/file-explorer.css index b67c5f24c7..c49a0a54a7 100644 --- a/libs/remix-ui/workspace/src/lib/css/file-explorer.css +++ b/libs/remix-ui/workspace/src/lib/css/file-explorer.css @@ -33,7 +33,11 @@ input[type="file"] { margin-left : 20px; } .remixui_items { - display : inline + display : inline; + white-space : nowrap; + overflow : hidden; + text-overflow : ellipsis; + max-width : 90%; } .remixui_remove { margin-left : auto; diff --git a/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css b/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css index cc26e166be..24c7d462c6 100644 --- a/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css +++ b/libs/remix-ui/workspace/src/lib/css/remix-ui-workspace.css @@ -40,7 +40,7 @@ cursor : pointer; } .remixui_treeview { - overflow-y : auto; + overflow-x : hidden; } .remixui_dialog { display: flex; From cd27e8038ac3db2a6ddacaf3348fee4b6fa0626f Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 16 Oct 2023 12:23:55 +0200 Subject: [PATCH 2/3] tooltips on file names --- .../src/lib/components/Icon.tsx | 6 +++++- .../src/lib/components/file-label.tsx | 18 +++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx index ef97419ba9..49ffcf2387 100644 --- a/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx +++ b/libs/remix-ui/vertical-icons-panel/src/lib/components/Icon.tsx @@ -86,7 +86,11 @@ const Icon = ({iconRecord, verticalIconPlugin, contextMenuAction, theme}: IconPr return ( <> - +
{ diff --git a/libs/remix-ui/workspace/src/lib/components/file-label.tsx b/libs/remix-ui/workspace/src/lib/components/file-label.tsx index 035de93384..017b8219e9 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-label.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-label.tsx @@ -1,5 +1,7 @@ // eslint-disable-next-line no-use-before-define import {fileDecoration} from '@remix-ui/file-decorators' +import {CustomTooltip} from '@remix-ui/helper' +import {FormattedMessage} from 'react-intl' import React, {useEffect, useRef, useState} from 'react' import {FileType} from '../types' export interface FileLabelProps { @@ -65,6 +67,8 @@ export const FileLabel = (props: FileLabelProps) => { labelRef.current.innerText = file.name } + // The tooltip is setted up on the label and not the whole line to avoid unnecessary tooltips on the short filenames. + // It has the delay for the same reason. return (
{ onKeyDown={handleEditInput} onBlur={handleEditBlur} > - - {file.name} - + + + {file.name} + +
) } From a2dd1db08675edc360835b0dc942f9793ff2fa85 Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 16 Oct 2023 12:27:15 +0200 Subject: [PATCH 3/3] changed to the path as discussed --- libs/remix-ui/workspace/src/lib/components/file-label.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/remix-ui/workspace/src/lib/components/file-label.tsx b/libs/remix-ui/workspace/src/lib/components/file-label.tsx index 017b8219e9..c9752a822d 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-label.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-label.tsx @@ -81,7 +81,7 @@ export const FileLabel = (props: FileLabelProps) => {