diff --git a/plugins/ui5/README.md b/plugins/ui5/README.md index c73b603..8494784 100644 --- a/plugins/ui5/README.md +++ b/plugins/ui5/README.md @@ -108,6 +108,17 @@ Authoritative development guidelines for all UI5 table controls (SAPUI5 1.136+ L - **Personalization** - `sap.m.p13n.Engine` integration - **Cell templates & alignment** - Type-based alignment and model type namespace rules +#### ui5-fiori-guidelines + +Picks the correct SAP Fiori / UI5 control for a use case — and stops the wrong one — giving both the SAPUI5 class and the `ui5-*` web component tag: + +- **Wrong → Right mapping** - The exact wrong control mapped to the right one (e.g. `sap.m.Bar` used as an app header → `sap.f.ShellBar` / `ui5-shellbar`) +- **Use-case → Component map** - "App-level navigation" → `ShellBar`; "list → detail split" → `FlexibleColumnLayout` +- **Table selection by data, not looks** - Responsive vs Grid vs Analytical vs Tree, and when a responsive table degrades +- **Decision-first reference files** - Per control: when to use, when NOT (with the alternative), machine-checkable rules, gotchas — across actions, inputs, containers, navigation, lists/tables, display, messages, AI, and upload +- **Critical one-liners** - One emphasized button per page, icon-only buttons need a tooltip, links navigate / buttons act, Popover is non-modal / Dialog is modal +- **Maintenance** - `REFRESH.md` documents an agent-driven re-sync against SAP sources with human review (no unattended writes) + --- ## Installation diff --git a/plugins/ui5/skills/ui5-fiori-guidelines/README.md b/plugins/ui5/skills/ui5-fiori-guidelines/README.md new file mode 100644 index 0000000..2559b9a --- /dev/null +++ b/plugins/ui5/skills/ui5-fiori-guidelines/README.md @@ -0,0 +1,50 @@ +# SAP Fiori Component Selection Skill + +Picks the correct SAP Fiori / UI5 control for a use case — and stops the wrong one (a `sap.m.Bar` used as an +app header, a responsive table used for 5,000 rows). This skill catches those before the code ships. + +Built for AI coding assistants working alongside application developers. + +## What it does + +- **Wrong → Right mapping.** The exact wrong control → the correct one, with both the SAPUI5 class and the `ui5-*` web component tag. +- **Use-case → Component map.** "I need to show app navigation" → `ShellBar`, not `Bar`. +- **Decision-first reference files.** Every component: when to use, when NOT (with the alternative), machine-checkable rules, gotchas. No anatomy, no fluff. + +## Usage + +Starts automatically on SAP Fiori / UI5 questions and on code containing UI5 control names. Example triggers: + +- "How do I build a navigation bar in Fiori?" +- "I'm using sap.m.Bar for my app header" (→ ShellBar) +- "Which table should I use for 5,000 rows?" +- "Which control for a brief success confirmation?" (→ MessageToast) + +## Contents + +`SKILL.md` is the router: Wrong→Right table, Use-case→Component map, reference routing, critical one-liners. + +| Reference file | Topic | +|---|---| +| `component-selection.md` | Full wrong→right + table-type decision + long tail | +| `theming-tokens.md` | CSS tokens, semantic colors, density tiers | +| `ui-actions.md` | Buttons, links, toggle/segmented/menu buttons | +| `ui-inputs.md` | Inputs, selects, combo/multi, pickers, filter bar, value help | +| `ui-containers.md` | Cards, dialog, popover, shell bar, toolbars, user menu | +| `ui-navigation.md` | Icon tab bar, tab container, side nav, shell search, breadcrumbs | +| `ui-lists-tables.md` | Responsive / Grid / Analytical / Tree table, Grid List, List | +| `ui-display.md` | Avatar, progress, busy, illustrated message | +| `ui-messages.md` | Message strip / box / toast / popover | +| `ui-ai.md` | AI button, guided/quick prompts, regenerate, local AI notice | +| `ui-upload.md` | File Uploader vs Upload Set | +| `implementation-checklist.md` | Code-review checklist for a built app | + +## Maintenance + +`REFRESH.md` documents the repeatable, agent-driven process to re-sync against latest SAP sources +(diff + human review, no unattended writes). + +## Version + +Source: SAP Fiori Design Guidelines. Component tags verified against `ui5.sap.com`, +`sap.github.io/ui5-webcomponents`, and the UI5 Web Components MCP server. diff --git a/plugins/ui5/skills/ui5-fiori-guidelines/REFRESH.md b/plugins/ui5/skills/ui5-fiori-guidelines/REFRESH.md new file mode 100644 index 0000000..d41aa7e --- /dev/null +++ b/plugins/ui5/skills/ui5-fiori-guidelines/REFRESH.md @@ -0,0 +1,66 @@ +# Refreshing this skill + +The skill is a snapshot of SAP Fiori guidelines + UI5 APIs. Sources change. This is the repeatable +process to re-sync it and keep it up to date. **No unattended writes** — the process reports drift and proposes edits; a +human reviews and applies. + +## Authoritative sources + +| Source | URL | Reachable? | Use for | +|---|---|---|---| +| Fiori Design Guidelines | `sap.com/design-system/fiori-design-web/` | Often 403s automated fetches | Human reference for design rules, when-to-use | +| SAPUI5 API | `ui5.sap.com/` | Yes | Verifying `sap.*` class names, deprecations | +| UI5 Web Components | `sap.github.io/ui5-webcomponents/` | Yes | Verifying `ui5-*` tags, slots, properties | +| Theming tokens | `github.com/SAP/theming-base-content` | Yes (raw.githubusercontent.com) | CSS token names + values | +| UI5 Web Components MCP server | local MCP (`get_component_api`, `get_doc`, `list_docs`) | Yes | Fastest tag/API verification + V2→V3 migration/deprecations | + +The design portal blocks scrapers; treat it as a human-read source. Everything machine-checkable +(control names, tags, tokens) comes from the API sources and the MCP server. + +## Refresh process (agent-driven diff + review) + +Run one agent per file group so context stays scoped. Each agent: +1. Reads its current reference file(s). +2. Fetches the matching live source(s) above. For every `ui5-*` tag, calls MCP `get_component_api` + to confirm it still exists and its package hasn't moved. For tokens, fetches + `theming-base-content`. For `sap.*` classes, checks `ui5.sap.com`. +3. Diffs live vs current and **reports** — new/renamed/deprecated controls, changed tags or + packages, changed token values, new wrong-component pitfalls, dead links — plus a proposed edit + list. It does **not** write. +4. A human reviews the report and applies edits. + +File groups: `ui-actions/inputs/navigation` · `ui-containers/lists-tables` · +`ui-display/messages/ai/upload` · +`SKILL.md + component-selection/theming-tokens`. + +Can be launched as a Workflow (one agent per group, results collected) or via the Agent tool. + +## Invariants every refresh must preserve + +- Decision-first contract per section: **SAPUI5 + Web Component identifiers · Use when · Do NOT use when → alternative · Rules · Gotchas.** No anatomy, no state prose. +- Every control names both framework identifiers, or explicitly states "none" when one doesn't exist. +- SKILL.md body stays a router: Wrong→Right table, Use-case→Component map, routing table, one-liners. Keep it under ~200 lines; keep `description` under ~1,536 chars. +- Tone: short, concise, no fluff. + +## Verification after any refresh + +```bash +# 1. No scrape artifacts or dead/internal links (must return nothing) +grep -rnE '\+-+x-+\+|:badge|:decline:|:overflow:|:bell:|builder-prospect|ui5\.github\.io|wiki\.one\.int\.sap|&#x[0-9a-f]+;|Section Metadata|external_only' references/ SKILL.md + +# 2. Every ui-*.md component section names an identifier (spot-check) +grep -rnE '`sap\.|`ui5-' references/ui-*.md | head + +# 3. SKILL.md budget +wc -l SKILL.md # target < 200 +``` +- For each `ui5-*` tag referenced anywhere, confirm via MCP `get_component_api` that it resolves + (this catches invented tags like the non-existent `ui5-menu-button`). +- Trigger test in a fresh session: "how do I build a navigation bar in Fiori", "I'm using sap.m.Bar + for my header", "which table for 5000 rows", "design an object page" should each surface the right + guidance. + +## Version stamping + +- Record the SAP Fiori guideline version and refresh date in `README.md`. +- On material change, bump the version line in `README.md`. diff --git a/plugins/ui5/skills/ui5-fiori-guidelines/SKILL.md b/plugins/ui5/skills/ui5-fiori-guidelines/SKILL.md new file mode 100644 index 0000000..fd45882 --- /dev/null +++ b/plugins/ui5/skills/ui5-fiori-guidelines/SKILL.md @@ -0,0 +1,80 @@ +--- +name: ui5-fiori-guidelines +description: Picks the correct SAP Fiori / UI5 control for a use case and prevents the usage of the wrong one. Use when choosing between UI5 controls, building or reviewing code with sap.m.*, sap.f.*, sap.uxap.*, sap.ui.table.*, or ui5-* web components (XML views, fragments, controllers, manifest.json). Catches the classic wrong-component mistakes that cause false usage, for example: sap.m.Bar used as a navigation bar / app header (use sap.f.ShellBar), a List used as side navigation (use sap.f.SideNavigation), a responsive sap.m.Table used for large or aggregated data (use sap.ui.table.Table / AnalyticalTable), a Dialog used for a plain error (use MessageBox or MessageStrip), a Page used for object details (use sap.uxap.ObjectPageLayout). +--- + +# SAP Fiori Component Selection + +The job of this skill: pick the right control for the task or plan the correct Fiori application architecture / UX. + +Two frameworks, two names for the same component. Always give both: +- **SAPUI5** — `sap.m.*`, `sap.f.*`, `sap.uxap.*`, `sap.ui.table.*` (XML views, S/4HANA, Fiori Elements). +- **UI5 Web Components** — `ui5-*` (React/Vue/Angular, framework-agnostic). + +Not every control exists in both. Where it doesn't, say so — don't invent a tag. + +## Wrong → Right + +| Developer says / writes | WRONG | RIGHT (SAPUI5 · Web Component) | Why | +|---|---|---|---| +| "navigation bar", "app header", "top bar" | `sap.m.Bar` | `sap.f.ShellBar` · `ui5-shellbar` | Bar is a generic toolbar container; ShellBar is the app-level header (logo, search, notifications, profile, Joule). | +| "side menu", "left navigation" | `sap.m.List` | `sap.f.SideNavigation` · `ui5-side-navigation` | List has no nav semantics, no expand/collapse, no selection state. WC must sit in `ui5-navigation-layout`. | +| "tabs on a page", "sections" | `sap.m.TabContainer` | `sap.m.IconTabBar` · `ui5-tabcontainer` | TabContainer is for editable multi-document (like browser tabs); IconTabBar is in-page section/filter nav. | +| "header with title + actions on a detail page" | `sap.m.Bar` / `sap.m.Page` | `sap.uxap.ObjectPageLayout` · (no WC) | ObjectPage provides the standard header + anchored sections; Bar/Page don't compose with it. | +| "error popup", "confirmation dialog" | hand-built `sap.m.Dialog` | `sap.m.MessageBox` · `ui5-dialog` + `ui5-message-strip` | MessageBox gives semantic types (Error/Warning/Success/Confirm) and buttons for free. | +| "inline error / warning banner" | `sap.m.Dialog` / `MessageBox` | `sap.m.MessageStrip` · `ui5-message-strip` | Dialogs interrupt; strips are non-blocking, stay on the page. | +| "brief success confirmation" | `sap.m.MessageStrip` / `Dialog` | `sap.m.MessageToast` · (no WC — use `ui5-toast`) | Toast auto-dismisses; a strip persists and clutters. | +| "many validation errors at once" | repeated `MessageStrip` | `sap.m.MessagePopover` · (no direct WC) | One entry point, grouped by severity, navigable. | +| "big data table", "needs totals/subtotals" | `sap.m.Table` | `sap.ui.table.AnalyticalTable` · (no WC) | Responsive table has no aggregation/freeze and degrades past ~200 rows. | +| "grid table with thousands of rows" | `sap.m.Table` | `sap.ui.table.Table` · (no WC — `ui5-table` ≠ grid table) | `ui5-table` is popin-capable but not a grid/analytical replacement. | +| "hierarchy / tree" | grouped `AnalyticalTable` | `sap.ui.table.TreeTable` · (no WC) | Grouping clusters by value; TreeTable models real parent-child nodes. | +| "master–detail", "list + details side by side" | nested routes / custom CSS columns | `sap.f.FlexibleColumnLayout` · (no WC) | FCL handles column transitions, breakpoints, and back nav. | +| "object detail page" | `sap.m.Page` | `sap.uxap.ObjectPageLayout` · (no WC) | Page has no anchored section navigation. | +| "menu button / split button (WC)" | `ui5-menu-button` | `ui5-button` + `ui5-menu` · `sap.m.MenuButton` | No standalone `ui5-menu-button` exists. | +| "secondary button (WC)" | `design="Ghost"` | `design="Transparent"` · `sap.m.Button type="Transparent"` | `Ghost` is legacy SAPUI5-only; WC has no Ghost design. | +| "on/off setting" | `sap.m.CheckBox` for immediate effect | `sap.m.Switch` · `ui5-switch` | Switch = immediate effect; CheckBox = confirmed-on-save. | +| "pick one from a long list" | `sap.m.Select` | `sap.m.ComboBox` / value help · `ui5-combobox` | Select is for short fixed lists (~2–12); ComboBox filters/free-texts. | +| "pick a date" | `sap.m.Input` | `sap.m.DatePicker` · `ui5-date-picker` | Input has no calendar, parsing, or validation. | + +## Use case → Component + +| I need to… | Use (SAPUI5 · WC) | NOT | +|---|---|---| +| App-level nav: logo, search, notifications, profile | `sap.f.ShellBar` · `ui5-shellbar` | Bar, Toolbar | +| Left-hand navigation menu | `sap.f.SideNavigation` · `ui5-side-navigation` | List, VerticalLayout | +| Navigate between facets of one object | `sap.m.IconTabBar` · `ui5-tabcontainer` | TabContainer, SegmentedButton | +| Switch a small set of views (2–3) | `sap.m.SegmentedButton` · `ui5-segmented-button` | RadioButtonGroup, Select | +| Persistent page-level error/warning | `sap.m.MessageStrip` · `ui5-message-strip` | MessageBox, Dialog | +| One-time success confirmation | `sap.m.MessageToast` · `ui5-toast` | MessageStrip, Dialog | +| Show entity details (header + sections) | `sap.uxap.ObjectPageLayout` | Page, Panel | +| List → detail split layout | `sap.f.FlexibleColumnLayout` | custom columns | +| Empty / no-data / error state | `sap.m.IllustratedMessage` · `ui5-illustrated-message` | plain Text/Label | +| Contextual detail without leaving page | `sap.m.Popover` · `ui5-popover` | Dialog (that's modal) | +| Personalize 20+ table columns | `sap.m.p13n.Popup` · (no WC) | ViewSettingsDialog | + +## Reference files — read on demand + +| Topic | File | Read when | +|---|---|---| +| Full wrong→right + long tail, table-type decision | `references/component-selection.md` | Any control-choice question not fully answered above | +| CSS tokens, semantic colors, density tiers | `references/theming-tokens.md` | Colors, theming, cozy/compact/condensed | +| Buttons, links, toggle/segmented/menu buttons | `references/ui-actions.md` | Choosing an action control | +| Inputs, selects, combo/multi, pickers, filter bar | `references/ui-inputs.md` | Form/input/filter design | +| Containers: cards, dialog, popover, shell bar, toolbars | `references/ui-containers.md` | Overlays, cards, shell structure | +| Navigation: icon tab bar, side nav, shell search | `references/ui-navigation.md` | Tab/section/side navigation | +| Tables and lists (Responsive/Grid/Analytical/Tree/List) | `references/ui-lists-tables.md` | Choosing a table or list | +| Avatar, progress, busy, illustrated message | `references/ui-display.md` | Status/empty-state display | +| Message strip / popover / box / toast | `references/ui-messages.md` | Message pattern and placement | +| AI/Joule: AI button, guided/quick prompts, notice | `references/ui-ai.md` | AI-powered features | +| Upload (File Uploader vs Upload Set) | `references/ui-upload.md` | File upload | +| Implementation review checklist | `references/implementation-checklist.md` | Reviewing a built app | + +## Rules that stop the most mistakes + +- **One emphasized/primary button per page or dialog.** Everything else is Default/Transparent. +- **Icon-only buttons need a tooltip** and a recognizable, worldwide-consistent icon metaphor. +- **App header = ShellBar, never Bar.** Bar is a content-area toolbar. +- **Button text is an imperative verb** — Save, Edit, Create. Not "OK to save?". +- **Table choice is by data, not looks:** ≤~200 rows → Responsive; large/desktop → Grid; totals → Analytical; hierarchy → Tree. +- **Links navigate, buttons act.** Don't use a Button to go to a page or a Link to submit. +- **Popover is non-modal contextual; Dialog is modal.** Don't use a Popover for anything requiring focus or confirmation. diff --git a/plugins/ui5/skills/ui5-fiori-guidelines/references/component-selection.md b/plugins/ui5/skills/ui5-fiori-guidelines/references/component-selection.md new file mode 100644 index 0000000..860c6af --- /dev/null +++ b/plugins/ui5/skills/ui5-fiori-guidelines/references/component-selection.md @@ -0,0 +1,155 @@ +# Component Selection + +The full wrong to right map. SKILL.md carries the high-frequency subset; this file carries the long +tail and the decision criteria. Every entry gives both framework identifiers, or says when one +doesn't exist. + +## Contents +- [Tables — the biggest offender](#tables--the-biggest-offender) +- [Inputs & selection](#inputs--selection) +- [Actions](#actions) +- [Navigation & structure](#navigation--structure) +- [Overlays & messaging](#overlays--messaging) +- [Controls with no Web Component](#controls-with-no-web-component) + +--- + +## Tables — the biggest offender + +Choose by **data shape**, never by appearance. This single decision causes more wrong-component +usage than anything else. + +| Need | Control | SAPUI5 | Web Component | +|---|---|---|---| +| ≤ ~200 rows, mobile + desktop, simple | Responsive Table | `sap.m.Table` | `ui5-table` (popin mode) | +| Large data, many columns, desktop-first, cell comparison | Grid Table | `sap.ui.table.Table` | none — do not substitute `ui5-table` | +| Aggregation: sums/subtotals per group (OData) | Analytical Table | `sap.ui.table.AnalyticalTable` | none | +| True parent-child hierarchy (BOM, org, cost centers) | Tree Table | `sap.ui.table.TreeTable` | none | +| Card/tile visual layout, images, non-tabular | Grid List | `sap.f.GridList` | none | +| Simple vertical item list, not columnar | List | `sap.m.List` / `sap.m.StandardListItem` | `ui5-list` / `ui5-li` | + +Decision order: +1. **Hierarchy?** → Tree Table. +2. **Aggregation/totals?** → Analytical Table. +3. **Large (>~200) or desktop cell-comparison?** → Grid Table. +4. **Visual cards, not columns?** → Grid List. +5. **Otherwise** → Responsive Table (`sap.m.Table`), or `ui5-table` in web-component apps. + +Common misuses: +- **Responsive Table for 5,000 rows.** It loads and renders everything → DOM bloat, single-column pop-in mush. Use Grid Table. +- **Analytical Table with no aggregation** as a "nicer grid." Adds cost, drops mobile. Use Grid Table. +- **Grouping an Analytical Table to fake a hierarchy.** Grouping ≠ nodes. Use Tree Table. +- **Grid List for text-heavy tabular data** because "cards look nice." No column alignment/sort. Use Responsive Table. +- **`ui5-table` as a drop-in for the grid/analytical tables.** It supports `overflow-mode="Popin"` (≈ `sap.m.Table`) but has no aggregation or freeze. There is no web-component grid/analytical/tree table. + +Smart/MDC tables (Fiori Elements): `sap.ui.comp.smarttable.SmartTable` (V2) / `sap.ui.mdc.Table` (V4) are annotation-driven wrappers — see `fiori-elements-vs-freestyle.md`. Don't hand-build these. + +--- + +## Inputs & selection + +Pick the simplest control that fits the cardinality and source. + +| Need | Control | SAPUI5 | Web Component | +|---|---|---|---| +| Single-line free text | Input | `sap.m.Input` | `ui5-input` | +| Multi-line text | Text Area | `sap.m.TextArea` | `ui5-textarea` | +| Pick one, short fixed list (~2–12) | Select | `sap.m.Select` | `ui5-select` | +| Pick one, long list, type-ahead/free text | Combo Box | `sap.m.ComboBox` | `ui5-combobox` | +| Pick many from a list | Multi-Combo Box | `sap.m.MultiComboBox` | `ui5-multi-combobox` | +| Enter many tokens (with value help/suggestions) | Multi-Input | `sap.m.MultiInput` | `ui5-multi-input` | +| Pick one, all options visible, ≤ ~8 | Radio Button (group) | `sap.m.RadioButton` / `RadioButtonGroup` | `ui5-radio-button` | +| Toggle a confirmed-on-save flag | Checkbox | `sap.m.CheckBox` | `ui5-checkbox` | +| Toggle an immediate on/off state | Switch | `sap.m.Switch` | `ui5-switch` | +| Pick a date | Date Picker | `sap.m.DatePicker` | `ui5-date-picker` | +| Pick a date range | Date Range Selection | `sap.m.DateRangeSelection` | none — use `ui5-date-picker` with a range, or compose two | +| Pick date + time | Date/Time Picker | `sap.m.DateTimePicker` | none — compose `ui5-date-picker` + `ui5-time-picker` | +| Pick a time | Time Picker | `sap.m.TimePicker` | `ui5-time-picker` | +| Numeric with steppers | Step Input | `sap.m.StepInput` | `ui5-step-input` | +| Search a list/table | Search Field | `sap.m.SearchField` | `ui5-search` | +| Complex value selection (dialog + inline) | Value Help Dialog | `sap.m.ValueHelpDialog` / `sap.ui.mdc.ValueHelp` | none | + +Common misuses: +- **Input for dates** → use Date Picker (parsing, calendar, validation come free). +- **Select for 200 items** → use Combo Box or Input + value help. +- **Checkbox for an immediate on/off** → use Switch; Checkbox implies "applies on save." +- **Multiple Inputs for multi-value entry** → use Multi-Input or Multi-Combo Box. +- **Select for a binary** → use Switch (setting) or Radio group (2 visible choices). + +--- + +## Actions + +| Need | Control | SAPUI5 | Web Component | +|---|---|---|---| +| Trigger an action | Button | `sap.m.Button` | `ui5-button` | +| Navigate to a page/anchor/URL | Link | `sap.m.Link` | `ui5-link` | +| Toggle a two-state toolbar action | Toggle Button | `sap.m.ToggleButton` | `ui5-toggle-button` | +| Choose one of a small option set | Segmented Button | `sap.m.SegmentedButton` | `ui5-segmented-button` | +| Button that opens a menu | Menu Button | `sap.m.MenuButton` | `ui5-button` + `ui5-menu` (no `ui5-menu-button`) | +| Default action + menu | Split Button | `sap.m.MenuButton` (split) | `ui5-split-button` | + +Button emphasis: +- **Primary:** `type="Emphasized"` / `design="Emphasized"` — one per page/dialog. +- **Secondary:** `type="Default"` (or `"Transparent"` in header/footer toolbars) / `design="Transparent"`. `Ghost` is legacy SAPUI5; no Web Component equivalent. +- **Positive/Negative:** semantic `Accept`/`Reject` (SAPUI5) / `design="Positive"`/`"Negative"` (WC). Text buttons only. + +Common misuses: +- **Button for navigation** → Link. **Link to submit** → Button. +- **`design="Ghost"` in web components** → doesn't exist; use `Transparent`. +- **`ui5-menu-button`** → doesn't exist; compose `ui5-button` + `ui5-menu`. + +--- + +## Navigation & structure + +| Need | Control | SAPUI5 | Web Component | +|---|---|---|---| +| App header (logo, search, notifications, profile, Joule) | Shell Bar | `sap.f.ShellBar` | `ui5-shellbar` (`assistant` slot = Joule) | +| Left navigation menu | Side Navigation | `sap.tnt.SideNavigation` | `ui5-side-navigation` (inside `ui5-navigation-layout`) | +| In-page section/facet navigation | Icon Tab Bar | `sap.m.IconTabBar` | `ui5-tabcontainer` | +| Editable multi-document tabs | Tab Container | `sap.m.TabContainer` | `ui5-tabcontainer` | +| Object detail floorplan | Object Page | `sap.uxap.ObjectPageLayout` | none | +| List → detail columns | Flexible Column Layout | `sap.f.FlexibleColumnLayout` | none | +| Breadcrumb trail | Breadcrumbs | `sap.m.Breadcrumbs` | `ui5-breadcrumbs` | +| Save/load view configurations | Variant Management | `sap.m.VariantManagement` / `sap.ui.fl.variants.VariantManagement` | none | + +Common misuses: +- **Bar as app header** → ShellBar. Bar is a content-area toolbar (page/dialog header/footer). +- **List as side nav** → SideNavigation (nav semantics, expand/collapse, selection). +- **TabContainer for in-page sections** → IconTabBar. TabContainer is browser-tab-style editing. +- **`ui5-side-navigation` standalone** → wrap in `ui5-navigation-layout` or responsive behavior breaks. +- **Shell Bar `Back` button** → prefer the browser back button; only use ShellBar back when technically forced. + +--- + +## Overlays & messaging + +| Need | Control | SAPUI5 | Web Component | +|---|---|---|---| +| Modal that blocks and requires input | Dialog | `sap.m.Dialog` | `ui5-dialog` | +| Semantic error/warning/success/confirm dialog | Message Box | `sap.m.MessageBox` | `ui5-dialog` (build manually) | +| Non-blocking inline page message | Message Strip | `sap.m.MessageStrip` | `ui5-message-strip` | +| Transient success confirmation | Message Toast | `sap.m.MessageToast` | `ui5-toast` | +| Aggregate many messages | Message Popover | `sap.m.MessagePopover` | none | +| Contextual detail beside a trigger | Popover | `sap.m.Popover` | `ui5-popover` | +| Standardized object preview | Quick View | `sap.m.QuickView` | none | +| Responsive popover (full-screen on phone) | Responsive Popover | `sap.m.ResponsivePopover` | `ui5-responsive-popover` | + +Common misuses: +- **Dialog for a plain error** → MessageBox (semantic type + buttons for free). +- **MessageBox/Dialog for inline feedback** → MessageStrip (non-blocking). +- **MessageStrip/Dialog for brief success** → MessageToast (auto-dismiss). +- **Popover for confirmation** → Dialog. Popover is non-modal, background stays interactive. +- **Custom Popover structure for object preview** → QuickView (standard) unless it truly can't fit. + +--- + +## Controls with no Web Component + +State this explicitly instead of inventing a `ui5-*` tag: +- `sap.ui.table.Table` / `AnalyticalTable` / `TreeTable` — no WC grid/analytical/tree table. +- `sap.uxap.ObjectPageLayout`, `sap.f.FlexibleColumnLayout`, `sap.f.GridList` — no WC equivalent. +- `sap.m.MessagePopover`, `sap.m.QuickView`, `sap.m.ValueHelpDialog`, `sap.m.VariantManagement` — no WC. +- `sap.m.MenuButton` — no `ui5-menu-button`; use `ui5-button` + `ui5-menu`. +- `sap.m.p13n.Popup` — no WC. diff --git a/plugins/ui5/skills/ui5-fiori-guidelines/references/implementation-checklist.md b/plugins/ui5/skills/ui5-fiori-guidelines/references/implementation-checklist.md new file mode 100644 index 0000000..0f6de22 --- /dev/null +++ b/plugins/ui5/skills/ui5-fiori-guidelines/references/implementation-checklist.md @@ -0,0 +1,111 @@ +# Implementation Checklist + +Use this when reviewing a built Fiori app. Each item is a yes/no check. + +## Shell and Navigation + +- [ ] App header uses `sap.f.ShellBar` / `ui5-shellbar` — not `sap.m.Bar` or a custom header +- [ ] Left-hand navigation uses `sap.f.SideNavigation` / `ui5-side-navigation` — not a List +- [ ] Master–detail layout uses `sap.f.FlexibleColumnLayout` — not custom CSS columns +- [ ] Cross-app navigation uses semantic object / action intents — not raw URLs +- [ ] Back navigation works with the browser back button and shell back arrow +- [ ] `manifest.json` declares `crossNavigation.inbounds` and `outbounds` + +## Layout and Floorplan + +- [ ] Object detail pages use `sap.uxap.ObjectPageLayout` — not `sap.m.Page` +- [ ] List → detail split uses FCL — not nested routes with manual column CSS +- [ ] Wizards use `sap.m.Wizard` — not a sequence of dialogs +- [ ] Tab-based in-page navigation uses `sap.m.IconTabBar` / `ui5-tabcontainer` — not `TabContainer` + +## Buttons and Actions + +- [ ] Exactly one emphasized / primary button per page or dialog +- [ ] Destructive actions (Delete, Discard) are Default or Transparent — never emphasized +- [ ] Icon-only buttons have a tooltip and an accessible name +- [ ] Button text is an imperative verb (Save, Edit, Approve) — not "OK", "Yes", "Submit" +- [ ] Page-level actions are in the toolbar or floating footer — not inline in content +- [ ] Overflow actions use an overflow menu — button labels are not truncated + +## Forms and Inputs + +- [ ] Every input field has a visible label (not placeholder-only) +- [ ] Required fields marked with `*`; convention explained once on the form +- [ ] Date inputs use `sap.m.DatePicker` / `ui5-date-picker` — not a plain `Input` +- [ ] Short fixed lists (2–12 items) use `Select`; long/dynamic lists use `ComboBox` + value help +- [ ] Immediate-effect toggles use `Switch`; save-confirmed selections use `CheckBox` +- [ ] Form validation uses `valueState` on the control — not manual border color CSS +- [ ] Error messages are associated with their field (`aria-describedby` or control API) + +## Tables and Lists + +- [ ] Responsive table (`sap.m.Table`) used only for ≤~200 rows, no aggregation needed +- [ ] Large datasets or totals use `sap.ui.table.AnalyticalTable` — not responsive table +- [ ] Hierarchical data uses `sap.ui.table.TreeTable` — not grouped AnalyticalTable +- [ ] Table type choice matches the data shape (see `references/ui-lists-tables.md`) +- [ ] Empty table state uses `IllustratedMessage` — not a plain "No data" text + +## Messaging + +- [ ] Persistent page-level messages use `MessageStrip` — not a Dialog +- [ ] One-time success confirmations use `MessageToast` — not a persistent strip +- [ ] Multiple validation errors use `MessagePopover` — not stacked strips +- [ ] Modal confirmations and errors use `MessageBox` — not a hand-built Dialog +- [ ] MessageToast text fits within 3 seconds of reading (~80 chars) + +## Colors and Theming + +- [ ] No hard-coded hex colors — all colors use `--sap*` CSS tokens +- [ ] Semantic colors used by meaning: error → `--sapNegativeColor`, warning → `--sapCriticalColor`, etc. +- [ ] AI surfaces use `--sapAssistant_Color1/2` gradient — not repurposed brand colors +- [ ] Form field validation uses `valueState` — not manual color overrides + +## Content Density + +- [ ] Density set once at the app root (Cozy / Compact / Condensed) +- [ ] Cozy and Compact not mixed arbitrarily in the same app context +- [ ] Condensed used only in table contexts within a Compact container + +## Accessibility + +- [ ] Every interactive element has an accessible name (label, `aria-label`, or tooltip) +- [ ] Images that convey meaning have `alt` text; decorative images have `alt=""` and `aria-hidden="true"` +- [ ] Form fields have an associated `