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

[Backport 2.x] Condence context menus #7286

Merged
merged 1 commit into from
Jul 18, 2024
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 @@ -183,7 +183,7 @@ export class ConsoleMenu extends Component<Props, State> {
panelPaddingSize="none"
anchorPosition="downLeft"
>
<EuiContextMenuPanel items={items} />
<EuiContextMenuPanel items={items} size="s" />
</EuiPopover>
</span>
);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/ui/filter_bar/filter_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ export function FilterItem(props: Props) {
anchorPosition="downLeft"
panelPaddingSize="none"
>
<EuiContextMenu initialPanelId={0} panels={getPanels()} />
<EuiContextMenu initialPanelId={0} panels={getPanels()} size="s" />
</EuiPopover>
);
}
4 changes: 2 additions & 2 deletions src/plugins/data/public/ui/filter_bar/filter_options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ class FilterOptionsUI extends Component<Props, State> {
panelPaddingSize="none"
repositionOnScroll
>
<EuiPopoverTitle>
<EuiPopoverTitle paddingSize="s">
<FormattedMessage
id="data.filter.searchBar.changeAllFiltersTitle"
defaultMessage="Change all filters"
/>
</EuiPopoverTitle>
<EuiContextMenu initialPanelId={0} panels={[panelTree]} />
<EuiContextMenu initialPanelId={0} panels={[panelTree]} size="s" />
</EuiPopover>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export default function DiscoverCanvas({ setHeaderActionMenu, history }: ViewPro
>
<EuiContextMenu
initialPanelId={0}
size="s"
panels={[
{
id: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function SavedObjectFinderCreateNew({ menuItems }: Props) {
panelPaddingSize="none"
anchorPosition="downRight"
>
<EuiContextMenuPanel items={menuItems} />
<EuiContextMenuPanel items={menuItems} size="s" />
</EuiPopover>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,15 @@ export class CreateButton extends Component<Props, State> {
anchorPosition="downLeft"
>
<EuiContextMenuPanel
size="s"
items={options.map((option) => {
return (
<EuiContextMenuItem
key={option.text}
onClick={option.onClick}
data-test-subj={option.testSubj}
>
<EuiDescriptionList style={{ whiteSpace: 'nowrap' }}>
<EuiDescriptionList style={{ whiteSpace: 'nowrap' }} compressed={true}>
<EuiDescriptionListTitle>
{option.text}
{option.isBeta ? <Fragment> {this.renderBetaBadge()}</Fragment> : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class IndicesList extends React.Component<IndicesListProps, IndicesListSt
closePopover={this.closePerPageControl}
panelPaddingSize="none"
>
<EuiContextMenuPanel items={items} />
<EuiContextMenuPanel items={items} size="s" />
</EuiPopover>
</EuiFlexItem>
{paginationControls}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class InspectorViewChooser extends Component<Props, State> {
anchorPosition="downRight"
repositionOnScroll
>
<EuiContextMenuPanel items={views.map(this.renderView)} />
<EuiContextMenuPanel items={views.map(this.renderView)} size="s" />
</EuiPopover>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class DataDownloadOptions extends Component<DataDownloadOptionsProps, DataDownlo
panelPaddingSize="none"
repositionOnScroll
>
<EuiContextMenuPanel className="eui-textNoWrap" items={items} />
<EuiContextMenuPanel className="eui-textNoWrap" items={items} size="s" />
</EuiPopover>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export class RequestSelector extends Component<RequestSelectorProps, RequestSele
<EuiContextMenuPanel
items={this.props.requests.map(this.renderRequestDropdownItem)}
data-test-subj="inspectorRequestChooserMenuPanel"
size="s"
/>
</EuiPopover>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ class SavedObjectFinderUi extends React.Component<
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
items={this.getSortOptions()}
size="s"
/>
</EuiPopover>
{this.props.showFilter && (
Expand Down Expand Up @@ -456,6 +457,7 @@ class SavedObjectFinderUi extends React.Component<
>
<EuiContextMenuPanel
watchedItemProps={['icon', 'disabled']}
size="s"
items={this.props.savedObjectMetaData.map((metaData) => (
<EuiContextMenuItem
key={metaData.type}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export class ShareContextMenu extends Component<Props> {
initialPanelId={initialPanelId}
panels={panels}
data-test-subj="shareContextMenu"
size="s"
/>
</I18nProvider>
);
Expand Down
25 changes: 14 additions & 11 deletions src/plugins/share/public/components/url_panel_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
EuiFlexItem,
EuiForm,
EuiFormRow,
EuiText,
EuiIconTip,
EuiLoadingSpinner,
EuiRadioGroup,
Expand Down Expand Up @@ -135,17 +136,19 @@ export class UrlPanelContent extends Component<Props, State> {
data-test-subj="copyShareUrlButton"
size="s"
>
{this.props.isEmbedded ? (
<FormattedMessage
id="share.urlPanel.copyIframeCodeButtonLabel"
defaultMessage="Copy iFrame code"
/>
) : (
<FormattedMessage
id="share.urlPanel.copyLinkButtonLabel"
defaultMessage="Copy link"
/>
)}
<EuiText size="s">
{this.props.isEmbedded ? (
<FormattedMessage
id="share.urlPanel.copyIframeCodeButtonLabel"
defaultMessage="Copy iFrame code"
/>
) : (
<FormattedMessage
id="share.urlPanel.copyLinkButtonLabel"
defaultMessage="Copy link"
/>
)}
</EuiText>
</EuiButton>
)}
</EuiCopy>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function DefaultEditorAggAdd({
repositionOnScroll={true}
closePopover={() => setIsPopoverOpen(false)}
>
<EuiPopoverTitle>
<EuiPopoverTitle paddingSize="s">
{(groupName !== AggGroupNames.Buckets || !stats.count) && (
<FormattedMessage
id="visDefaultEditor.aggAdd.addGroupButtonLabel"
Expand All @@ -116,6 +116,7 @@ function DefaultEditorAggAdd({
)}
</EuiPopoverTitle>
<EuiContextMenuPanel
size="s"
items={schemas.map((schema) => (
<EuiContextMenuItem
key={`${schema.name}_${schema.title}`}
Expand Down
Loading