Conversation
…next braille windoe is a space
|
Thanks @nvdaes - do you think you could add some unit tests for |
|
We need to manually test this with multi-line displays before merging |
tests/unit/test_braille/test_calculateWindowRowBufferOffsets.py
Outdated
Show resolved
Hide resolved
tests/unit/test_braille/test_calculateWindowRowBufferOffsets.py
Outdated
Show resolved
Hide resolved
|
Sean wrote:
Thanks. I don't have a multiline display. |
|
That's okay - I will test. Would you consider updating braille viewer to support adjusting the cell row/col count to create a multiline display? Might be good as a separate PR. |
Yes, thought I may need some visual feedback in the PR review. |
|
Agreed that this change now means that all cells will now be used. But in reality, this just pushes the space on to the beginning of the next braille window. Thus wasting a space at the beginning instead. |
|
Mick wrote:
I think that the approach introduced with this PR is less ambiguous than the current implementation, since if several cells are empty at the end of the display, we don't know if they correspond to spaces or are due to the wrap implementation. |
|
I think the best solution is to remove the spaces entirely (that is, spaces should be neither at the beginning nor the end of the line). While this might not be in line with print standards, I think it's worth inventing a new one. My argument is that some people use very small Braille displays (sometimes with as few as fourteen cells); for this group especially, any wasted space could potentially both (a) slow reading down and (b) put unnecessary strain on the more frequently used cells. |
|
I've had another idea, though. Perhaps a setting might be helpful. For people who are doing proofreading, they could see spaces as in the original print. For reading books or on smaller displays, one might prefer for them to be removed entirely. |
|
Hmm, a space at the start of a line feels wrong to me, and I think I'd be surprise to find one in physical braille. That being said, I understand the arguments regarding efficiency being made here, especially for very small displays. I don't buy the argument about this being clearer for proofreading - how do you know that there aren't multiple spaces forcing the new wrapping behaviour? Why can't you use the routing keys/arrow keys to move the cursor and see if there are multiple spaces at the end of a line on the braille display? That being said, I don't think this change makes things less clear, so I would be fairly comfortable merging it. |
|
Sascha wrote:
You can do it, but this is not very efficient: if all cells aren't used, you have to press a routing key, at least, in the second empty cell, to see the cursor in the last empty cell and then press the scroll down button to go to the next row. |
Yes, I agree. I guess I'm slightly concerned that this might be mistaken for a newline with an indent, but I think that is unlikely. |
|
Thank you @SaschaCowley . I didn't expect this 😀 |
|
We're aiming to merge this early in the development cycle for 2025.3, so that if people seem to strongly dislike it, we can think about next steps before it hits a stable release. |
|
Sascha wrote:
Perfect! |
# Conflicts: # user_docs/en/changes.md
Link to issue number:
Fixes #18016
Summary of the issue:
When braille Word wrap is enabled, NVDA doesn't check if the first character of the next braille window is a space, causing that in some cases NVDA Splits text between braille Windows instead of using all braille cells.
Description of user facing changes:
When possible, all braille cells Will be used even if word wrap option is enabled.
Description of developer facing changes:
None.
Description of development approach:
In
source/braille.py, the_calculateWindowRowBufferOffsets()function has been modified to check if the next character is a space when Word wrap is True, so that all cells can be used in such cases.Testing strategy:
In Notepad, type:
Use a Focus 40 braille display to check that all cells are used, when Word wrap is enabled and disabled.
Known issues with pull request:
None.
Code Review Checklist:
@coderabbitai summary