-
-
Notifications
You must be signed in to change notification settings - Fork 413
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
Discard overlapped elements in hint-mode
#2820
Conversation
I am not sure if all these tasks should be checked because some of them don't seem to be appropriate to this small change. As for the style guidelines I haven't read them yet, I will do in the coming days. Please let me know which tasks are mandatory for the pull request to be merged. |
@heiwiper thanks for this PR!
Don't worry too much about it! It's your first contribution so, realistically, no one expects you to be fully aware of all of the project's protocols. I'll take a deeper look at your changes right now. |
This makes sense, but I'm still confused about one detail. Make the following test. Drop I think you're right and we should only check for |
@heiwiper amazing work! I've left some comments, thanks. |
You are right about this I just noticed that behaviour, but it's apparently the same before making the changes I have added. Maybe we could open a new issue for that specific behaviour, I would gladly work on it if you think it's not very complex for a new comer. |
I have added the changes locally, I will test it and update the pull request a bit later today. |
I would like to thank you for reviews, I have just added the changes you have mentioned and marked the reviews as resolved except one in which I added a reply. Let me know if there are any other changes related to that one unresolved review or any other part of the code. |
@aadcg, can you test locally? My Nyxt misbehaves atm, so I cannot test |_・) |
@aadcg, can you test locally? My Nyxt misbehaves atm, so I cannot test
|_・)
Sure! Don't worry, I'm going to check this later today. I'm
prioritizing energy-consuming tasks and leaving the easier ones for
later.
|
Description
I have added a function to verify whether an element is overlapped when calling the
follow-hint
command. This function is used to discard the overlapped elements when the user has set thecompute-hints-in-view-port-p
tot
.Fixes #2506
Discussion
The new added function
element-overlapped-p
is inspired by the algorithm fromsaka-key
project. I have noticed a side effect to this algorithm which is that it automatically discards elements that aren't in the view port, this part is already implemented in the functionelement-in-view-port-p
which makes the process redundant since both functions are called when checking for hints. After investigating the issue I found out that the javascript functionelementFromPoint
returnsnull
when the element is outside the view port, which according to the algorithm acts as if the two elements are not related thus one is overlapping the other.Checklist:
Everything in this checklist is required for each PR. Please do not approve a PR that does not have all of these items.
cd /path/to/nyxt/checkout git submodule add https://gitlab.common-lisp.net/nyxt/py-configparser _build/py-configparser
:documentation
s written in the aforementioned style. (It's OK to skip the docstring for really trivial parts.)changelog.lisp
with my changes if it's anything user-facing (new features, important bug fix, compatibility breakage).migration.lisp
entry for all compatibility-breaking changes.