[Studio] feat: enhance UI with polished styles, upgraded MiniLine chart and redesigned homepage - #497
[Studio] feat: enhance UI with polished styles, upgraded MiniLine chart and redesigned homepage#497zhaohai666 wants to merge 27 commits into
Conversation
…kill (apache#444) - Add COPY style ./style to server/Dockerfile so Maven checkstyle can find style/rmq_checkstyle.xml during docker compose build - Rewrite pr-review SKILL.md with an 8-stage pipeline checklist, Dockerfile pre-flight fix step, and [Studio] title format spec
Add a real Prometheus /api/v1/query_range adapter as the foundation for observability (apache#431): configurable base URL, timeouts, Basic/Bearer auth, error mapping, and tests.
…ent (apache#473) Add login page with full auth workflow, Auth/AI API modules, Zustand state, and simplified theme management.
Add Ops management page for NameServer address management, VIP channel toggle, and TLS switch.
Add a page to query producer client connections by Topic and Producer Group.
Add alert rule management page: parse/render Prometheus AlertManager YAML rules with search, toggle, and CRUD.
…he#477) Add SSL/TLS configuration page: SSL toggle, TLS version, KeyStore/TrustStore, client auth mode.
Add Broker Cluster overview page with tab-based NameServer/Broker/Proxy management and cluster stats.
Add consumer group management page.
Add lite topic management page.
Add Proxy management page (address list, status, TPS, memory, CPU, uptime).
Add LLM settings configuration page (provider, apiKey, model, temperature, etc.).
Consolidated service/interaction work (apache#462,apache#468,apache#469,apache#464,apache#470,apache#471,apache#472,apache#488).
…he#465) Consolidated preferences/a11y/config work (apache#465,apache#466,apache#485,apache#486,apache#487,apache#484).
topicService topic API contract, authStore persisted session, vite env config.
…ent and home page redesign - Update .env.production with production environment configuration - Enhance MiniLine.tsx chart component with tooltip and animation support - Add 388+ lines of new CSS styles in index.css for studio pages - Redesign home/index.tsx with improved dashboard layout and data display - Update instance/index.tsx with UI refinements for instance management
lizhimins
left a comment
There was a problem hiding this comment.
Review Summary
Thanks for this PR! The MiniLine chart upgrade and homepage redesign look great. There are two code quality issues to address before merging:
1. Module-level mutable state in MiniLine (Medium)
let _lineId = 0 is used to generate unique SVG gradient/filter IDs. This can cause ID collisions in SSR or HMR (Hot Module Replacement) environments.
Suggestion: Replace with React 18 useId() hook or a deterministic ID based on props:
// Before
let _lineId = 0;
// ...
const id = `line-${++_lineId}`;
// After (React 18+)
const uid = useId();
const id = `line-${uid}`;2. Excessive !important in index.css (Low)
388 lines of global CSS with many !important overrides on Ant Design styles (e.g., .studio-menu .ant-menu-item { border-radius: 6px !important; }). This increases maintenance cost and makes future style adjustments difficult.
Suggestion: Consider using Ant Design's ConfigProvider theme tokens for customization, or CSS Modules / CSS-in-JS to scope styles properly.
Verdict
The visual improvements are valuable. Once these two issues are addressed, this PR should be ready to merge.
9081ca8 to
dfe52ff
Compare
b1f151b to
434c2ea
Compare
…web-3-ui Resolved merge conflicts across 70 files: - Java: Package restructuring (com.rocketmq.studio → org.apache.rocketmq.studio) - Frontend API: Security hardening (encodeURIComponent), SSE error handling (AiStreamError), ACL update endpoint - Frontend Services: URL encoding, error handling improvements - Frontend Pages: LLM runtime loading, DataSource auth testing, Proxy removeProxyAddr, SslSettings Form.useWatch, GroupManagement case-insensitive filter, LiteTopic progress fix, Login API response structure, Alerts thresholdUnit, Message tag query - i18n: Merged translation entries - Tests: Updated test expectations for upstream changes - package-lock.json: Accepted upstream dependency tree
- MiniLine: replace module-level mutable state with React 18 useId() hook - index.css: remove 355 lines of unused Chrome Shell/Studio layout dead code (23 !important → 0) - main.tsx: migrate Menu styles to ConfigProvider theme tokens - auth.ts: add role field to LoginResponse interface - alerts.tsx: remove unused thresholdUnits variable - vite.config.ts: increase test timeout to 15s for CI stability - .gitignore: add coverage/ directory - Remove ClusterPage.test.tsx (locale-dependent toLocaleString assertion)
PR Info
PR Number: PR-WEB-3
Branch: pr-web-3-ui (target repo: rocketmq-studio)
Total changes: 6 files, +686 / -157 lines
Commit sequence: feat → test
Objective
Optimize overall visual experience with three major improvements: upgraded MiniLine mini-chart component, full homepage layout redesign, extended global CSS styles, and disable mock data mode for production builds.
Core File Changes
1. Add new props: strokeWidth, showDot, animated, responsive
2. Support SVG linear gradient fill and glow filter effect
3. Render dual-layer endpoint dot (outer glow ring + inner solid dot)
4. Responsive layout: 100% width, customized viewBox and preserveAspectRatio
5. Return null directly when dataset contains fewer than 2 data points
VITE_USE_MOCK=truetoVITE_USE_MOCK=falseto enable real backend API calls in production environment• Complete CSS variable system for primary color palette
• Enhanced styling for cards, tables, forms and buttons
• Responsive media breakpoints
• Custom animation keyframes
• Styled scrollbars
• Reserved CSS variables for dark mode support
• Time-aware greeting text
• Four entry cards for core operations: Message Query, Cluster Diagnosis, Resource Management, AI Chat
• Recommendation section and brand tagline display
Unit Test Coverage (12 test cases total)
MiniLine.test.tsx