Answer node buttons ignore data-tone, and data-variant="warning" is unsupported
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 24.6k
- Avg merge
- 22h 9m
- Merged PRs (30d)
- 610
Description
### Self Checks
- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
### Dify version
1.14.2, 1.15.0
### Cloud or Self Hosted
Self Hosted (Docker)
### Steps to reproduce
1. Create a Chatflow or Workflow containing an Answer node.
2. Add the following HTML to the Answer node:
```html
❌ Stop this task
```
or
```html
❌ Stop this task
```
or
```html
❌ Stop this task
```
3. Run the app in Preview.
4. Observe the rendered button.
### ✔️ Expected Behavior
The Answer node renderer should preserve and map:
```html
data-tone="destructive"
```
to:
```tsx
tone="destructive"
```
on the Dify UI `Button` component.
The rendered button should therefore use the existing destructive design tokens.
By the way, the supported tags documented here are outdated and no longer match the current implementation. https://docs.dify.ai/en/cloud/use-dify/nodes/template#supported-tags
### ❌ Actual Behavior
The button is rendered using the normal default style. The `data-tone="destructive"` attribute does not affect the rendered Button style.
Contributor guide
Research direction
Start at the Answer node renderer and inspect how rendered button attributes are passed to the Dify UI Button component. Reproduce the examples in Preview, then verify that data-tone="destructive" and data-variant="warning" produce the intended styles and that the documented supported tags are consistent with the current implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100