From 218d6527df062a2df51c2852df11b0df5c0c8f5a Mon Sep 17 00:00:00 2001 From: Pooja Belaramani Date: Thu, 2 Jan 2025 16:45:03 +0530 Subject: [PATCH] fix: global env names overflow --- .../EnvironmentSelector/index.js | 2 +- .../EnvironmentList/StyledWrapper.js | 4 ++++ .../EnvironmentList/index.js | 17 ++++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSelector/index.js b/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSelector/index.js index 8699785729..5bf55809c1 100644 --- a/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSelector/index.js +++ b/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSelector/index.js @@ -23,7 +23,7 @@ const EnvironmentSelector = () => { { - activeEnvironment ?
{activeEnvironment?.name}
: null + activeEnvironment ?
{activeEnvironment?.name}
: null }
diff --git a/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/StyledWrapper.js b/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/StyledWrapper.js index 330ae082c6..dd97615328 100644 --- a/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/StyledWrapper.js +++ b/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/StyledWrapper.js @@ -23,6 +23,10 @@ const StyledWrapper = styled.div` padding: 8px 10px; border-left: solid 2px transparent; text-decoration: none; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; &:hover { text-decoration: none; diff --git a/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/index.js b/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/index.js index ebd953a0d5..d04edd838a 100644 --- a/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/index.js +++ b/packages/bruno-app/src/components/GlobalEnvironments/EnvironmentSettings/EnvironmentList/index.js @@ -8,6 +8,7 @@ import ConfirmSwitchEnv from './ConfirmSwitchEnv'; import ManageSecrets from 'components/Environments/EnvironmentSettings/ManageSecrets/index'; import ImportEnvironment from '../ImportEnvironment'; import { isEqual } from 'lodash'; +import ToolHint from 'components/ToolHint/index'; const EnvironmentList = ({ environments, activeEnvironmentUid, selectedEnvironment, setSelectedEnvironment, isModified, setIsModified }) => { const [openCreateModal, setOpenCreateModal] = useState(false); @@ -112,13 +113,15 @@ const EnvironmentList = ({ environments, activeEnvironmentUid, selectedEnvironme {environments && environments.length && environments.map((env) => ( -
handleEnvironmentClick(env)} // Use handleEnvironmentClick to handle clicks - > - {env.name} -
+ +
handleEnvironmentClick(env)} // Use handleEnvironmentClick to handle click + > + {env.name} +
+
))}
handleCreateEnvClick()}> + Create