-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Graph] Replace Fontawesome with EUI + Maki icons #162048
Conversation
Yes. Since EUI longer allows for the addition of external logos as part of its icon offering, that approach would be best. |
Rather than implement a custom icon, what if we remove the problem by replacing the Google icon completely for a more generic |
Ok, talked with the team and replaced for now the Google icon with the more generic Let me know what do you think of it @MichaelMarcialis Also, fixes a sass issue triggered when I removed the legacy icon component. Now drilldown icons should work back ok again. |
Making the icon more general purpose and switching to the EUI |
Pinging @elastic/kibana-graph (Feature:Graph) |
Pinging @elastic/kibana-visualizations @elastic/kibana-visualizations-external (Team:Visualizations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @dej611! This looks great. I left a few small questions and suggestions for you below.
I also noticed that the new key
and at
icons are missing. Am I correct in saying that this will fix itself as soon as EUI is updated to the latest in Kibana's main branch?
Assuming that's correct, I'll approve now to avoid holding you up further.
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/field_manager/field_editor.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/merge_candidates.tsx
Outdated
Show resolved
Hide resolved
className="kuiButton kuiButton--basic kuiButton--small" | ||
disabled={workspace.selectedNodes.length === 0} | ||
<EuiButtonIcon | ||
iconType={'filterIgnore'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would eyeClosed
be a better icon choice for this action (to avoid making users think that it is adding a filter to the unified search interface)? In doing so, perhaps it would also make sense to change all references of "blocking" selections to "hiding" instead. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Graph there's no unified search interface, even tho it looks pretty similar. And there's currently no concept of "filter" as for the rest of Kibana, the closest thing to a "filter" is actually this Blocklist
thing, but it's like a negative filter only.
Nonetheless I have nothing against the icon change, and probably in the long run (if we ever going to add the unified search interface to Graph) will be a more consistent choice. So 👍 for me.
@@ -41,7 +42,9 @@ export function BlocklistForm({ | |||
<FormattedMessage | |||
id="xpack.graph.blocklist.noEntriesDescription" | |||
defaultMessage="You don't have any blocked terms. Select vertices and click {stopSign} in the control panel on the right to block them. Documents that match blocked terms are no longer explored and relationships to them are hidden." | |||
values={{ stopSign: <span className="kuiIcon fa-ban" /> }} | |||
values={{ | |||
stopSign: <EuiIcon type="filterIgnore" />, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as previous question. Would it be better to use eyeClosed
here instead and change all references of "block" to "hide"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean change also the Blocklist
to something like Hidden list
as part of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, exactly. Something like "Hidden list" or "Hidden vertices".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created a follow up issue to track this: #162297
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/control_panel_tool_bar.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/merge_candidates.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/control_panel/merge_candidates.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/field_manager/field_editor.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/settings/blocklist_form.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/settings/blocklist_form.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/graph/public/components/settings/url_template_form.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Michael Marcialis <[email protected]>
Correct. |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Unknown metric groupsasync chunk count
miscellaneous assets size
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fantastic and removes 50KB from the bundle! LGTM!
Wooooooooooow! I didn't!! |
## Summary Fixes elastic#160232 This PR removes completely FontAwesome from the Graph plugin and replace its usage with mostly EUI + few Maki icons. As for the Google icon, @MichaelMarcialis do you think we should just have a custom SVG icon within the Graph app? Here's a list of the replaced icons, but if I forgot anything let me know: * [x] Created generic `IconRenderer` component to abstract away the package type from the rendering * [x] Add logic for color switch based on background color * Replace icons in graph visualization * [x] Replace with EUI icons * [x] Replace with Maki icons * [x] Add `prevName` to recover old saved graph SO * [x] Fix selection preview icon * For the `at` and `key` icons it needs to wait for a new EUI release with elastic/eui#6934 * Replace drill down icons * [x] Replace with EUI icons * [x] Replace with Maki icons * [x] Find a substitute for Google icon * [x] Add `prevName` to recover old saved graph SO * App toolbars * [x] Replace app toolbar icons with EUI icons * [x] Changed blocked list icon from `ban` to `filterIgnore` * [x] Replace styling icon + color swatches * The EUI `dot` icon was too small, so switches to rect icons * [x] Replace merge icons on link selection * [x] Replace group/ungroup icons with `fold/unfold` * [x] Custom drilldowns * [x] Removed `LegacyIcon` * Replaced usage in various places New icons within field configuration + graph visualization <img width="1061" alt="Screenshot 2023-07-17 at 11 00 35" src="https://github.com/elastic/kibana/assets/924948/59f981e7-64b7-4ce5-b3ae-2582d46fc373"> <img width="302" alt="Screenshot 2023-07-17 at 15 13 04" src="https://github.com/elastic/kibana/assets/924948/fb8d0e63-e982-406f-bd8d-036d71d37442"> New toolbar with blocked icon changed <img width="202" alt="Screenshot 2023-07-17 at 15 13 40" src="https://github.com/elastic/kibana/assets/924948/241206c4-7d3b-4296-bd6b-c2df3f3eabe5"> <img width="220" alt="Screenshot 2023-07-17 at 15 13 35" src="https://github.com/elastic/kibana/assets/924948/5a648932-2f79-4c0e-a8d0-3ab165f68036"> <img width="272" alt="Screenshot 2023-07-17 at 12 41 12" src="https://github.com/elastic/kibana/assets/924948/e3778d20-3000-496e-881b-61e5f086ae52"> New group/ungroup icons <img width="168" alt="Screenshot 2023-07-17 at 12 41 25" src="https://github.com/elastic/kibana/assets/924948/ffc963e6-4fea-4cb5-b0ef-cf8a71a71d6a"> <img width="252" alt="Screenshot 2023-07-17 at 15 15 27" src="https://github.com/elastic/kibana/assets/924948/98b8b025-32fd-465e-9a66-40f4f866eb6e"> Selection with icons preview <img width="260" alt="Screenshot 2023-07-17 at 15 07 17" src="https://github.com/elastic/kibana/assets/924948/08dbda17-0c12-4fa4-8c92-77bbe90d7e14"> <img width="268" alt="Screenshot 2023-07-17 at 15 07 35" src="https://github.com/elastic/kibana/assets/924948/78987838-42d5-46bf-9e46-b12cc603fa4e"> Panel with color styling open <img width="266" alt="Screenshot 2023-07-17 at 15 07 44" src="https://github.com/elastic/kibana/assets/924948/f5866e29-cf22-4e62-a2ff-3ef901c0d564"> Custom drilldowns (note Google icon has been replaced with a magnifier icon) <img width="331" alt="Screenshot 2023-07-18 at 17 49 07" src="https://github.com/elastic/kibana/assets/924948/42e307d1-69b6-4e79-9e19-64c5efb7ee46"> <img width="381" alt="Screenshot 2023-07-18 at 17 51 44" src="https://github.com/elastic/kibana/assets/924948/bc70c506-4390-45c1-aff5-8e22a68d7130"> <img width="271" alt="Screenshot 2023-07-17 at 15 08 31" src="https://github.com/elastic/kibana/assets/924948/59fea7e4-a775-4006-805d-0610d7861890"> <img width="269" alt="Screenshot 2023-07-17 at 15 08 38" src="https://github.com/elastic/kibana/assets/924948/f6c247a0-921d-4d9c-881a-796e02488df5"> Link selection <img width="295" alt="Screenshot 2023-07-17 at 15 09 06" src="https://github.com/elastic/kibana/assets/924948/d6a73013-130e-45a8-bdfc-48ac20e66a85"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Michael Marcialis <[email protected]>
Summary
Fixes #160232
This PR removes completely FontAwesome from the Graph plugin and replace its usage with mostly EUI + few Maki icons.
As for the Google icon, @MichaelMarcialis do you think we should just have a custom SVG icon within the Graph app?
Here's a list of the replaced icons, but if I forgot anything let me know:
IconRenderer
component to abstract away the package type from the renderingprevName
to recover old saved graph SOat
andkey
icons it needs to wait for a new EUI release withat
&key
Icon Glyphs eui#6934prevName
to recover old saved graph SOban
tofilterIgnore
dot
icon was too small, so switches to rect iconsfold/unfold
LegacyIcon
New icons within field configuration + graph visualization
New toolbar with blocked icon changed
New group/ungroup icons
Selection with icons preview
Panel with color styling open
Custom drilldowns (note Google icon has been replaced with a magnifier icon)
Link selection
Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers