Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule Name Alt Text Expansion #1077

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Changes from all 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
@@ -1,5 +1,5 @@
import { ArrowDropDown as ArrowDropDownIcon } from '@mui/icons-material';
import { Box, Button, Popover, Typography, useTheme } from '@mui/material';
import { Box, Button, Popover, Typography, useTheme, Tooltip } from '@mui/material';
import { useCallback, useEffect, useMemo, useState } from 'react';

import { changeCurrentSchedule } from '$actions/AppStoreActions';
Expand Down Expand Up @@ -83,18 +83,20 @@ export function SelectSchedulePopover(props: { scheduleNames: string[] }) {

return (
<Box>
<Button
size="small"
color="inherit"
variant="outlined"
onClick={handleClick}
sx={{ minWidth, maxWidth, justifyContent: 'space-between' }}
>
<Typography whiteSpace="nowrap" textOverflow="ellipsis" overflow="hidden" textTransform="none">
{currentScheduleName}
</Typography>
<ArrowDropDownIcon />
</Button>
<Tooltip title={currentScheduleName} enterDelay={200} disableInteractive>
<Button
size="small"
color="inherit"
variant="outlined"
onClick={handleClick}
sx={{ minWidth, maxWidth, justifyContent: 'space-between' }}
>
<Typography whiteSpace="nowrap" textOverflow="ellipsis" overflow="hidden" textTransform="none">
{currentScheduleName}
</Typography>
<ArrowDropDownIcon />
</Button>
</Tooltip>

<Popover
open={open}
Expand All @@ -106,28 +108,32 @@ export function SelectSchedulePopover(props: { scheduleNames: string[] }) {
{props.scheduleNames.map((name, index) => (
<Box key={index} display="flex" alignItems="center" gap={1}>
<Box flexGrow={1}>
<Button
color="inherit"
sx={{
minWidth,
maxWidth,
width: '100%',
display: 'flex',
justifyContent: 'flex-start',
background:
index === currentScheduleIndex ? theme.palette.action.selected : undefined,
}}
onClick={createScheduleSelector(index)}
>
<Typography
overflow="hidden"
whiteSpace="nowrap"
textTransform="none"
textOverflow="ellipsis"
<Tooltip title={name} enterDelay={200} disableInteractive>
<Button
color="inherit"
sx={{
minWidth,
maxWidth,
width: '100%',
display: 'flex',
justifyContent: 'flex-start',
background:
index === currentScheduleIndex
? theme.palette.action.selected
: undefined,
}}
onClick={createScheduleSelector(index)}
>
{name}
</Typography>
</Button>
<Typography
overflow="hidden"
whiteSpace="nowrap"
textTransform="none"
textOverflow="ellipsis"
>
{name}
</Typography>
</Button>
</Tooltip>
</Box>
<Box display="flex" alignItems="center" gap={0.5}>
<CopyScheduleButton index={index} disabled={skeletonMode} />
Expand Down