Skip to content

Commit

Permalink
[fleet] Remove unnecessary ghost colors from EuiBottomBar (#169310)
Browse files Browse the repository at this point in the history
## Summary

👋 Hey y'all - EUI will shortly be deprecating the `ghost` color in all
button components (see
https://eui.elastic.co/v89.0.0/#/navigation/button#ghost-vs-dark-mode).

In this PR, all components using `color="ghost"` are being used within
an `EuiBottomBar` and as such already automatically inherit dark mode
coloring.

I'm opening this PR ahead of time for your team so you can test this
migration and ensure no UI regressions have occurred as a result.

### Checklist

- [x] Tested in light and dark mode
  • Loading branch information
cee-chen authored Oct 23, 2023
1 parent 4df7a54 commit d4c86e7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const CreatePackagePolicyBottomBar: React.FC<{
<EuiFlexItem grow={false}>
<EuiFlexItem grow={false}>
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
<EuiButtonEmpty color="ghost" size="s" href={cancelUrl} onClick={cancelClickHandler}>
<EuiButtonEmpty color="text" size="s" href={cancelUrl} onClick={cancelClickHandler}>
{cancelMessage || (
<FormattedMessage
id="xpack.fleet.createPackagePolicyBottomBar.backButton"
Expand Down Expand Up @@ -102,7 +102,7 @@ export const AgentStandaloneBottomBar: React.FC<{
<EuiFlexItem grow={false}>
<EuiFlexItem grow={false}>
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
<EuiButtonEmpty color="ghost" size="s" href={cancelUrl} onClick={cancelClickHandler}>
<EuiButtonEmpty color="text" size="s" href={cancelUrl} onClick={cancelClickHandler}>
<FormattedMessage
id="xpack.fleet.agentStandaloneBottomBar.backButton"
defaultMessage="Go back"
Expand Down Expand Up @@ -134,7 +134,7 @@ export const CreatePackagePolicyFinalBottomBar: React.FC<{
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem grow={false}>
<EuiFlexItem grow={false}>
<EuiButtonEmpty color="ghost" size="s" href={getHref('integrations_all')}>
<EuiButtonEmpty color="text" size="s" href={getHref('integrations_all')}>
<FormattedMessage
id="xpack.fleet.createPackagePolicyBottomBar.addAnotherIntegration"
defaultMessage="Add another integration"
Expand Down Expand Up @@ -193,7 +193,7 @@ export const AgentDataTimedOutBottomBar: React.FC<{
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem grow={false}>
<EuiButtonEmpty
color="ghost"
color="text"
size="s"
href={troubleshootLink}
iconType="popout"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export const CreatePackagePolicySinglePage: CreatePackagePolicyParams = ({
<EuiFlexItem grow={false}>
{/* eslint-disable-next-line @elastic/eui/href-or-on-click */}
<EuiButtonEmpty
color="ghost"
color="text"
href={cancelUrl}
onClick={cancelClickHandler}
data-test-subj="createPackagePolicyCancelButton"
Expand All @@ -488,7 +488,7 @@ export const CreatePackagePolicySinglePage: CreatePackagePolicyParams = ({
request={devtoolRequest}
description={devtoolRequestDescription}
btnProps={{
color: 'ghost',
color: 'text',
}}
/>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>(
<EuiFlexGroup gutterSize="s" justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiButtonEmpty
color="ghost"
color="text"
onClick={() => {
setAgentPolicy({ ...originalAgentPolicy });
setHasChanges(false);
Expand All @@ -204,7 +204,7 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>(
<DevtoolsRequestFlyoutButton
isDisabled={isLoading || Object.keys(validation).length > 0}
btnProps={{
color: 'ghost',
color: 'text',
}}
description={i18n.translate(
'xpack.fleet.editAgentPolicy.devtoolsRequestDescription',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ export const EditPackagePolicyForm = memo<{
<EuiFlexItem grow={false}>
<EuiFlexGroup gutterSize="s" justifyContent="flexEnd">
<EuiFlexItem grow={false}>
<EuiButtonEmpty color="ghost" href={cancelUrl}>
<EuiButtonEmpty color="text" href={cancelUrl}>
<FormattedMessage
id="xpack.fleet.editPackagePolicy.cancelButton"
defaultMessage="Cancel"
Expand All @@ -451,7 +451,7 @@ export const EditPackagePolicyForm = memo<{
<DevtoolsRequestFlyoutButton
isDisabled={formState !== 'VALID'}
btnProps={{
color: 'ghost',
color: 'text',
}}
description={i18n.translate(
'xpack.fleet.editPackagePolicy.devtoolsRequestDescription',
Expand Down

0 comments on commit d4c86e7

Please sign in to comment.