Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run panel position is wrong! #5996

Closed
5 tasks done
aixgeek opened this issue Jul 5, 2024 · 1 comment · Fixed by #5998
Closed
5 tasks done

Run panel position is wrong! #5996

aixgeek opened this issue Jul 5, 2024 · 1 comment · Fixed by #5998
Assignees
Labels
🐞 bug Something isn't working

Comments

@aixgeek
Copy link
Contributor

aixgeek commented Jul 5, 2024

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.11

Cloud or Self Hosted

Cloud, Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

Add multi outputs in panel and scroll panel
Click run button,the run panel position is wrong.

✔️ Expected Behavior

image

❌ Actual Behavior

image

image

@dosubot dosubot bot added the 🐞 bug Something isn't working label Jul 5, 2024
Copy link

dosubot bot commented Jul 5, 2024

To fix the issue where the run panel appears in the wrong position after adding multiple outputs and scrolling the panel in the Dify application, you need to ensure that the height of the panel is adjusted correctly when the content changes.

In the provided code, the adjustResultHeight function is responsible for setting the height of the panel. However, it is only called in the useEffect hook that depends on the loading state. You should also call this function whenever the content of the panel changes.

You can achieve this by adding a dependency on runDetail in the useEffect hook that calls adjustResultHeight. Here is the modified code:

useEffect(() => {
  adjustResultHeight()
}, [loading, runDetail])

This ensures that the height is adjusted whenever the runDetail changes, which should fix the issue with the panel appearing in the wrong position.

Here is the updated part of the code:

useEffect(() => {
  adjustResultHeight()
}, [loading, runDetail])

This change should ensure that the panel height is recalculated whenever the content changes, thus fixing the positioning issue [1][2].

To continue talking to Dosu, mention @dosu.

@crazywoola crazywoola self-assigned this Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
2 participants