Skip to content

Commit a0c4d2b

Browse files
authored
Merge pull request #427 from DLR-SC/fix/filter-name
Fix filter action display on long filter names
2 parents 8dbe651 + 3c27f8b commit a0c4d2b

File tree

4 files changed

+22
-3
lines changed

4 files changed

+22
-3
lines changed

docs/changelog/changelog-de.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ SPDX-License-Identifier: CC-BY-4.0
3838
- Ein Fehler wurde behoben, wo Daten angezeigt wurden, obwohl kein Szenario aufgedeckt war.
3939
- Die Gruppenfilter funktionieren wieder.
4040
- Die Menüpunkte Impressum, Datenschutzerklärung, Barrierefreiheit, Attribution und Versionshistorie sind wieder erreichbar ohne die Seite zum Absturz zu bringen.
41+
- Ein Anzeigeproblem bei langen Filternamen wurde behoben, bei dem die Aktionsschaltflächen bei sehr langen Filternamen nicht zugänglich waren.
42+
4143
---
4244

4345
## v0.3.1-beta

docs/changelog/changelog-en.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ SPDX-License-Identifier: CC-BY-4.0
3838
- A bug was fixed where data was shown while no scenario was active.
3939
- The group filters are working again.
4040
- The menu items Imprint, Privacy Policy, Accessibility, Attribution, and Changelog are available again without crashing the page.
41+
- Fixed a long filter name display issues where the action button is not accessible when using long filter names.
4142

4243
---
4344

src/components/ScenarioComponents/FilterComponents/GroupFilterCard.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,33 @@ export default function GroupFilterCard({
8080
onClick={() => {
8181
selectFilterCallback(selected ? null : item);
8282
}}
83+
sx={{
84+
flex: 1,
85+
minWidth: 0,
86+
}}
8387
>
84-
<CardContent sx={{backgroundColor: selected ? theme.palette.info.main : theme.palette.background.paper}}>
88+
<CardContent
89+
sx={{
90+
backgroundColor: selected ? theme.palette.info.main : theme.palette.background.paper,
91+
}}
92+
>
8593
<Typography
8694
variant='body1'
87-
sx={{color: selected ? theme.palette.primary.contrastText : theme.palette.text.primary}}
95+
sx={{
96+
color: selected ? theme.palette.primary.contrastText : theme.palette.text.primary,
97+
overflow: 'hidden',
98+
textOverflow: 'ellipsis',
99+
whiteSpace: 'nowrap',
100+
maxWidth: '100%',
101+
}}
102+
title={item.name} // Show full name on hover
88103
>
89104
{item.name}
90105
</Typography>
91106
</CardContent>
92107
</CardActionArea>
93108
<Divider orientation='vertical' variant='middle' flexItem />
94-
<CardActions>
109+
<CardActions sx={{flexShrink: 0}}>
95110
<Checkbox
96111
checkedIcon={<Visibility />}
97112
icon={<VisibilityOffOutlined color='disabled' />}

src/components/ScenarioComponents/FilterComponents/ManageGroupDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ export default function ManageGroupDialog({
228228
flexDirection: 'column',
229229
justifyContent: 'center',
230230
alignItems: 'center',
231+
padding: 4,
231232
}}
232233
>
233234
<Typography variant='body1'>

0 commit comments

Comments
 (0)