Skip to content

Unify list-view conditional features (conditional formatting / row-action visibility) onto the CEL engine #1584

@xuyushun441-sys

Description

@xuyushun441-sys

Context

B2 standardized field conditional rules on CEL (@objectstack/formula), evaluated identically client + server. But the list view still uses older, bespoke JSON condition shapes for:

  • conditional formatting (evaluateConditionalFormatting in packages/plugin-list/src/ListView.tsx),
  • row-level action visibility,
  • (and the legacy form condition: {field, equals/in} path in the form renderer).

Goal

Converge these onto the same CEL engine + evalFieldPredicate helper so the whole platform speaks one expression dialect, and authors can reuse the same record.* predicates everywhere.

Scope

  • objectui: packages/plugin-list (conditional formatting + row-action visibleWhen), and optionally retire/forward the legacy condition JSON in packages/components/src/renderers/form/form.tsx to CEL (with back-compat).
  • No framework change required (client-side rendering concern), unless we also want server-side list policy.

Acceptance

  • A list view can express conditional formatting + row-action visibility as CEL predicates over the row record.
  • Legacy JSON condition keeps working (back-compat) or is transparently translated.
  • Unit tests + a live e2e on a showcase list.
  • Docs/skill note (objectstack-ui) updated.

Priority

Lower than #1581 (parent-scoped grid lock) and #1582 (Studio CEL editor) — do those first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions