Skip to content

[IMP] base_ux: add empty-state placeholder to ModelFieldSelector - #416

Closed
les-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-69981-les-2
Closed

les-adhoc wants to merge 1 commit into
ingadhoc:19.0from
adhoc-dev:19.0-t-69981-les-2

Conversation

@les-adhoc

Copy link
Copy Markdown
Contributor

What

Extends the core web ModelFieldSelector OWL template to show a muted
"Select a field..." placeholder when the field chain is empty and the widget is
in edit mode.

Why

When the chain is empty, the core component renders the value container as an
invisible ~20x20px box with no border, chip or placeholder. Users do not realize
it is a clickable input until they hover over it (the dotted line only appears on
hover). Reported during a usability session; the most visible case is the
Update Record server action in Automation Rules.

How

New asset base_ux/static/src/model_field_selector/model_field_selector.xml: a
t-inherit="web._ModelFieldSelector" t-inherit-mode="extension" that appends a
placeholder <span> inside .o_model_field_selector_value, gated by
!props.readonly and !state.displayNames.length. No Python, no JS, no SCSS — the
span uses Bootstrap utility classes. web is not added to depends (it is
already pulled in transitively via mail).

Test plan

  1. Settings → Technical → Automation Rules → create a rule → add an Update
    Record
    action.
  2. The field-to-update selector now shows "Select a field..." while empty
    (previously a blank invisible box).
  3. Pick a field → the placeholder disappears and the chain renders as before.
  4. Readonly contexts are unaffected (placeholder only shows in edit mode).

Notes

Internal task: 69981

@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

The core web ModelFieldSelector renders an empty 20x20 box with no affordance
when the field chain is empty, so users do not realize it is clickable until
hovering (e.g. the Update Record server action). Extend the template to show a
muted 'Select a field...' placeholder while empty and in edit mode.
@les-adhoc
les-adhoc force-pushed the 19.0-t-69981-les-2 branch from f3c3765 to be02e14 Compare June 29, 2026 18:29
@mav-adhoc

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

roboadhoc pushed a commit that referenced this pull request Jun 30, 2026
The core web ModelFieldSelector renders an empty 20x20 box with no affordance
when the field chain is empty, so users do not realize it is clickable until
hovering (e.g. the Update Record server action). Extend the template to show a
muted 'Select a field...' placeholder while empty and in edit mode.

closes #416

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
@roboadhoc roboadhoc closed this in 1b4c47c Jun 30, 2026
@roboadhoc roboadhoc added the 18.1 label Jun 30, 2026
@roboadhoc
roboadhoc deleted the 19.0-t-69981-les-2 branch June 30, 2026 15:02

This branch was previously deployed

1 inactive deployment
merge — be02e141 Deployed Jun 30, 2026 by roboadhoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants