Feedback and status

Conflict review

<forma-conflict-review>

Explains an optimistic-concurrency conflict, shows what changed, and offers only application-supplied recovery actions.

Authoring tag
<forma-conflict-review>
Behavior owner
Ordo / application
Canonical source
patterns/conflict-review.html

Purpose

A conflict review appears when the user tried to change a record that someone else changed first. Forma composes a bordered article with a header (a Conflict Status lozenge, a heading and an explanation), an embedded Diff viewer comparing what the user reviewed with what is current, and a footer of recovery actions. The application or Ordo detects the conflict, supplies both versions, and decides which recovery actions are legal; Forma never merges or chooses a winner.

Use when

  • A save or transition was rejected because the record's version changed since the user loaded it.
  • The user must see what changed before choosing how to proceed.
  • Recovery options differ by situation (reload, reapply my change, cancel) and the application supplies them.

Avoid when

  • The outcome is unknown rather than conflicting: use Operation status.
  • A general comparison of two versions with no pending decision: use Diff viewer alone.
  • A brief notice that data changed, with no blocked action: use Alert.

Behavior to know

  • The header always states that nothing was applied, so users do not assume their change went through.
  • Changed fields in the diff are marked with a thick inline-start border as well as their position.
  • Actions sit at the end of the footer and wrap on narrow screens.

Basic example

The smallest correct markup: the canonical pattern from patterns/conflict-review.html inside its public tag. Copy this first, then adapt labels, names and state.

Canonical

Minimal conflict review

Rendered from the canonical pattern file.

Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.

Conflict

This record changed while you were reviewing it

No changes were applied. Review the current version before choosing a legal recovery action.

You reviewed

Outstanding balance: $5,000

Current

Outstanding balance: $2,500

HTML · Minimal conflict review Raw HTML for HTML · Minimal conflict review
<forma-conflict-review class="forma-component-tag">
<article class="forma-conflict-review" aria-labelledby="conflict-title">
  <header class="forma-conflict-review__header">
    <span class="forma-status-lozenge" data-state="attention">Conflict</span>
    <h3 id="conflict-title">This record changed while you were reviewing it</h3>
    <p>No changes were applied. Review the current version before choosing a legal recovery action.</p>
  </header>
  <div class="forma-diff-viewer">
    <div class="forma-diff-viewer__grid">
      <section class="forma-diff-viewer__side"><h4>You reviewed</h4><p>Outstanding balance: $5,000</p></section>
      <section class="forma-diff-viewer__side"><h4>Current</h4><p>Outstanding balance: $2,500</p></section>
    </div>
  </div>
  <footer class="forma-conflict-review__actions">
    <button type="button">Reload current</button>
    <button type="button">Cancel</button>
  </footer>
</article>
</forma-conflict-review>

Click or tap the code once to select all of it, then copy.

Examples

Scenario

Several fields changed

A vendor record where two of three fields changed. Each side is a Diff viewer column with forma-diff-row entries, and data-change="changed" marks the rows that differ. The application offers three legal recoveries.

Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.

Conflict

Vendor Northwind Traders was changed by Priya Shah

Your edit to the payment terms was not saved. Compare the versions, then choose how to continue.

You edited (version 7)

Payment terms
Net 30
Remit-to address
12 Harbor Rd
Currency
USD

Current (version 8)

Payment terms
Net 45
Remit-to address
PO Box 88
Currency
USD
HTML · Several fields changed Raw HTML for HTML · Several fields changed
<forma-conflict-review class="forma-component-tag">
  <article class="forma-conflict-review" aria-labelledby="conflict-review-multiple-fields-title">
    <header class="forma-conflict-review__header">
      <span class="forma-status-lozenge" data-state="attention">Conflict</span>
      <h3 id="conflict-review-multiple-fields-title">Vendor Northwind Traders was changed by Priya Shah</h3>
      <p>Your edit to the payment terms was not saved. Compare the versions, then choose how to continue.</p>
    </header>
    <div class="forma-diff-viewer">
      <div class="forma-diff-viewer__grid">
        <section class="forma-diff-viewer__side" aria-label="Version you edited">
          <h4>You edited (version 7)</h4>
          <dl>
            <div class="forma-diff-row" data-change="changed"><dt>Payment terms</dt><dd>Net 30</dd></div>
            <div class="forma-diff-row" data-change="changed"><dt>Remit-to address</dt><dd>12 Harbor Rd</dd></div>
            <div class="forma-diff-row"><dt>Currency</dt><dd>USD</dd></div>
          </dl>
        </section>
        <section class="forma-diff-viewer__side" aria-label="Current version">
          <h4>Current (version 8)</h4>
          <dl>
            <div class="forma-diff-row" data-change="changed"><dt>Payment terms</dt><dd>Net 45</dd></div>
            <div class="forma-diff-row" data-change="changed"><dt>Remit-to address</dt><dd>PO Box 88</dd></div>
            <div class="forma-diff-row"><dt>Currency</dt><dd>USD</dd></div>
          </dl>
        </section>
      </div>
    </div>
    <footer class="forma-conflict-review__actions">
      <button type="button">Reapply my change to version 8</button>
      <button type="button">Keep current version</button>
      <button type="button">Cancel</button>
    </footer>
  </article>
</forma-conflict-review>

Click or tap the code once to select all of it, then copy.

Scenario

Record deleted by someone else

There is no current version to compare, so the diff is omitted. The header explains what happened and the only actions are ones that cannot overwrite anything.

Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.

Conflict: deleted

This expense claim was deleted while you were editing it

Your changes were not saved. You can copy them into a new claim.

HTML · Record deleted by someone else Raw HTML for HTML · Record deleted by someone else
<forma-conflict-review class="forma-component-tag">
  <article class="forma-conflict-review" aria-labelledby="conflict-review-record-deleted-title">
    <header class="forma-conflict-review__header">
      <span class="forma-status-lozenge" data-state="blocked">Conflict: deleted</span>
      <h3 id="conflict-review-record-deleted-title">This expense claim was deleted while you were editing it</h3>
      <p>Your changes were not saved. You can copy them into a new claim.</p>
    </header>
    <footer class="forma-conflict-review__actions">
      <button type="button">Start a new claim with my changes</button>
      <button type="button">Discard my changes</button>
    </footer>
  </article>
</forma-conflict-review>

Click or tap the code once to select all of it, then copy.

Mobile

Each mobile example renders in its own document inside a real narrow viewport, so Forma's media and container queries run exactly as they would on a phone. Choose a width to compare.

Mobile example

Mobile balance conflict

A single-field conflict at phone width.

Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.

Viewport width

Frames narrower than the selected width show the component at the width available.

What changes at narrow widths

  • Below 40rem the diff viewer's two sides stack: the version you reviewed above the current version.
  • Below 30rem each diff row stacks its label above its value, so long values wrap without truncation.
  • Footer actions wrap onto separate lines and stay aligned to the end; each keeps a 44px-tall touch target.
  • The header text wraps; nothing scrolls horizontally at 320px in either orientation.
HTML · Mobile balance conflict Raw HTML for HTML · Mobile balance conflict
<forma-conflict-review class="forma-component-tag">
  <article class="forma-conflict-review" aria-labelledby="conflict-review-mobile-balance-conflict-title">
    <header class="forma-conflict-review__header">
      <span class="forma-status-lozenge" data-state="attention">Conflict</span>
      <h3 id="conflict-review-mobile-balance-conflict-title">The balance changed while you were reviewing it</h3>
      <p>No write-off was applied.</p>
    </header>
    <div class="forma-diff-viewer">
      <div class="forma-diff-viewer__grid">
        <section class="forma-diff-viewer__side" aria-label="Version you reviewed">
          <h4>You reviewed</h4>
          <dl><div class="forma-diff-row" data-change="changed"><dt>Outstanding balance</dt><dd>5,000.00</dd></div></dl>
        </section>
        <section class="forma-diff-viewer__side" aria-label="Current version">
          <h4>Current</h4>
          <dl><div class="forma-diff-row" data-change="changed"><dt>Outstanding balance</dt><dd>2,500.00</dd></div></dl>
        </section>
      </div>
    </div>
    <footer class="forma-conflict-review__actions">
      <button type="button">Reload current</button>
      <button type="button">Cancel</button>
    </footer>
  </article>
</forma-conflict-review>

Click or tap the code once to select all of it, then copy.

Baseline

Mobile · 320px

The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.

Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.

Viewport width

Frames narrower than the selected width show the component at the width available.

API and configuration

Forma components have no JavaScript API. Their public contract is the markup: native elements and attributes you write, and the CSS hooks below. The CSS hook table is generated from the built stylesheet, so it always matches the shipped implementation.

Native and ARIA attributes
AttributeOnValuesDefaultDescription
aria-labelledbyarticle.forma-conflict-reviewid of the header heading—Names the article from its heading.
aria-label.forma-diff-viewer__sidestring—Names each side of the comparison (the version reviewed and the current version).
data-state.forma-status-lozengeattention | blocked—Glyph for the conflict lozenge.
data-change.forma-diff-rowchangedabsentMarks a row whose value differs between versions. See Diff viewer.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-conflict-reviewBlock class—Root article with a functional border. An embedded diff viewer loses its own inline borders so the two frames do not double up.
.forma-conflict-review__actionsElement class—Footer row of application-supplied actions: wrapping, end-aligned, with a top rule.
.forma-conflict-review__headerElement class—Padded header with a bottom rule, holding the lozenge, heading and explanation.
Keyboard interaction
KeysResult
Tab / Shift+TabMoves through the recovery actions. The comparison itself is static content.
Enter / SpaceActivates the focused action (native button behavior).
Events
EventDescription
clickNative click on recovery buttons. The application or Ordo performs the chosen recovery.

Form behavior

Not a form control. If the actions are form submit buttons, the application still validates legality server-side.

States

Conflict review states
StateHow it is expressedPresentation
Conflict with comparisonheader, diff viewer and actionsBoth versions are available and differences are marked.
Conflict without comparisonheader and actions, no diff viewerThe current version is missing or cannot be shown; the header explains why.
Changed rowdata-change="changed" on .forma-diff-rowThick inline-start border beside rows that differ.

Accessibility

Forma provides

  • Uses an article with a heading, labelled comparison sides and definition lists, so the structure is navigable without seeing the layout.
  • Marks changed rows with a border in addition to their content, not color alone.
  • Keeps recovery actions as native buttons in a predictable footer.

Your application supplies

  • State in the header that the user's change was not applied.
  • Say who changed the record and when, when the application knows.
  • Offer only recovery actions that are legal for the current version, and label each with its effect.
  • Move focus to the conflict review's heading when it replaces the form the user was editing.

Responsive behavior

  • The comparison is two columns on wide screens and stacks below 40rem.
  • Diff rows stack label above value below 30rem.
  • The action footer wraps and keeps actions at the inline end.
  • Long values and names wrap inside their columns.

Motion

  • No animation: the conflict review replaces or accompanies the form through the application's DOM change.

Usage guidance

Do

  • Show only the fields that matter to the decision, plus enough context to recognize the record.
  • Label versions by source and number ("You edited, version 7" and "Current, version 8").

Avoid

  • Offering an automatic "Overwrite" unless the domain explicitly allows it.
  • Hiding the conflict behind a generic save error.

Verification specimens

Generated fault-injection specimens expose content, spacing, color-cue, and reduced-effective-contrast risks. They screen presentation robustness as engineering screens without claiming human-subject validation.