This file provides guidance for AI coding assistants (Claude, Copilot, Cursor, etc.) when working with this repository.
OpenUI5 is an enterprise-grade JavaScript UI framework implementing SAP Fiori design. It is a monorepo containing ~30 library packages under src/, each following the src/{library}/src/{namespace}/ structure for sources and src/{library}/test/{namespace}/qunit/ for tests.
Requirements: Node.js ^20.17.0 || >=22.9.0, npm >=8
- Single QUnit module: use the
/run-test <module>skill. Do NOT use karma for individual modules. - Visual/screenshot tests: use the
/run-visual-tests <lib> <SpecName>skill.
After editing sources, run npm run lint (ESLint over src/, cached). This is also the repo's npm test script.
For LESS/theme changes, run npm run lint:styles. The linter enforces a "no LESS features"
policy — LESS variables, mixins, guards, and color manipulation functions are flagged (at
warning severity) as part of the migration to CSS custom properties. CSS-compatible nesting
with & is allowed. Theme parameters (@sapUi*) are
allowlisted in phase 1. See docs/stylelint.md for the full rule reference,
the phased rollout plan, and per-library opt-in instructions for the Maven stylelintnode.build
profile. Selector-complexity advice is disabled by default; use npm run lint:styles:complexity
only for local refactoring checks.
Run npm start to serve the testsuite locally, useful for reproducing behavior in a browser.
When adding new properties, aggregations, associations, methods, or API, read the version field from the root package.json (e.g. "1.148.0-SNAPSHOT") and use the version without the -SNAPSHOT suffix as the @since tag (e.g. @since 1.148).
See commit message guidelines.
This repository uses Gerrit for code review, not GitHub pull requests. Key rules for agents:
- Do NOT push directly to
masteror any release branch. - Every commit must include a
Change-Id:trailer in the commit message. Gerrit uses this to track changes across amended pushes. The Git hook at.git/hooks/commit-msggenerates it automatically — do not skip hooks. - Push changes for review with:
git push origin HEAD:refs/for/master - Do not force-push or rewrite commits that are already under review without explicit user instruction.
When working on the sap.ui.mdc library (Metadata-Driven Controls), read src/sap.ui.mdc/AGENTS.md first. It covers the delegate pattern, PropertyInfo, personalization, and where MDC code belongs. Skip it for all other libraries.
Start here (read these first when working on code changes):
- Development Guidelines — code formatting, naming, class creation, git conventions
- Control Library Development — library structure, renderers, themes, tests
- Class Example — full UI5 class with proper JSDoc and AMD module
Additional references:
- Development Setup & Workflow — dev server, SDK build, testing with UI5 CLI
- ESLint Configuration — lint rules and enforcement
- Stylelint Rules & No-LESS Policy — no-LESS-features rules, phased rollout, per-lib Maven opt-in
- JS Namespace Conventions — module naming rules
- JSDoc Best Practices — descriptions, tags, type syntax
- JSDoc Pitfalls — common JSDoc mistakes to avoid
- Translation Files — annotation standards for .properties files
- Self-Closing Tags Fix — jQuery-incompatible HTML tag migration