Added a method on the NVDAObject class called objectFromPointRedirect#16807
Conversation
|
This gives a good base for developing improvements to mouse tracking and probably also for indent navigation. cc: @mltony |
See test results for failed build of commit 515b7df2a7 |
See test results for failed build of commit 78ac29a93a |
Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
See test results for failed build of commit 62efd5a3d0 |
|
@LeonarddeR the line def objectFromPointRedirect(self, x: int, y: int) -> NVDAObject | None: gave an error since NVDAObject is not defined yet. Should I enclose the entire type hint in a string? |
|
you should indeed store "NVDAObject" in a String probably. |
See test results for failed build of commit 90c40420a6 |
|
@LeonarddeR Ok. Do you know how I can check what causes the linting issues, as the flake8.txt file is no longer present? |
I am also experiencing this issue, strangely enough the ruff extension of my vs code is not reporting the appropriate error. Maybe formatting is not considered an error. You can run Here is the output from the CI above |
See test results for failed build of commit 9aafa0633e |
See test results for failed build of commit d4172a993a |
WalkthroughThe recent changes introduce a method called Changes
Sequence Diagram(s)Object Redirection FlowsequenceDiagram
participant User
participant NVDAObject
participant NVDAObjects__init__
User ->> NVDAObject: objectFromPoint(x, y)
NVDAObject ->> NVDAObjects__init__: objectFromPointRedirect(x, y)
alt Redirect Found
NVDAObjects__init__ ->> User: Return redirected object
else No Redirect
NVDAObject ->> User: Return original object
end
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (2)
user_docs/en/changes.md (2)
112-112: Ensure each change log entry follows the style guide.The entry should follow the style guide of one sentence per line.
- * It is now possible to redirect objects retrieved from on screen coordinates, by using the NVDAObject.objectFromPointRedirect method. (#16788, @Emil-18) + * It is now possible to redirect objects retrieved from on screen coordinates. + * This can be done by using the NVDAObject.objectFromPointRedirect method. (#16788, @Emil-18)
115-115: Add GitHub user reference.The entry should reference the GitHub user who contributed the change.
- * There is a new module for scheduling tasks `utils.schedule`, using the pip module `schedule`. (#16636) + * There is a new module for scheduling tasks `utils.schedule`, using the pip module `schedule`. (#16636, @contributor)
| @@ -328,7 +339,13 @@ def objectFromPoint(x, y): | |||
| """ | |||
There was a problem hiding this comment.
as you've rewritten this function, could you update this function header to:
- move the type hints from the docstring into the function header
- update the docstring to use sphinx syntax
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
… on NVDAObject.objectFromPoint
See test results for failed build of commit 4e4c4f5b8e |
Link to issue number:
fixes #16788
Summary of the issue:
It is impossible to redirect what object NVDA retrieves from on screen coordinates. This makes it dificult to implement mouse and touch support for objects that has a location that differs from the location provided by the API class.
Description of user facing changes
None
Description of development approach
A new method called objectFromPointRedirect has been added to the NVDAObject class. This method is called from objectFromPoint, and given the x and y parameters. If it returns an NVDAObject, that object will be returned by objectFromPoint
Testing strategy:
Tested by always returning the desktop object. It worked as it should.
Known issues with pull request:
None
Code Review Checklist:
Summary by CodeRabbit
New Features
Improvements
schedulepip module.