Skip to content

Commit 8671616

Browse files
authored
chore: also collapse Add Data and Export Data, add title attributes COMPASS-8231 (#6170)
also collapse Add Data and Export Data, add title attributes
1 parent 4b81a9b commit 8671616

File tree

5 files changed

+14
-1
lines changed

5 files changed

+14
-1
lines changed

packages/compass-aggregations/src/components/pipeline-toolbar/pipeline-settings/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export const PipelineSettings: React.FunctionComponent<
7878
onClick={onExportToLanguage}
7979
data-testid="pipeline-toolbar-export-button"
8080
disabled={!isExportToLanguageEnabled}
81+
title="Export to language"
8182
>
8283
<span className={hiddenOnNarrowPipelineToolbarStyles}>
8384
Export to language

packages/compass-components/src/components/item-action-controls.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import type { ButtonProps } from '@leafygreen-ui/button';
1818
import type { glyphs } from '@leafygreen-ui/icon';
1919
import { spacing } from '@leafygreen-ui/tokens';
2020
import { css, cx } from '@leafygreen-ui/emotion';
21+
import { WorkspaceContainer } from './workspace-container';
2122

2223
export type ItemAction<Action extends string> = {
2324
action: Action;
@@ -486,6 +487,13 @@ export function ItemActionControls<Action extends string>({
486487
return <ItemActionGroup actions={actions} {...sharedProps}></ItemActionGroup>;
487488
}
488489

490+
const hiddenOnNarrowStyles = css({
491+
[`@container ${WorkspaceContainer.toolbarContainerQueryName} (width < 900px)`]:
492+
{
493+
display: 'none',
494+
},
495+
});
496+
489497
export function DropdownMenuButton<Action extends string>({
490498
isVisible = true,
491499
actions,
@@ -557,8 +565,9 @@ export function DropdownMenuButton<Action extends string>({
557565
onClick && onClick(evt);
558566
}}
559567
rightGlyph={<Icon glyph={'CaretDown'} />}
568+
title={buttonText}
560569
>
561-
{buttonText}
570+
<span className={hiddenOnNarrowStyles}>{buttonText}</span>
562571
{children}
563572
</Button>
564573
);

packages/compass-crud/src/components/delete-data-menu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const DeleteMenuButton: React.FunctionComponent<DeleteMenuButtonProps> = ({
3131
onClick={onClick}
3232
leftGlyph={<Icon glyph="Trash"></Icon>}
3333
data-testid="crud-bulk-delete"
34+
title="Delete"
3435
>
3536
<span className={hiddenOnNarrowStyles}>Delete</span>
3637
</Button>

packages/compass-crud/src/components/update-data-menu.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const UpdateMenuButton: React.FunctionComponent<UpdateMenuButtonProps> = ({
3131
onClick={onClick}
3232
leftGlyph={<Icon glyph="Edit"></Icon>}
3333
data-testid="crud-update"
34+
title="Update"
3435
>
3536
<span className={hiddenOnNarrowStyles}>Update</span>
3637
</Button>

packages/compass-generative-ai/src/components/ai-experience-entry.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ function AIExperienceEntry({
105105
onClick={onClick}
106106
data-testid={dataTestId}
107107
type="button"
108+
title={`Generate ${type}`}
108109
>
109110
<span className={hiddenOnNarrowStyles}>Generate {type}</span>
110111
<AIEntrySVG darkMode={darkMode} />

0 commit comments

Comments
 (0)