incorrect operation of publishing as tool
Self Checks
- [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [x] I have searched for existing issues search for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [x] Please do not modify this template :) and fill in all the required fields.
Dify version
1.0.0
Cloud or Self Hosted
Cloud
Steps to reproduce
When publishing the workflow as a tool, the status is "disabled", but the click and hover functions are not prohibited.
✔️ Expected Behavior
Normally, it should not be clickable or hoverable when it is in the disabled state.
❌ Actual Behavior
Actually, it can be clicked and hovered.
These issues also existed in previous versions.
Hello, @JS-mark! I'm here to help you with any bugs, questions, or contributions you have. Let's tackle this together!
The issue you're experiencing with the 'Publish as Tool' feature, where it remains clickable and hoverable even when disabled, seems to be a known problem. The code includes logic to handle the disabled state by applying styles like opacity-30 and cursor-not-allowed to indicate that the button is not interactive. However, the click event handler should prevent any action when the button is disabled by checking the published state:
onClick={() => !published && setShowModal(true)}
This logic should ensure that the button does not trigger any actions when it is disabled. If this behavior is not working as expected, it might be due to a bug or an oversight in the implementation. You might want to verify if the published state is being correctly set and if the styles are being applied as intended [1][2].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other