-
Notifications
You must be signed in to change notification settings - Fork 420
RI-7040: replace eui icon #4633
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
Merged
pd-redis
merged 24 commits into
fe/feature/RI-7039-replace-eui
from
feature/fe/RI-7040-replace-eui-icon
Jul 17, 2025
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
18747be
replace EuiIcon in ExternalLink.tsx
pd-redis b9ba0c9
remove console.log
pd-redis 15fc6e8
temp
pd-redis 8658765
update Icon.tsx, RiIcon.tsx
pd-redis 1c5254b
add isSvg prop
pd-redis 15c9eff
replace EuiIcon
pd-redis 6304a55
add some icons
pd-redis 5cc163d
refactor icons
pd-redis 2a1984d
replace icons
pd-redis d8ccc03
replace icons
pd-redis 23dc231
replace icons
pd-redis 1d8cd03
replace icons
pd-redis bcc89f8
remove icon files
pd-redis a685ef1
fix SlowLogTable.spec.tsx matcher
pd-redis 24847a1
move sidebar icons
pd-redis a9be67b
move options icons
pd-redis 0097a7b
move modules icons
pd-redis 75a26a6
replace Icon with RiIcon
pd-redis 57517a9
remove todo comment
pd-redis fa086c9
remove todo comment
pd-redis 2db1efa
add back icons
pd-redis 74caa8f
fix issues after rebase
pd-redis cdd401f
remove usage of htmlIdGenerator
pd-redis 04a7d04
remove unused files, fix tests
pd-redis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
redisinsight/ui/src/assets/img/icons/keyboard-shortcuts.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 5 additions & 7 deletions
12
redisinsight/ui/src/components/base/external-link/ExternalLink.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| import React, { ImgHTMLAttributes, SVGProps } from 'react' | ||
| import cx from 'classnames' | ||
| import { IconProps } from './Icon' | ||
| import * as Icons from './index' | ||
|
|
||
| // Create a type that excludes the IconProps type | ||
| export type AllIconsType = Exclude< | ||
| keyof typeof Icons, | ||
| | 'IconProps' | ||
| | 'Icon' | ||
| | 'IconSizeType' | ||
| | 'IconColorType' | ||
| | 'ColorIconProps' | ||
| | 'MonochromeIconProps' | ||
| | 'IconType' | ||
| > | ||
|
|
||
| export type IconComponentProps = Omit<IconProps, 'icon' | 'size'> & | ||
| Omit<SVGProps<SVGSVGElement>, 'color' | 'size'> & { | ||
| type: AllIconsType | ||
| size?: | ||
| | IconProps['size'] | ||
| | 'm' | ||
| | 's' | ||
| | 'xs' | ||
| | 'l' | ||
| | 'xl' | ||
| | 'xxl' | ||
| | 'original' | ||
| } | ||
|
|
||
| export const RiIcon = ({ type, size, ...props }: IconComponentProps) => { | ||
| const IconType = Icons[type] | ||
|
|
||
| if (!IconType) { | ||
| console.warn(`Icon type "${type}" not found, rendering as image`) | ||
| // TODO - 17.06.25 - Replace with icon | ||
| // There are a few cases where type is just imported image asset. In most cases, it seems | ||
| // that the image is an svg in the plugins folder - http://localhost:5540/static/plugins/redisearch/./dist/table_view_icon_light.svg | ||
| // we can either just scratch the plugins and move assets in to the main project, or look into dynamically loading as icons in runtime | ||
| return ( | ||
| <img | ||
| {...(props as ImgHTMLAttributes<HTMLImageElement>)} | ||
| alt={props.title ? props.title : ''} | ||
| src={type} | ||
| className={cx(type, props.className)} | ||
| style={props.style} | ||
| /> | ||
| ) | ||
| } | ||
| let iconSize: IconProps['size'] | ||
|
|
||
| switch (size?.toLowerCase()) { | ||
| case 'm': | ||
| iconSize = 'M' | ||
| break | ||
| case 's': | ||
| iconSize = 'S' | ||
| break | ||
| case 'xs': | ||
| iconSize = 'XS' | ||
| break | ||
| case 'xl': | ||
| case 'xxl': | ||
| iconSize = 'XL' | ||
| break | ||
| case 'original': | ||
| iconSize = null | ||
| break | ||
| case 'l': | ||
| default: | ||
| iconSize = 'L' | ||
| } | ||
| // @ts-ignore | ||
KrumTy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| return <IconType {...props} size={iconSize} /> | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.