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

Adding endpoint icon #7383

Merged
merged 5 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions changelogs/upcoming/7383.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Added endpoint icon
cee-chen marked this conversation as resolved.
Show resolved Hide resolved

84 changes: 42 additions & 42 deletions i18ntokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 164,
"column": 6,
"index": 4948
"line": 117,
"column": 4,
"index": 3666
},
"end": {
"line": 164,
"column": 80,
"index": 5022
"line": 117,
"column": 78,
"index": 3740
}
},
"filepath": "src/components/basic_table/collapsed_item_actions.tsx"
Expand All @@ -185,14 +185,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 181,
"column": 6,
"index": 5492
"line": 133,
"column": 4,
"index": 4162
},
"end": {
"line": 181,
"column": 80,
"index": 5566
"line": 133,
"column": 78,
"index": 4236
}
},
"filepath": "src/components/basic_table/collapsed_item_actions.tsx"
Expand Down Expand Up @@ -275,14 +275,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 235,
"line": 233,
"column": 20,
"index": 6773
"index": 6945
},
"end": {
"line": 238,
"line": 236,
"column": 3,
"index": 6866
"index": 7038
}
},
"filepath": "src/components/breadcrumbs/breadcrumb.tsx"
Expand Down Expand Up @@ -4901,14 +4901,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 344,
"line": 345,
"column": 12,
"index": 9079
"index": 9121
},
"end": {
"line": 348,
"line": 349,
"column": 14,
"index": 9325
"index": 9367
}
},
"filepath": "src/components/form/super_select/super_select.tsx"
Expand All @@ -4919,14 +4919,14 @@
"highlighting": "string",
"loc": {
"start": {
"line": 351,
"line": 352,
"column": 8,
"index": 9380
"index": 9422
},
"end": {
"line": 351,
"line": 352,
"column": 75,
"index": 9447
"index": 9489
}
},
"filepath": "src/components/form/super_select/super_select.tsx"
Expand Down Expand Up @@ -5076,40 +5076,40 @@
"filepath": "src/components/inline_edit/inline_edit_form.tsx"
},
{
"token": "euiLink.newTarget.screenReaderOnlyText",
"defString": "(opens in a new tab or window)",
"token": "euiExternalLinkIcon.ariaLabel",
"defString": "External link",
"highlighting": "string",
"loc": {
"start": {
"line": 107,
"column": 10,
"index": 2853
"line": 39,
"column": 24,
"index": 1389
},
"end": {
"line": 110,
"column": 12,
"index": 2986
"line": 42,
"column": 3,
"index": 1461
}
},
"filepath": "src/components/link/link.tsx"
"filepath": "src/components/link/external_link_icon.tsx"
},
{
"token": "euiLink.external.ariaLabel",
"defString": "External link",
"token": "euiExternalLinkIcon.newTarget.screenReaderOnlyText",
"defString": "(opens in a new tab or window)",
"highlighting": "string",
"loc": {
"start": {
"line": 117,
"column": 20,
"index": 3106
"line": 58,
"column": 12,
"index": 1805
},
"end": {
"line": 117,
"column": 77,
"index": 3163
"line": 61,
"column": 14,
"index": 1956
}
},
"filepath": "src/components/link/link.tsx"
"filepath": "src/components/link/external_link_icon.tsx"
},
{
"token": "euiPinnableListGroup.pinExtraActionLabel",
Expand Down
1 change: 1 addition & 0 deletions src-docs/src/views/icon/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const iconTypes = [
'download',
'email',
'empty',
'endpoint',
'eql',
'eraser',
'error',
Expand Down
23 changes: 23 additions & 0 deletions src/components/icon/__snapshots__/icon.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2840,6 +2840,29 @@ exports[`EuiIcon props type emsApp is rendered 1`] = `
</svg>
`;

exports[`EuiIcon props type endpoint is rendered 1`] = `
<svg
aria-hidden="true"
class="euiIcon emotion-euiIcon-m-isLoaded"
data-icon-type="endpoint"
data-is-loaded="true"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9.406 13.454a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"
/>
<path
clip-rule="evenodd"
d="M6.86 6.09a2.545 2.545 0 1 1 2.497-3.045h.368a2.727 2.727 0 1 1 0 5.455H6.543a1.727 1.727 0 1 0 0 3.454h.367a2.546 2.546 0 1 1 0 1h-.367a2.727 2.727 0 1 1 0-5.454h3.182a1.727 1.727 0 1 0 0-3.455h-.368a2.546 2.546 0 0 1-2.496 2.046L6.86 6.09Zm0-1a1.545 1.545 0 1 1 0-3.09 1.545 1.545 0 0 1 0 3.09ZM9.407 14a1.545 1.545 0 1 1 0-3.09 1.545 1.545 0 0 1 0 3.09Z"
fill-rule="evenodd"
/>
</svg>
`;

exports[`EuiIcon props type eql is rendered 1`] = `
<svg
aria-hidden="true"
Expand Down
39 changes: 39 additions & 0 deletions src/components/icon/assets/endpoint.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

// THIS IS A GENERATED FILE. DO NOT MODIFY MANUALLY. @see scripts/compile-icons.js

import * as React from 'react';
import type { SVGProps } from 'react';
interface SVGRProps {
title?: string;
titleId?: string;
}
const EuiIconEndpoint = ({
title,
titleId,
...props
}: SVGProps<SVGSVGElement> & SVGRProps) => (
<svg
xmlns="http://www.w3.org/2000/svg"
width={16}
height={16}
viewBox="0 0 16 16"
aria-labelledby={titleId}
{...props}
>
{title ? <title id={titleId}>{title}</title> : null}
<path d="M9.406 13.454a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" />
<path
fillRule="evenodd"
d="M6.86 6.09a2.545 2.545 0 1 1 2.497-3.045h.368a2.727 2.727 0 1 1 0 5.455H6.543a1.727 1.727 0 1 0 0 3.454h.367a2.546 2.546 0 1 1 0 1h-.367a2.727 2.727 0 1 1 0-5.454h3.182a1.727 1.727 0 1 0 0-3.455h-.368a2.546 2.546 0 0 1-2.496 2.046L6.86 6.09Zm0-1a1.545 1.545 0 1 1 0-3.09 1.545 1.545 0 0 1 0 3.09ZM9.407 14a1.545 1.545 0 1 1 0-3.09 1.545 1.545 0 0 1 0 3.09Z"
clipRule="evenodd"
/>
</svg>
);
export const icon = EuiIconEndpoint;
1 change: 1 addition & 0 deletions src/components/icon/icon_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export const typeToPathMap = {
email: 'email',
empty: 'empty',
emsApp: 'app_ems',
endpoint: 'endpoint',
eql: 'eql',
eraser: 'eraser',
error: 'error',
Expand Down
4 changes: 4 additions & 0 deletions src/components/icon/svgs/endpoint.svg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you happen to run this SVG through any minification tool? If not, I'd suggest using Figma's SVG Export plugin. It does a good job of dramatically reducing the SVG complexity without reducing icon quality.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed I was using this SVG Export plugin as recommended here and I had also to remove manually the fill attributes in order to work with light and dark mode properly.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7364,14 +7364,14 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001449:
version "1.0.30001472"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001472.tgz#3f484885f2a2986c019dc416e65d9d62798cdd64"
integrity sha512-xWC/0+hHHQgj3/vrKYY0AAzeIUgr7L9wlELIcAvZdDUHlhL/kNxMdnQLOSOQfP8R51ZzPhmHdyMkI0MMpmxCfg==
version "1.0.30001564"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz"
integrity sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==

caniuse-lite@^1.0.30001517:
version "1.0.30001521"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001521.tgz#e9930cf499f7c1e80334b6c1fbca52e00d889e56"
integrity sha512-fnx1grfpEOvDGH+V17eccmNjucGUnCbP6KL+l5KqBIerp26WK/+RQ7CIDE37KGJjaPyqWXXlFUyKiWmvdNNKmQ==
version "1.0.30001564"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001564.tgz"
integrity sha512-DqAOf+rhof+6GVx1y+xzbFPeOumfQnhYzVnZD6LAXijR77yPtm9mfOcqOnT3mpnJiZVT+kwLAFnRlZcIz+c6bg==

capture-exit@^2.0.0:
version "2.0.0"
Expand Down
Loading