Skip to content

ADR-0089: ObjectUI form + page renderers must read canonical visibleWhen (sibling repo) #2904

Description

@os-zhuang

Follow-up to #2642 / #2900 (ADR-0089), for the sibling objectui repo.

Why

#2900 makes visibleWhen the canonical conditional-visibility key and normalizes the deprecated visibleOn (view form) / visibility (page component) aliases into visibleWhen at the spec parse boundary (a zod .transform()). Any metadata parsed through the spec schemas now exposes only visibleWhen.

The form + page renderers live in objectui (not in this backend repo) and currently read visibleOn / visibility. They must be updated to read visibleWhen so runtime conditional visibility keeps working once metadata is normalized. This is the "Renderer reads" checkbox in #2642.

Tasks (in objectui)

  • Form renderer: read visibleWhen on form sections/fields (was visibleOn).
  • Page renderer: read visibleWhen on page components (was visibility).
  • Keep a defensive visibleWhen ?? visibleOn ?? visibility read only if raw (un-parsed) metadata can reach the renderer; otherwise read visibleWhen directly.
  • After pnpm objectui:refresh, verify visibility rules in the showcase (contact-form / page-variables pages, task form notes field).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions