Skip to content

Commit

Permalink
[Top Menu] Increase size of top menu links to s (#103144)
Browse files Browse the repository at this point in the history
* Increased non-emphasized header links size from `xs` to `s`
* [Observability] Updating header links to use EuiHeaderLink
* [Spaces Menu] Larger spinner
* [Help Menu] Increase size of links
* [Canvas] Increase size to `s`
  • Loading branch information
cchaos committed Jul 12, 2021
1 parent eae975e commit 42c743b
Show file tree
Hide file tree
Showing 27 changed files with 134 additions and 194 deletions.
12 changes: 6 additions & 6 deletions src/core/public/chrome/ui/header/header_help_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class HeaderHelpMenu extends Component<Props, State> {

return (
<Fragment>
<EuiButtonEmpty href={kibanaDocLink} target="_blank" size="xs" flush="left">
<EuiButtonEmpty href={kibanaDocLink} target="_blank" size="s" flush="left">
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuKibanaDocumentationTitle"
defaultMessage="Kibana documentation"
Expand All @@ -220,7 +220,7 @@ export class HeaderHelpMenu extends Component<Props, State> {

<EuiSpacer size="xs" />

<EuiButtonEmpty href={helpSupportUrl} target="_blank" size="xs" flush="left">
<EuiButtonEmpty href={helpSupportUrl} target="_blank" size="s" flush="left">
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuAskElasticTitle"
defaultMessage="Ask Elastic"
Expand All @@ -229,7 +229,7 @@ export class HeaderHelpMenu extends Component<Props, State> {

<EuiSpacer size="xs" />

<EuiButtonEmpty href={KIBANA_FEEDBACK_LINK} target="_blank" size="xs" flush="left">
<EuiButtonEmpty href={KIBANA_FEEDBACK_LINK} target="_blank" size="s" flush="left">
<FormattedMessage
id="core.ui.chrome.headerGlobalNav.helpMenuGiveFeedbackTitle"
defaultMessage="Give feedback"
Expand All @@ -241,7 +241,7 @@ export class HeaderHelpMenu extends Component<Props, State> {
<EuiButtonEmpty
href={GITHUB_CREATE_ISSUE_LINK}
target="_blank"
size="xs"
size="s"
iconType="logoGithub"
flush="left"
>
Expand Down Expand Up @@ -330,7 +330,7 @@ export class HeaderHelpMenu extends Component<Props, State> {
{customLinks}
{content && (
<>
{customLinks && <EuiSpacer size="s" />}
{customLinks && <EuiSpacer size="xs" />}
<HeaderExtension extension={content} />
</>
)}
Expand Down Expand Up @@ -383,7 +383,7 @@ const createCustomLink = (
) => {
return (
<Fragment key={`helpButton${index}`}>
<EuiButtonEmpty {...buttonProps} size="xs" flush="left">
<EuiButtonEmpty {...buttonProps} size="s" flush="left">
{text}
</EuiButtonEmpty>
{addSpacer && <EuiSpacer size="xs" />}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/public/ui/filter_bar/filter_bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function FilterBarUI(props: Props) {

const button = (
<EuiButtonEmpty
size="xs"
size="s"
onClick={() => setIsAddFilterPopoverOpen(true)}
data-test-subj="addFilter"
className="globalFilterBar__addButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const IndexPatternTable = ({ canSave, history }: Props) => {
}
) => (
<>
<EuiButtonEmpty size="xs" {...reactRouterNavigate(history, `patterns/${index.id}`)}>
<EuiButtonEmpty size="s" {...reactRouterNavigate(history, `patterns/${index.id}`)}>
{name}
</EuiButtonEmpty>
&emsp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function TopNavMenuItem(props: TopNavMenuData) {
{upperFirst(props.label || props.id!)}
</EuiButton>
) : (
<EuiHeaderLink size="xs" color="primary" {...commonButtonProps}>
<EuiHeaderLink size="s" color="primary" {...commonButtonProps}>
{upperFirst(props.label || props.id!)}
</EuiHeaderLink>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
*/

import React from 'react';
import {
EuiButtonEmpty,
EuiFlexGroup,
EuiFlexItem,
EuiToolTip,
} from '@elastic/eui';
import { EuiHeaderLinks, EuiHeaderLink, EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import {
createExploratoryViewUrl,
Expand Down Expand Up @@ -62,38 +57,29 @@ export function UXActionMenu({
<HeaderMenuPortal
setHeaderActionMenu={appMountParameters.setHeaderActionMenu}
>
<EuiFlexGroup
alignItems="center"
gutterSize="s"
responsive={false}
style={{ paddingRight: 20 }}
>
<EuiFlexItem>
<EuiToolTip position="top" content={<p>{ANALYZE_MESSAGE}</p>}>
<EuiButtonEmpty
size="xs"
color="text"
href={uxExploratoryViewLink}
iconType="visBarVerticalStacked"
>
{ANALYZE_DATA}
</EuiButtonEmpty>
</EuiToolTip>
</EuiFlexItem>
<EuiFlexItem>
<EuiButtonEmpty
iconType="indexOpen"
iconSide="left"
href={kibana.services?.application?.getUrlForApp(
'/home#/tutorial/apm'
)}
<EuiHeaderLinks gutterSize="xs">
<EuiToolTip position="top" content={<p>{ANALYZE_MESSAGE}</p>}>
<EuiHeaderLink
color="text"
href={uxExploratoryViewLink}
iconType="visBarVerticalStacked"
>
{i18n.translate('xpack.apm.addDataButtonLabel', {
defaultMessage: 'Add data',
})}
</EuiButtonEmpty>
</EuiFlexItem>
</EuiFlexGroup>
{ANALYZE_DATA}
</EuiHeaderLink>
</EuiToolTip>
<EuiHeaderLink
color="primary"
iconType="indexOpen"
iconSide="left"
href={kibana.services?.application?.getUrlForApp(
'/home#/tutorial/apm'
)}
>
{i18n.translate('xpack.apm.addDataButtonLabel', {
defaultMessage: 'Add data',
})}
</EuiHeaderLink>
</EuiHeaderLinks>
</HeaderMenuPortal>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export function AlertingPopoverAndFlyout({

const button = (
<EuiHeaderLink
size="xs"
color="text"
iconType="arrowDown"
iconSide="right"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function AnomalyDetectionSetupLink() {

return (
<EuiHeaderLink
size="xs"
color="text"
href={getAPMHref({ basePath, path: '/settings/anomaly-detection' })}
style={{ whiteSpace: 'nowrap' }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function ApmHeaderActionMenu() {

return (
<EuiHeaderLinks gutterSize="xs">
<EuiHeaderLink size="xs" color="text" href={apmHref('/settings')}>
<EuiHeaderLink color="text" href={apmHref('/settings')}>
{i18n.translate('xpack.apm.settingsLinkLabel', {
defaultMessage: 'Settings',
})}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const FunctionReferenceGenerator: FC<Props> = ({ functionRegistry }) => {
};

return (
<EuiButtonEmpty color="danger" flush="left" size="xs" iconType="beaker" onClick={copyDocs}>
<EuiButtonEmpty color="danger" flush="left" size="s" iconType="beaker" onClick={copyDocs}>
Generate function reference
</EuiButtonEmpty>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export const HelpMenu: FC<Props> = ({ functionRegistry }) => {

return (
<>
<EuiButtonEmpty size="xs" flush="left" iconType="keyboardShortcut" onClick={showFlyout}>
<EuiButtonEmpty size="s" flush="left" iconType="keyboardShortcut" onClick={showFlyout}>
{strings.getKeyboardShortcutsLinkLabel()}
</EuiButtonEmpty>

{FunctionReferenceGenerator ? (
<Suspense fallback={null}>
<EuiSpacer size="s" />
<EuiSpacer size="xs" />
<FunctionReferenceGenerator functionRegistry={functionRegistry} />
</Suspense>
) : null}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export const EditMenu: FunctionComponent<Props> = ({

const editControl = (togglePopover: React.MouseEventHandler<any>) => (
<EuiButtonEmpty
size="xs"
size="s"
aria-label={strings.getEditMenuLabel()}
onClick={togglePopover}
data-test-subj="canvasWorkpadEditMenuButton"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const ShareMenu: FunctionComponent<Props> = ({

const shareControl = (togglePopover: React.MouseEventHandler<any>) => (
<EuiButtonEmpty
size="xs"
size="s"
aria-label={strings.getShareWorkpadMessage()}
onClick={togglePopover}
data-test-subj="shareTopNavButton"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const ViewMenu: FunctionComponent<Props> = ({
};

const viewControl = (togglePopover: React.MouseEventHandler<any>) => (
<EuiButtonEmpty size="xs" aria-label={strings.getViewMenuLabel()} onClick={togglePopover}>
<EuiButtonEmpty size="s" aria-label={strings.getViewMenuLabel()} onClick={togglePopover}>
{strings.getViewMenuButtonLabel()}
</EuiButtonEmpty>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const FileCouldNotBeRead: FC<FileCouldNotBeReadProps> = ({
defaultMessage="If you know something about this data, such as the file format or timestamp format, adding initial overrides may help us to infer the rest of the structure."
/>
<br />
<EuiButtonEmpty onClick={showEditFlyout} flush="left" size="xs">
<EuiButtonEmpty onClick={showEditFlyout} flush="left" size="s">
<FormattedMessage
id="xpack.dataVisualizer.file.fileErrorCallouts.overrideButton"
defaultMessage="Apply override settings"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { i18n } from '@kbn/i18n';
import React, { useState, useCallback, useMemo } from 'react';
import {
EuiPopover,
EuiButtonEmpty,
EuiHeaderLink,
EuiContextMenu,
EuiContextMenuPanelDescriptor,
} from '@elastic/eui';
Expand Down Expand Up @@ -134,8 +134,7 @@ export const MetricsAlertDropdown = () => {
panelPaddingSize="none"
anchorPosition="downLeft"
button={
<EuiButtonEmpty
size="xs"
<EuiHeaderLink
color="text"
iconSide={'right'}
iconType={'arrowDown'}
Expand All @@ -145,7 +144,7 @@ export const MetricsAlertDropdown = () => {
id="xpack.infra.alerting.alertsButton"
defaultMessage="Alerts and rules"
/>
</EuiButtonEmpty>
</EuiHeaderLink>
}
isOpen={popoverOpen}
closePopover={closePopover}
Expand Down
Loading

0 comments on commit 42c743b

Please sign in to comment.