Skip to content

fix(chat-flow): repair the option-row layout, dark theme, and the newline hint (1.0.7)#43

Merged
rmyndharis merged 1 commit into
mainfrom
fix/chat-flow-editor-ui
Jul 22, 2026
Merged

fix(chat-flow): repair the option-row layout, dark theme, and the newline hint (1.0.7)#43
rmyndharis merged 1 commit into
mainfrom
fix/chat-flow-editor-ui

Conversation

@rmyndharis

Copy link
Copy Markdown
Owner

Fixes the editor defects behind OpenWA#853.

1. The menu-option rows were unusable

Each option row rendered with its key field stretched across the full width, pushing the reply textarea and the row's Remove / Sub-option buttons outside the panel where they were clipped and unreachable. A menu could not be edited at all — which matches the report.

The cause is a specificity collision. input[type="text"] sets width: 100% and, as an element plus attribute selector, scores (0,1,1) — which outranks the bare .node-key class at (0,1,0), so the 72px width never applied. The rule is now input.node-key and carries its width through flex-basis as well, so it survives a future reordering of the stylesheet.

2. The greeting placeholder taught the wrong format

It read Hi! Please choose:\n1. Hosting\n2. Support with a literal backslash-n, because \n inside an HTML attribute is two characters rather than a line break. That is worse than cosmetic: a \n typed into the greeting is delivered to WhatsApp exactly as written. The placeholder now uses 
 and shows the example across real lines.

3. The editor ignored the dashboard's dark theme

It was light-only, so on a dark dashboard it appeared as a bright panel in the middle of the dialog.

Colours now come from custom properties with a dark override, applied from the theme the host reports in the settings handshake (OpenWA#860, OpenWA 0.10.5+). The sandboxed iframe has an opaque origin and cannot read the parent's theme itself, so it can only be told. prefers-color-scheme stays as the fallback, which keeps the editor readable on an older host that sends nothing — so this is safe to release ahead of the host change.

Verification

Reproduced in a running dashboard before the change and re-checked after, in both themes: the option row lays out correctly (narrow key, reply text filling the space, both buttons visible), and the editor matches the dashboard in light and dark.

Suite 405/405, tsc --noEmit clean, catalog regenerated.

…line hint (1.0.7)

Three defects in the visual flow editor, all reproduced in a running dashboard
before and after the change.

The option rows were unusable. `input[type="text"]` sets width:100% and, as an
element+attribute selector, has specificity (0,1,1) — which beats the bare
`.node-key` class at (0,1,0). The key field therefore stretched across the whole
flex row and pushed the reply textarea and the row's buttons outside the panel,
clipped and unreachable, so a menu could not be edited at all. The rule is now
`input.node-key` and carries its width through flex-basis, so it holds even if
the stylesheet is later reordered.

The greeting placeholder read "Hi! Please choose:\n1. Hosting" with a literal
backslash-n, because \n in an HTML attribute is two characters, not a line break.
It modelled input that the plugin sends to WhatsApp verbatim. It now uses 

and shows the example across real lines.

The editor was light-only, so on a dark dashboard it rendered as a bright panel
inside a dark dialog. Colours now come from custom properties with a dark
override, driven by the theme the host reports in the config handshake (OpenWA
0.10.5+). The sandboxed iframe has an opaque origin and cannot read the parent's
theme itself, so without that field it can only guess; `prefers-color-scheme`
remains the fallback for an older host, which keeps this working either way.
@rmyndharis
rmyndharis merged commit 87703f2 into main Jul 22, 2026
1 check passed
@rmyndharis
rmyndharis deleted the fix/chat-flow-editor-ui branch July 22, 2026 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant