Skip to content
Merged
Show file tree
Hide file tree
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
Expand Up @@ -78,6 +78,7 @@ export const PipelineSettings: React.FunctionComponent<
onClick={onExportToLanguage}
data-testid="pipeline-toolbar-export-button"
disabled={!isExportToLanguageEnabled}
title="Export to language"
>
<span className={hiddenOnNarrowPipelineToolbarStyles}>
Export to language
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type { ButtonProps } from '@leafygreen-ui/button';
import type { glyphs } from '@leafygreen-ui/icon';
import { spacing } from '@leafygreen-ui/tokens';
import { css, cx } from '@leafygreen-ui/emotion';
import { WorkspaceContainer } from './workspace-container';

export type ItemAction<Action extends string> = {
action: Action;
Expand Down Expand Up @@ -486,6 +487,13 @@ export function ItemActionControls<Action extends string>({
return <ItemActionGroup actions={actions} {...sharedProps}></ItemActionGroup>;
}

const hiddenOnNarrowStyles = css({
[`@container ${WorkspaceContainer.toolbarContainerQueryName} (width < 900px)`]:
{
display: 'none',
},
});

export function DropdownMenuButton<Action extends string>({
isVisible = true,
actions,
Expand Down Expand Up @@ -557,8 +565,9 @@ export function DropdownMenuButton<Action extends string>({
onClick && onClick(evt);
}}
rightGlyph={<Icon glyph={'CaretDown'} />}
title={buttonText}
>
{buttonText}
<span className={hiddenOnNarrowStyles}>{buttonText}</span>
{children}
</Button>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const DeleteMenuButton: React.FunctionComponent<DeleteMenuButtonProps> = ({
onClick={onClick}
leftGlyph={<Icon glyph="Trash"></Icon>}
data-testid="crud-bulk-delete"
title="Delete"
>
<span className={hiddenOnNarrowStyles}>Delete</span>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const UpdateMenuButton: React.FunctionComponent<UpdateMenuButtonProps> = ({
onClick={onClick}
leftGlyph={<Icon glyph="Edit"></Icon>}
data-testid="crud-update"
title="Update"
>
<span className={hiddenOnNarrowStyles}>Update</span>
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function AIExperienceEntry({
onClick={onClick}
data-testid={dataTestId}
type="button"
title={`Generate ${type}`}
>
<span className={hiddenOnNarrowStyles}>Generate {type}</span>
<AIEntrySVG darkMode={darkMode} />
Expand Down
Loading