release: bump version to 0.41.1
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
59
rules.md
59
rules.md
@@ -320,3 +320,62 @@ class BaseCollector:
|
||||
- verify layouts under browser zoom `125%` and `150%`
|
||||
- Avoid using wrapper components with implicit layout behavior, such as `Space`, for height-critical scroll regions unless their generated DOM is fully accounted for
|
||||
- Any UI state that hides data or a layer must also reconcile related hover/lock/tooltip/selection state so hidden content is not still “active” in the UI
|
||||
|
||||
---
|
||||
|
||||
## Icon System - MANDATORY
|
||||
|
||||
All canvas-drawn marker icons for the 3D earth visualization **MUST** have a canonical SVG in:
|
||||
|
||||
```
|
||||
frontend/public/earth/assets/icons/
|
||||
```
|
||||
|
||||
This directory is the **single source of truth** for icon shapes. The canvas/Three.js drawing code may use inline `Path2D` strings or `<canvas>` draw calls derived from these SVGs, but the geometry must originate here.
|
||||
|
||||
### Naming convention
|
||||
|
||||
`{module}-{description}.svg` in kebab-case.
|
||||
|
||||
| Module prefix | Context |
|
||||
|---------------|---------|
|
||||
| `marker-` | Surface map markers (landing points, etc.) |
|
||||
| `bgp-` | BGP/routing layer icons and event symbols |
|
||||
| `compute-` | Compute center markers |
|
||||
|
||||
Examples: `marker-landing-point.svg`, `bgp-event-triangle.svg`, `compute-gpu-cluster.svg`
|
||||
|
||||
### Existing icons
|
||||
|
||||
| File | Used in | Description |
|
||||
|------|---------|-------------|
|
||||
| `marker-landing-point.svg` | `cables.js` | Cable landing point pin (with circular cutout) |
|
||||
| `bgp-collector.svg` | `bgp.js` | BGP collector marker (access_point icon + outer ring) |
|
||||
| `bgp-glow-dot.svg` | `bgp.js` | Base radial glow dot under BGP collector |
|
||||
| `bgp-event-ring.svg` | `bgp.js` | Ring overlay on event markers |
|
||||
| `bgp-event-triangle.svg` | `bgp.js` | Origin anomaly |
|
||||
| `bgp-event-exclamation.svg` | `bgp.js` | Withdraw event |
|
||||
| `bgp-event-wave.svg` | `bgp.js` | Flap event |
|
||||
| `bgp-event-burst.svg` | `bgp.js` | Specific/burst anomaly |
|
||||
| `bgp-event-leak.svg` | `bgp.js` | Route leak |
|
||||
| `bgp-event-dot.svg` | `bgp.js` | Generic event |
|
||||
| `compute-supercomputer.svg` | `compute-centers.js` | Supercomputer (#38bdf8) |
|
||||
| `compute-gpu-cluster.svg` | `compute-centers.js` | GPU cluster (#2dd4bf) |
|
||||
|
||||
### Color rules
|
||||
|
||||
- Use `fill=”currentColor”` for single-color icons so the caller controls the color (event symbols, landing point)
|
||||
- Hardcode brand colors only when the color is part of the icon identity (compute center types)
|
||||
- State variants (hover, locked, dimmed) are handled by the calling canvas code via color/opacity — **do not create separate SVG files per state**
|
||||
|
||||
### Coordinate system
|
||||
|
||||
- Use the native canvas coordinate space as the `viewBox` (typically `0 0 128 128`)
|
||||
- Exception: `marker-landing-point.svg` uses a `viewBox` cropped from 1000-unit path space
|
||||
- SVG must visually match the canvas output at the same scale
|
||||
|
||||
### When adding a new icon
|
||||
|
||||
1. Create the SVG in `assets/icons/` following naming rules above
|
||||
2. Add a row to the table in this section
|
||||
3. Reference the SVG path/geometry in the canvas drawing code — do not invent new shapes directly in JS
|
||||
|
||||
Reference in New Issue
Block a user