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

click to expect the hover display information to be dynamically updated without refreshing the hover. #203767

Open
OceanBelongsToMe opened this issue Jan 30, 2024 · 15 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug editor-hover Editor mouse hover

Comments

@OceanBelongsToMe
Copy link

As shown in the picture, click to expect the hover display information to be dynamically updated without refreshing the hover.

image
@aiday-mar
Copy link
Contributor

Hi, thank you for writing this issue. Could you please include a bigger screenshot, and even preferably a video screen recording of the issue? I am not quite sure I understand where the issue is arising.

@aiday-mar aiday-mar added the info-needed Issue requires more information from poster label Jan 30, 2024
@OceanBelongsToMe
Copy link
Author

When the hover content is updated, hover again and flashing occurs.

Papers-1706620492516.mp4

@OceanBelongsToMe
Copy link
Author

Thank you very much for your reply😁

@aiday-mar
Copy link
Contributor

I see thank you for the update

@aiday-mar aiday-mar added bug Issue identified by VS Code Team member as probable bug editor-hover Editor mouse hover and removed info-needed Issue requires more information from poster labels Jan 30, 2024
@OceanBelongsToMe
Copy link
Author

It seems to be the same issue as #195394. After the official version is released, I will verify it.

@aiday-mar
Copy link
Contributor

This API will have to be adopted by the extension authors for the bug to be fixed.

@OceanBelongsToMe
Copy link
Author

Ok I'll try it in my own extension

@aiday-mar
Copy link
Contributor

Yes when it comes out, the API has not come out yet. You can track the state of that work on the issue you linked.

@OceanBelongsToMe
Copy link
Author

🫡,谢啦!

@OceanBelongsToMe
Copy link
Author

Verbosity Hover 能够实现我的需求,但在 automatic completion 中就失效了,其实,editor.action.showHover 就能满足,但在 hover Widget 中,这个命令并不会重新渲染 hover

能否让hover中命令文本:editor.action.showHover,能触发重新渲染hover

@aiday-mar
Copy link
Contributor

Hi @OceanBelongsToMe apologies I do not speak Mandarin. Can you please explain your comment in English?

@OceanBelongsToMe
Copy link
Author

Verbosity Hover can meet my needs, but it fails in Completion Hover. In fact, editor.action.showHover can satisfy it, but in hover Widget, this command will not re-render hover Widget.

Can the command text in hover: editor.action.showHover trigger re-rendering of hover?

@aiday-mar
Copy link
Contributor

Hi @OceanBelongsToMe I believe the current command already re-renders the hover when it is invoked.

In the example you gave in the screen recording above, how do you update the hover contents (what is the code you use to update the hover contents?)?

A potential feature request would be to update the contents of the hover without hiding the hover before and creating a new one.

@OceanBelongsToMe
Copy link
Author

For example, the following markdown text is displayed through hover. Clicking the command "editor.action.showHover" will send a hover request to lsp, but after receiving the new hover, it will not be rendered.

## 测试

- [editor.action.showHover](command:editor.action.showHover)

@OceanBelongsToMe
Copy link
Author

OceanBelongsToMe commented May 13, 2024

Hi @OceanBelongsToMe I believe the current command already re-renders the hover when it is invoked.

In the example you gave in the screen recording above, how do you update the hover contents (what is the code you use to update the hover contents?)?

A potential feature request would be to update the contents of the hover without hiding the hover before and creating a new one.

I have added a custom command in the hover: '[xxxx](command:my.action.showNewHover?xxxxx)'. This command carries some parameters and will trigger another hover event (sending a hover request to the LSP and updating the hover content).

However, the built-in event 'editor.action.showHover' does not re-render the hover after obtaining the new hover content.

I can only choose to use the 'cursor move' command to trigger the re-rendering of the hover, but as you can see, this type of rendering first hides and then reappears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug editor-hover Editor mouse hover
Projects
None yet
Development

No branches or pull requests

2 participants