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

Correct hover popup position on right side drawer #449

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

brandon1024
Copy link
Contributor

When navigating through nodes in a drawer window, node names that extend beyond the width of the fern window are shown in a popup to display the full name to the user.

A regression introduced in 10dd4bb (Improve hover popup behavior, 2022-03-16) prevented the popup from being positioned correctly in drawer windows positioned on the right side. As a result, the hover popup behavior was disabled for right hand drawers in ab237a1 (Merge pull request #419 from lambdalisue/fix-popup-right, 2022-04-15).

This revision reintroduces this functionality, ensuring that the popup windows are positioned correctly in all cases.

Fixes #418

Notes

I haven't tested this in neovim. I don't use neovim myself, so any assistance would be hugely appreciated!

Screenshots

image
Popup text doesn't wrap like it used to, which was an undeseriable quirk of the first revision of this feature.

image
Popup is not shown when the text fits in the window perfectly.

image
Identical behaviour for left-handed drawer windows.

@brandon1024
Copy link
Contributor Author

I tried to test these changes in neovim, but I can't seem to figure out how to get popup support working ¯_(ツ)_/¯

@hrsh7th would you be willing to give these changes a try? Would be greatly appreciated!

@lambdalisue
Copy link
Owner

I asked @hrsh7th to check this so he will check it when he got time 👍

@hrsh7th
Copy link
Contributor

hrsh7th commented Oct 18, 2022

I've checked the behavior. It works good.

I leave the little review comment. I think it could be merged after resolved the review point.

When navigating through nodes in a drawer window, node names that extend
beyond the width of the fern window are shown in a popup to display the
full name to the user.

A regression introduced in 10dd4bb (Improve hover popup behavior, 2022-03-16)
prevented the popup from being positioned correctly in drawer windows
positioned on the right side. As a result, the hover popup behavior was
disabled for right hand drawers in ab237a1 (Merge pull request lambdalisue#419 from
lambdalisue/fix-popup-right, 2022-04-15).

This revision reintroduces this functionality, ensuring that the popup
windows are positioned correctly in all cases.
@brandon1024
Copy link
Contributor Author

Thanks for your help @hrsh7th !

@lambdalisue
Copy link
Owner

I'm sorry but force-pushed so could you review again? @hrsh7th

@hrsh7th
Copy link
Contributor

hrsh7th commented Oct 18, 2022

LGTM.

@lambdalisue lambdalisue merged commit d0ada5b into lambdalisue:main Oct 18, 2022
@brandon1024 brandon1024 deleted the popup-fix branch October 18, 2022 15:04
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.

Popup is shifted when drawer is displayed on the right side
3 participants