-
Notifications
You must be signed in to change notification settings - Fork 394
RI-7214: Replace EUI loading logo with custom bouncing logo component #4768
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
dantovska
merged 8 commits into
fe/feature/RI-7039-replace-eui
from
fe/feature/RI-7214-replace-eui-loading-logo
Jul 31, 2025
+60
−10
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
68333b4
create loading logo component
dantovska 48594de
move import from layout to display
dantovska b5f7415
add sizing to the component
dantovska 3d3c7b2
replace it in page placeholder
dantovska c185c99
use $ for size and bounceSpeed instead of Omit
dantovska 008ed63
implement redis theme sizing
dantovska 7f5d926
Rename folder logo-loading -> loading-logo
dantovska 4e2cfab
rename and format
dantovska 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
import Loader from './loader/Loader' | ||
import ProgressBarLoader from './progress-bar/ProgressBarLoader' | ||
import RiImage from './image/RiImage' | ||
import RiLoadingLogo from './loading-logo/RiLoadingLogo' | ||
|
||
export { Loader, ProgressBarLoader, RiImage } | ||
export { Loader, ProgressBarLoader, RiImage, RiLoadingLogo } | ||
export { RICollapsibleNavGroup } from './collapsible-nav-group/RICollapsibleNavGroup' | ||
|
||
export type { RICollapsibleNavGroupProps } from './collapsible-nav-group/RICollapsibleNavGroup' |
54 changes: 54 additions & 0 deletions
54
redisinsight/ui/src/components/base/display/loading-logo/RiLoadingLogo.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React, { HTMLAttributes } from 'react' | ||
import styled, { keyframes } from 'styled-components' | ||
|
||
const bounce = keyframes` | ||
0%, 100% { | ||
transform: translateY(0); | ||
} | ||
|
||
50% { | ||
transform: translateY(-15px); | ||
} | ||
` | ||
|
||
export const SIZES = ['M', 'L', 'XL', 'XXL'] as const | ||
|
||
export type RiLoadingLogoSize = (typeof SIZES)[number] | ||
|
||
export interface RiLoadingLogoProps extends HTMLAttributes<HTMLImageElement> { | ||
src: string | ||
$size?: RiLoadingLogoSize | ||
$bounceSpeed?: number | ||
alt?: string | ||
} | ||
|
||
const Wrapper = styled.div` | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
` | ||
|
||
const BouncingLogo = styled.img<RiLoadingLogoProps>` | ||
dantovska marked this conversation as resolved.
Show resolved
Hide resolved
dantovska marked this conversation as resolved.
Show resolved
Hide resolved
|
||
width: ${({ theme, $size = 'XL' }) => | ||
theme.components.iconButton.sizes[$size].width}; | ||
dantovska marked this conversation as resolved.
Show resolved
Hide resolved
dantovska marked this conversation as resolved.
Show resolved
Hide resolved
dantovska marked this conversation as resolved.
Show resolved
Hide resolved
|
||
animation: ${bounce} ${({ $bounceSpeed }) => $bounceSpeed}s ease-in-out | ||
dantovska marked this conversation as resolved.
Show resolved
Hide resolved
|
||
infinite; | ||
` | ||
|
||
const RiLoadingLogo = ({ | ||
src, | ||
$size = 'XL', | ||
$bounceSpeed = 1, | ||
alt = 'Loading logo', | ||
}: RiLoadingLogoProps) => ( | ||
<Wrapper> | ||
<BouncingLogo | ||
src={src} | ||
$size={$size} | ||
$bounceSpeed={$bounceSpeed} | ||
alt={alt} | ||
/> | ||
</Wrapper> | ||
) | ||
|
||
export default RiLoadingLogo |
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.
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.