Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions .ai/rules/code-quality.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ alwaysApply: true
- Clean up subscriptions and timers
- Use constants instead of magic numbers

## Vite Cache Management

When updating npm packages (especially `@redis-ui/*` packages):

1. **Clear Vite cache** after `yarn install`:

```bash
rm -rf node_modules/.vite
rm -rf redisinsight/ui/node_modules/.vite
```

2. **Restart dev server** to rebuild dependencies

3. This ensures new package versions are properly loaded

## Pre-Commit Checklist

- [ ] `yarn lint` passes
Expand All @@ -75,3 +90,4 @@ alwaysApply: true
- [ ] Descriptive variable names
- [ ] Low cognitive complexity
- [ ] No duplicate code
- [ ] Vite cache cleared (if updated dependencies)
18 changes: 18 additions & 0 deletions .ai/rules/frontend.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,24 @@ import { EuiButton } from '@elastic/eui';
- ❌ Do not import directly from `@redis-ui/*`
- ❌ Do not add new Elastic UI imports

## Icons

**⚠️ IMPORTANT**: Always use icons from Redis UI library instead of custom SVGs.

### Icon Usage

- **Use Redis UI icons** from `@redis-ui/icons` via `iconRegistry.tsx`
- Icons are automatically exported via `export * from '@redis-ui/icons'` in `iconRegistry.tsx`
- Use `RiIcon` component with icon type: `<RiIcon type="FolderOpenIcon" />`
- **DO NOT create custom SVG icons** - check if the icon exists in Redis UI library first

### Custom Icons (Exception)

Only create custom SVG icons if:

- The icon doesn't exist in Redis UI library
- It's a project-specific icon that won't be added to the library

## Testing Components

### Always Use Shared `renderComponent` Helper
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@
"@elastic/datemath": "^5.0.3",
"@elastic/eui": "34.6.0",
"@redis-ui/components": "^39.18.0",
"@redis-ui/icons": "^6.1.1",
"@redis-ui/icons": "^6.3.17",
Copy link
Contributor

Choose a reason for hiding this comment

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

last bump was 2 months ago, I assume no breaking changes happened (e.g. no icons we use was removed)?

Copy link
Member

Choose a reason for hiding this comment

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

tl;dr - I hope so.

It's a valid concern, so I went trough their release logs, and it seems they didn't change anything major (or at least they didn't mention it).

Still, we have the option to postpone this PR after the release, since it's something minor, so we don't risk it.

"@redis-ui/styles": "^12.9.0",
"@redis-ui/table": "^2.18.0",
"@reduxjs/toolkit": "^1.6.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const Group = (props: Props) => {
label={
<Row align="end" justify="start" gap="s">
{isShowFolder && (
<RiIcon type={isGroupOpen ? 'KnowledgeBaseIcon' : 'FolderIcon'} />
<RiIcon type={isGroupOpen ? 'FolderOpenIcon' : 'FolderIcon'} />
)}

<Text className="group-header" size="m">
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2558,10 +2558,10 @@
type-fest "^3.13.1"
virtua "^0.36.3"

"@redis-ui/icons@^6.1.1":
version "6.1.1"
resolved "https://registry.yarnpkg.com/@redis-ui/icons/-/icons-6.1.1.tgz#100dfb7fdb4fa810ab85d9ddbd6ed75ed755f1fe"
integrity sha512-KzxU7cCcArOfE3cGX59Dd3FDDkQAp1QLupcj9nvXj+zOoPkaCdGELeAFL5l8glo7eY/6pyQl5VTR4XQ3d12mjQ==
"@redis-ui/icons@^6.1.1", "@redis-ui/icons@^6.3.17":
version "6.3.17"
resolved "https://registry.yarnpkg.com/@redis-ui/icons/-/icons-6.3.17.tgz#d444997b43b9c815dde33f23ed0bd0bfed601311"
integrity sha512-H5bXBZmUG3sNUWMcI7p/VPshiu1roRsiRuTCdY8Avw1ardfs7zAdJKBohmX4OCwSjsv/KKTP2UzXh3wOdCh6Ew==

"@redis-ui/styles@^12.8.0", "@redis-ui/styles@^12.9.0":
version "12.9.0"
Expand Down
Loading