From 00dccd86b4418381b87e338eb94066fb76f21dc9 Mon Sep 17 00:00:00 2001 From: BOUTIER Charly Date: Fri, 8 Dec 2023 18:29:41 +0100 Subject: [PATCH 1/2] Fixes ellipsis in the about dialog that could hide the module's version. Signed-off-by: BOUTIER Charly --- src/components/TopBar/AboutDialog.js | 57 ++++++++++++++++++---------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/src/components/TopBar/AboutDialog.js b/src/components/TopBar/AboutDialog.js index f0199c27..76550ff1 100644 --- a/src/components/TopBar/AboutDialog.js +++ b/src/components/TopBar/AboutDialog.js @@ -22,6 +22,7 @@ import { Fade, Grid, Stack, + Tooltip, Typography, useMediaQuery, useTheme, @@ -377,26 +378,44 @@ const Module = ({ type, name, version, license }) => { }, }} > - - {ModuleTypesIcons[type] || ModuleTypesIcons['other']} - - {name || ''} - - theme.palette.text.secondary} - display="inline" - marginLeft={1} - noWrap + ') + ' ' + (version || '')}> + - {version || null} - - + + {ModuleTypesIcons[type] || ModuleTypesIcons['other']} + + + {name || ''} + + + theme.palette.text.secondary} + display="inline" + noWrap + > + {version || null} + + + + ); }; From 596ad7fdfacf0812187262e7489a0c3313732424 Mon Sep 17 00:00:00 2001 From: BOUTIER Charly Date: Mon, 11 Dec 2023 15:18:00 +0100 Subject: [PATCH 2/2] PR Review Signed-off-by: BOUTIER Charly --- src/components/TopBar/AboutDialog.js | 54 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/src/components/TopBar/AboutDialog.js b/src/components/TopBar/AboutDialog.js index 76550ff1..d24dc1e0 100644 --- a/src/components/TopBar/AboutDialog.js +++ b/src/components/TopBar/AboutDialog.js @@ -359,10 +359,24 @@ AboutDialog.propTypes = { getAdditionalModules: PropTypes.func, }; +const style = { + icons: { + flexGrow: 0, + position: 'relative', + top: '4px', + flexShrink: 0, + }, + version: { + flexGrow: 0, + alignSelf: 'flex-end', + flexShrink: 0, + }, +}; + const ModuleTypesIcons = { - app: , - server: , - other: , + app: , + server: , + other: , }; const Module = ({ type, name, version, license }) => { @@ -385,35 +399,19 @@ const Module = ({ type, name, version, license }) => { alignItems="baseline" spacing={1} > - - {ModuleTypesIcons[type] || ModuleTypesIcons['other']} - + {ModuleTypesIcons[type] || ModuleTypesIcons['other']} {name || ''} - theme.palette.text.secondary} + display="inline" + noWrap + sx={style.version} > - theme.palette.text.secondary} - display="inline" - noWrap - > - {version || null} - - + {version || null} +