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

Text displayed on a multiline braille display will now word wrap on every row in the braille window, not just at the end #17011

Merged
merged 38 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
51f3d14
BrailleBuffer: abstract conversion of a window pos to a buffer pos in…
michaelDCurran Jul 21, 2024
097eb9c
BrailleBuffer: for displays with multiple rows of cells, word wrap ea…
michaelDCurran Jul 22, 2024
b573bab
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 1, 2024
17c9ae7
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 1, 2024
ca722fb
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 4, 2024
4857f7e
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 15, 2024
7d55184
Ensure _windowRowOffsets is initalized at least for one empty row at …
michaelDCurran Aug 15, 2024
0009e1d
linting
michaelDCurran Aug 15, 2024
1d1cbdc
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 18, 2024
c18dbdb
braille.py: add variable comment. Remove no longer needed comment.
michaelDCurran Aug 19, 2024
6b02fef
Apply suggestions from code review
michaelDCurran Aug 19, 2024
adb03e9
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 19, 2024
2161b30
braille.BrailleBuffer.update: do not pad brailleCells up to display …
michaelDCurran Aug 19, 2024
ef25d07
* braille: add a filter_displayNumRows extension point, allowing exte…
michaelDCurran Aug 19, 2024
6de204d
Add unit tests for braille.handler._normalizeCellArraySize
michaelDCurran Aug 19, 2024
4bfe6e2
Format lists in unit tests for braille.handler._normalizeCellArraySiz…
michaelDCurran Aug 20, 2024
99ef260
Ensure braille messages correctly show on the display:
michaelDCurran Aug 20, 2024
61ba4c6
Some rethinking of the braille display size filters:
michaelDCurran Aug 20, 2024
0b88c94
braille.handler.displayDimensions: only try and apply the displaySize…
michaelDCurran Aug 20, 2024
970cc7b
Braille unit tests that check the old internal _displaySize variable …
michaelDCurran Aug 20, 2024
127b91a
Pre-commit auto-fix
pre-commit-ci[bot] Aug 20, 2024
4cc5894
braille: improve syntax of DisplayDimensions namedtuple and add displ…
michaelDCurran Aug 20, 2024
d45ebd9
Braille unit test now uses DisplayDimension.displaySize.
michaelDCurran Aug 20, 2024
8092bb6
Apply suggestions from code review
michaelDCurran Aug 28, 2024
70241f1
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 28, 2024
97d6369
Apply suggestions from code review
michaelDCurran Aug 28, 2024
297f33f
Add type info
michaelDCurran Aug 28, 2024
d0402de
Add keyword arguments to braille test_normalizeCellArraySize.
michaelDCurran Aug 28, 2024
f691dd1
Pre-commit auto-fix
pre-commit-ci[bot] Aug 28, 2024
63a87e9
Developer guide: list filter_displayDimensions
michaelDCurran Aug 28, 2024
af81dfd
Update projectDocs/dev/developerGuide/developerGuide.md
seanbudd Aug 29, 2024
1f79d1e
braille.py: add type info.
michaelDCurran Aug 29, 2024
2b29a7f
Pre-commit auto-fix
pre-commit-ci[bot] Aug 29, 2024
1bccb9b
Apply suggestions from code review
michaelDCurran Aug 29, 2024
12d916a
Merge branch 'master' into brailleWordWrap
michaelDCurran Aug 29, 2024
a7ab364
Update what's new
michaelDCurran Aug 29, 2024
b76976a
Pre-commit auto-fix
pre-commit-ci[bot] Aug 29, 2024
21bcb6c
Update user_docs/en/changes.md
seanbudd Aug 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions source/braille.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,10 +1760,12 @@ def __init__(self, handler):
#: The translated braille representation of the entire buffer.
#: @type: [int, ...]
self.brailleCells = []
#: A list representing the rows in the braille window,
#: each item being a tuple of start and end braille buffer offsets.
#: Splitting the window into independent rows allows for optional avoidance of splitting words across rows.
self._windowRowBufferOffsets: list[tuple[int, int]] = [(0, 1)]
"""
A list representing the rows in the braille window,
each item being a tuple of start and end braille buffer offsets.
Splitting the window into independent rows allows for optional avoidance of splitting words across rows.
"""

def clear(self):
"""Clear the entire buffer.
Expand Down Expand Up @@ -2302,7 +2304,7 @@ def displaySize(self) -> int:
"""
Filter that allows components or add-ons to change the number of rows and columns used for braille output.
For example, when a system has a display with 10 rows and 20 columns, but is being controlled by a remote system with a display of 5 rows and 40 coluns, the display number of rows should be lowered to 5.
@param value: a DisplayDimensions namedtuple with the number of rows and columns of the current display.
:param value: a DisplayDimensions namedtuple with the number of rows and columns of the current display.
Note: this should be used in place of filter_displaySize.
"""

Expand All @@ -2311,12 +2313,12 @@ def displaySize(self) -> int:
Action that allows components or add-ons to be notified of display size changes.
For example, when a system is controlled by a remote system and the remote system swaps displays,
The local system should be notified about display size changes at the remote system.
@param displaySize: The current display size used by the braille handler.
@type displaySize: int
@param displayDimensions.numRows: The current number of rows used by the braille handler.
@type displayDimensions.numRows: int
@param displayDimensions.numCols: The current number of columns used by the braille handler.
@type displayDimensions.numCols: int
:param displaySize: The current display size used by the braille handler.
:type displaySize: int
:param displayDimensions.numRows: The current number of rows used by the braille handler.
:type displayDimensions.numRows: int
:param displayDimensions.numCols: The current number of columns used by the braille handler.
:type displayDimensions.numCols: int
"""

displayChanged = extensionPoints.Action()
Expand Down
3 changes: 3 additions & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ Please open a GitHub issue if your add-on has an issue with updating to the new

#### Deprecations

* The `braille.filter_displaySize` extension point is deprecated. Please use `braille.filter_displayDimensions` instead. (#17011)

## 2024.4
seanbudd marked this conversation as resolved.
Show resolved Hide resolved
## 2024.4

This release includes a number of improvements in Microsoft Office, braille, and document formatting.
Expand Down