.callout{padding:12px 16px;border-radius:6px;margin:16px 0;font-size:14px;line-height:1.6}
.callout strong{display:block;margin-bottom:6px}
.callout p{margin:4px 0 0}
.callout-placeholder{background:#F9FAFB;border:1px dashed #D1D5DB;border-left:4px solid #9CA3AF}
.do-dont{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:16px 0}
@media(max-width:640px){.do-dont{grid-template-columns:1fr}}
.do{border-left:4px solid #1A7F5A;padding:12px 16px;background:#F0FDF4;border-radius:0 4px 4px 0}
.dont{border-left:4px solid #B91C1C;padding:12px 16px;background:#FFF5F5;border-radius:0 4px 4px 0}
.do-dont-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;margin-bottom:8px}
.do-label{color:#1A7F5A}
.dont-label{color:#B91C1C}
.do-dont-content p{margin:0;font-size:13px;line-height:1.6}
.prototype-note{font-size:12px;font-style:italic;color:#6B7280;border-left:2px solid #D1D5DB;padding-left:10px;margin:6px 0 12px}
.related-pages{margin-top:32px;padding-top:20px;border-top:1px solid #E5E7EB}
.related-pages h3{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#6B7280;margin-bottom:10px}

# Ribbon

The Petrel Ribbon is the primary command surface in Petrel. It organizes commands into tabs and groups based on the user's current workflow context.
## When to use the Ribbon

Add commands to the Ribbon when they are primary workflow actions that users need to access frequently from any context. Secondary or advanced commands belong in context menus, dialogs, or pane toolbars rather than in the main Ribbon.

## When not to use

- For actions that are only relevant in a specific pane — add them to the pane toolbar instead
- For settings and preferences — use the Options dialog
- For actions that should be rare or expert-only — use context menus or keyboard shortcuts


## Ribbon structure

1. **Application menu** (backstage) — File-level operations: open, save, export, print, close
2. **Persistent tabs** — Always-visible tabs for core Petrel workflow areas (Home, Geology, Geophysics, Reservoir, etc.)
3. **Contextual tabs** — Appear when a specific Petrel object or pane is active (for example, a "Seismic Interpretation" tab appears when the seismic viewer is active)
4. **Quick Access Toolbar (QAT)** — User-customizable area above the Ribbon for the most frequently used commands


## Tab and group naming

Tab names identify a workflow area or domain. Group names within a tab identify clusters of related commands. Use title case for both tabs and groups.

Good tab name examples: *Geology*, *Well Data*, *Structural Interpretation*

Good group name examples: *Create*, *Edit*, *Display*, *Export*

Prototype tab and group names. Confirm the Ribbon IA with the Petrel product team.
## Command placement principles

- Place the most frequently used commands first, within a tab's left groups.
- Group commands by the operation type they perform (Create, Edit, Delete, Display).
- Destructive commands (Delete, Clear, Reset) belong in the rightmost group of a tab.
- Limit each group to 5–7 commands to maintain visual clarity.


## Large and small icons

Ribbon commands use large icons (32px) for the highest-priority commands in a group and small icons (16px) for supporting commands. The first one or two commands in a group typically use large icons; remaining commands use small icons in a vertical stack of two.

## Do and Don't

DO
Use a contextual tab to expose commands for a selected Petrel object. Contextual tabs keep the main Ribbon uncluttered and surface commands exactly when the user needs them — when a relevant object is selected or a relevant pane is active.
DON'T
Don't add commands to the main persistent tabs that only apply in a specific pane or context. Commands that are always visible but frequently disabled train users to ignore the entire group, reducing the discoverability of commands that are available.
## Accessibility requirements

- All Ribbon tabs must be reachable by keyboard (Alt key activates the Ribbon keytip layer; arrow keys navigate between tabs).
- All Ribbon commands must have tooltips that include the command name, keyboard shortcut (if any), and a brief description.
- Ribbon buttons must implement the `InvokePattern` UIA pattern.
- Toggle buttons (pressed/unpressed state) must implement the `TogglePattern` UIA pattern.
- Split buttons must implement both `InvokePattern` and `ExpandCollapsePattern`.


## Implementation notes

Implementation note placeholder
Guidance on the Petrel Ribbon framework, 
RibbonTab
XAML registration, and contextual tab activation API will be added here by the Petrel development team.
### Related pages

Icons
— Ribbon icon sizing and naming
Buttons
— Ribbon command button behaviour
Navigation and menus
— Context menus and toolbars