-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
Fix line number reporting in Visual Studio #13604
Conversation
See test results for failed build of commit 7afececdbb |
Would it be also worth testing with line number not displayed in Visual studio and not reported by NVDA?
Could you rephrase this? It's not the setting that is reported but the line numbers.
I think that these two points should be a sub-list and not separated items of the change log. Separated items do not make sense. Thanks |
Sure, good catch, though this behaviour is implicitly tested with text ranges that are positioned somewhere else than the start of a line.
This is not necessary, as the UIA implementation returns the line number for a collapsed text range. That's also a reason why I consider this water proof. If a line starts with a number followed by a space, a collapsed range at the start of the line will be empty when line number reporting is turned of. |
@LeonarddeR |
Sadly now it doesn't even report the line numbers. |
I'll have a look here. |
This is is as expected. See the changes log entry. We simply can't report line numbers when they are hidden in Visual Studio.
This isn't a bug as well. This is how line reporting works in NVDA. You will notice that it will work equally in other text editors.
Good catch, I should have tested that more thoroughly. Just pushed a fix for this. |
17.2 Preview 3
On 4/14/2022 2:33 PM, Leonard de Ruijter wrote:
I'll have a look here.
What version of Visual Studio are you using?
—
Reply to this email directly, view it on GitHub
<#13604 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQWBMY42EB67FSOGQCS7XDVE7NOLANCNFSM5TJ3TCQQ>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Signature “Innovation is the outcome of a habit, not a random act.”
“The power of the Tech is in its universality. Access by everyone
regardless of disability is an essential aspect.”
---
With Regards,
Akash Kakkar (He/His/Him)
Software Developer & Accessibility subject matter expert
|
Ping me on WhatsApp <https://wa.me/919716286389>
|
Follow me on Twitter <https://bit.ly/37cioC4>
|
Connect with me on Facebook <https://bit.ly/3u74ZEh>
|
Follow me on Linkedin <https://bit.ly/37fqJop>
|
Follow me on Github <https://bit.ly/3r29zBW>
|
So will it keep on reporting "line 1, line 2" etc? any way to shorten
it? it would be too verbose.
On 4/14/2022 2:40 PM, Leonard de Ruijter wrote:
Sadly now it doesn't even report the line numbers. For making it
announce the line numbers we need to turn on the line numbers from
NVDA document formatting settings explicitly along with turning on
the line numbers on from Visual Studio Text Editor settings.
This is is as expected. See the changes log entry. We simply can't
report line numbers when they are hidden in Visual Studio.
Then too, strangely now it announces like: "line 1, line 2, line
3" instead of "1, 2, 3" etc.
This isn't a bug as well. This is how line reporting works in NVDA.
You will notice that it will work equally in other text editors.
Also, it doesn't report the indentation at all. For making it
announce the indentation, we are required to turn off the line
numbers from both of the sides. @LeonarddeR
<https://github.com/leonardder>
Good catch, I should have tested that more thoroughly. Just pushed a
fix for this.
—
Reply to this email directly, view it on GitHub
<#13604 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQWBMYXY2FXJUWWNAX3BA3VE7OHPANCNFSM5TJ3TCQQ>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Signature “Innovation is the outcome of a habit, not a random act.”
“The power of the Tech is in its universality. Access by everyone
regardless of disability is an essential aspect.”
---
With Regards,
Akash Kakkar (He/His/Him)
Software Developer & Accessibility subject matter expert
|
Ping me on WhatsApp <https://wa.me/919716286389>
|
Follow me on Twitter <https://bit.ly/37cioC4>
|
Connect with me on Facebook <https://bit.ly/3u74ZEh>
|
Follow me on Linkedin <https://bit.ly/37fqJop>
|
Follow me on Github <https://bit.ly/3r29zBW>
|
See test results for failed build of commit ce35702962 |
Correct. Changing this is a different question that falls beyond the scope of this issue. |
@akash07k |
@cary-rowen So can we modify this translation via addon or we'll have to modify the source itself? |
So will it keep on reporting "line 1, line 2" etc? any way to shorten
it? it would be too verbose.
It is a separate issue that NVDA is too verbose when reporting line numbers.
I agree about that, and if you file an issue you'll get my support at least.
If you turn on line numbers, you expect the first thing you hear to be a line
number; you don't need to be told it's a line.
|
@akash07k |
Absolutely, Announcing the string "Line" before every line is quite verbose.
I'll try filing the issue for it for sure.
I don't know how much consideration will it get though.
On 4/15/2022 1:54 AM, Luke Davis wrote:
> So will it keep on reporting "line 1, line 2" etc? any way to shorten
> it? it would be too verbose.
It is a separate issue that NVDA is too verbose when reporting line
numbers.
I agree about that, and if you file an issue you'll get my support at
least.
If you turn on line numbers, you expect the first thing you hear to be
a line
number; you don't need to be told it's a line.
—
Reply to this email directly, view it on GitHub
<#13604 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQWBMYBOR6TGIULGAEKYVLVFB5IFANCNFSM5TJ3TCQQ>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
Signature “Innovation is the outcome of a habit, not a random act.”
“The power of the Tech is in its universality. Access by everyone
regardless of disability is an essential aspect.”
---
With Regards,
Akash Kakkar (He/His/Him)
Software Developer & Accessibility subject matter expert
|
Ping me on WhatsApp <https://wa.me/919716286389>
|
Follow me on Twitter <https://bit.ly/37cioC4>
|
Connect with me on Facebook <https://bit.ly/3u74ZEh>
|
Follow me on Linkedin <https://bit.ly/37fqJop>
|
Follow me on Github <https://bit.ly/3r29zBW>
|
@cary-rowen very true. I'll create the separate issue for it in morning. |
I just pushed a somewhat different approach that ensures the line number is not reported when copying, selecting or deleting text. This also removes the need to tweak _getTextWithFields, which is certainly a good thing. |
See test results for failed build of commit fe7e42eef8 |
That's great. so does it completely fix the issue?
…On 4/19/22, AppVeyorBot ***@***.***> wrote:
- PASS: Translation comments check.
- PASS: Unit tests.
- PASS: Lint check.
- FAIL: System tests. See test results for more information.
- Build (for testing PR):
https://ci.appveyor.com/api/buildjobs/deppewj4vwh4jlj4/artifacts/output/nvda_snapshot_pr13604-25244,fe7e42ee.exe
See [test
results](https://ci.appveyor.com/project/NVAccess/nvda/builds/43274326/tests)
for [failed
build](https://ci.appveyor.com/project/NVAccess/nvda/builds/43274326) of
[commit fe7e42e](fe7e42eef8)
--
Reply to this email directly or view it on GitHub:
#13604 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
It should yes, apart from the verbose line number reporting introduced
when line number reporting is on in NVDA's document formatting settings.
|
source/appModules/devenv.py
Outdated
try: | ||
formatField.field['line-number'] = int(lineNumberStr) | ||
except ValueError: | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this log something? in what cases is lineNumberStr not an integer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't expect this to fail, though it certainly makes sense to log something.
See test results for failed build of commit 4452b74205 |
@LeonarddeR |
Have you tested with all add-ons disabled and are you on the most recent alpha?
|
@LeonarddeR ya buddy. I've tested and indeed, I'm on latest alpha. |
@akash07k Please note that while this fix has been merged to Alpha, due to failing system tests (unrelated to this PR) it failed to build, therefore this is not yet included in a binary version. You need to wait for the next Alpha. |
@lukaszgo1 Ah, got it. I'll wait then. thanks! |
I just tried this with latest Alpha and all works like a charm here. |
Link to issue number:
Closes #13574
Summary of the issue:
In Visual Studio, when line number reporting is enabled in VS itself, line numbers are part of the text. Therefore they are reported regardless of NVDA's line reporting settings. This also causes indentation reporting to fail.
Description of how this pull request fixes the issue:
This pr isolates the line number from the text and ensures that it is reported appropriately when line number reporting in NVDA is on.
Testing strategy:
With line reporting enabled in Visual studio
Known issues with pull request:
Line number reporting does not work when line numbers are disabled in Visual Studio.
Change log entries:
Bug fixes
Code Review Checklist: